- YouTube
AboutPressCopyrightContact usCreatorsAdvertiseDevelopersTermsPrivacyPolicy & SafetyHow YouTube worksTest new features
"}c=pc(d+"",null);a.trident_.open(); a.trident_.write(nc(c));a.trident_.close();a.trident_.parentWindow.m=Ta(a.onTridentRpcMessage_,a);a.trident_.parentWindow.d=Ta(a.onTridentDone_,a,!0);a.trident_.parentWindow.rpcClose=Ta(a.onTridentDone_,a,!1);c=a.trident_.createElement("DIV");a.trident_.parentWindow.document.body.appendChild(c);d=$b(a.requestUri_.toString());d=Cc(Vb(d));d=pc("",null);sc(c,d);a.channelDebug_.info("TRIDENT REQ ("+a.rid_+") [ attempt "+a.retryId_+"]: GET\n"+a.requestUri_);a.channel_.notifyServerReachabilityEvent(1)}; e=Pq.prototype;e.onTridentRpcMessage_=function(a){Gq(Ta(this.onTridentRpcMessageAsync_,this,a),0)}; e.onTridentRpcMessageAsync_=function(a){if(!this.cancelled_){var b=this.channelDebug_;b.info("TRIDENT TEXT ("+this.rid_+"): "+b.redactResponse_(a));Uq(this);this.safeOnRequestData_(a);Sq(this)}}; e.onTridentDone_=function(a){Gq(Ta(this.onTridentDoneAsync_,this,a),0)}; e.onTridentDoneAsync_=function(a){this.cancelled_||(this.channelDebug_.info("TRIDENT TEXT ("+this.rid_+"): "+a?"success":"failure"),this.cleanup_(),this.successful_=a,this.channel_.onRequestComplete(this),this.channel_.notifyServerReachabilityEvent(4))}; e.cancel=function(){this.cancelled_=!0;this.cleanup_()}; var Sq=function(a){a.watchDogTimeoutTime_=Wa()+a.timeout_;a.startWatchDogTimer_(a.timeout_)}; Pq.prototype.startWatchDogTimer_=function(a){if(null!=this.watchDogTimerId_)throw Error("WatchDog timer not null");this.watchDogTimerId_=Gq(Ta(this.onWatchDogTimeout_,this),a)}; var Uq=function(a){a.watchDogTimerId_&&(t.clearTimeout(a.watchDogTimerId_),a.watchDogTimerId_=null)}; Pq.prototype.onWatchDogTimeout_=function(){this.watchDogTimerId_=null;var a=Wa();0<=a-this.watchDogTimeoutTime_?this.handleTimeout_():(this.channelDebug_.warning("WatchDog timer called too early"),this.startWatchDogTimer_(this.watchDogTimeoutTime_-a))}; Pq.prototype.handleTimeout_=function(){this.channelDebug_.timeoutResponse(this.requestUri_);2!=this.type_&&this.channel_.notifyServerReachabilityEvent(3);this.cleanup_();this.lastError_=2;Iq(18);Vq(this)}; var Vq=function(a){if(!a.channel_.isClosed()&&!a.cancelled_)a.channel_.onRequestComplete(a)}; e=Pq.prototype;e.cleanup_=function(){Uq(this);Rg(this.readyStateChangeThrottle_);this.readyStateChangeThrottle_=null;this.pollingTimer_.stop();this.eventHandler_.removeAll();if(this.xmlHttp_){var a=this.xmlHttp_;this.xmlHttp_=null;a.abort();a.dispose()}this.trident_&&(this.trident_=null)}; e.getLastError=function(){return this.lastError_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.getSessionId=function(){return this.sid_}; e.safeOnRequestData_=function(a){try{this.channel_.onRequestData(this,a),this.channel_.notifyServerReachabilityEvent(4)}catch(b){}};var Xq=function(){this.logger_=null}; e=Xq.prototype;e.getLogger=function(){return this.logger_}; e.browserOfflineResponse=function(a){this.info("BROWSER_OFFLINE: "+a)}; e.xmlHttpChannelRequest=function(a,b,c,d,f){this.info("XMLHTTP REQ ("+c+") [attempt "+d+"]: "+a+"\n"+b+"\n"+this.maybeRedactPostData_(f))}; e.xmlHttpChannelResponseMetaData=function(a,b,c,d,f,g){this.info("XMLHTTP RESP ("+c+") [ attempt "+d+"]: "+a+"\n"+b+"\n"+f+" "+g)}; e.xmlHttpChannelResponseText=function(a,b,c){this.info("XMLHTTP TEXT ("+a+"): "+this.redactResponse_(b)+(c?" "+c:""))}; e.timeoutResponse=function(a){this.info("TIMEOUT: "+a)}; e.debug=function(a){this.info(a)}; e.dumpException=function(){}; e.info=function(){}; e.warning=function(){}; e.severe=function(){}; e.redactResponse_=function(a){if(!a||"y2f%"==a)return a;try{var b=JSON.parse(a);if(b)for(var c=0;ca.length||(a=a[1],!Array.isArray(a)||1>a.length))){var b=a[0];if("noop"!=b&&"stop"!=b)for(b=1;bb)throw Error("Bad port number "+b);a.port_=b}else a.port_=null;return a}; fq.prototype.getPath=function(){return this.path_}; fq.prototype.setPath=function(a,b){$q(this);this.path_=b?dr(a,!0):a;return this}; fq.prototype.hasPath=function(){return!!this.path_}; fq.prototype.hasQuery=function(){return""!==this.queryData_.toString()}; var br=function(a,b,c){$q(a);b instanceof er?(a.queryData_=b,a.queryData_.setIgnoreCase(a.ignoreCase_)):(c||(b=fr(b,joa)),a.queryData_=new er(b,a.ignoreCase_));return a}; fq.prototype.setQuery=function(a,b){return br(this,a,b)}; fq.prototype.getDecodedQuery=function(){return dr(this.queryData_.toString())}; fq.prototype.getQuery=function(){return this.queryData_.toString()}; var Wq=function(a,b,c){$q(a);a.queryData_.set(b,c);return a},Tq=function(a,b,c){$q(a); Array.isArray(c)||(c=[String(c)]);koa(a.queryData_,b,c)}; fq.prototype.getParameterValues=function(a){return this.queryData_.getValues(a)}; var gr=function(a,b){return a.queryData_.get(b)},cr=function(a,b,c){$q(a); a.fragment_=c?dr(b):b;return a}; fq.prototype.hasSameDomainAs=function(a){return(!this.domain_&&!a.domain_||this.domain_==a.domain_)&&(null==this.port_&&null==a.port_||this.port_==a.port_)}; var Rq=function(a){$q(a);Wq(a,"zx",Hc());return a}; fq.prototype.removeParameter=function(a){$q(this);this.queryData_.remove(a);return this}; fq.prototype.setReadOnly=function(a){this.isReadOnly_=a;return this}; fq.prototype.isReadOnly=function(){return this.isReadOnly_}; var $q=function(a){if(a.isReadOnly_)throw Error("Tried to modify a read-only Uri")}; fq.prototype.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a)}; var hr=function(a){return a instanceof fq?a.clone():new fq(a,void 0)},loa=function(a,b,c,d){var f=new fq(null,void 0); a&&f.setScheme(a);b&&eq(f,b);c&&ar(f,c);d&&f.setPath(d);return f},dr=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},fr=function(a,b,c){return"string"===typeof a?(a=encodeURI(a).replace(b,moa),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},moa=function(a){a=a.charCodeAt(0); return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},foa=/[#\/\?@]/g,hoa=/[#\?:]/g,goa=/[#\?]/g,joa=/[#\?@]/g,ioa=/#/g,er=function(a,b){this.count_=this.keyMap_=null; this.encodedQuery_=a||null;this.ignoreCase_=!!b},ir=function(a){a.keyMap_||(a.keyMap_=new pj,a.count_=0,a.encodedQuery_&&Fd(a.encodedQuery_,function(b,c){a.add(Bc(b),c)}))}; e=er.prototype;e.getCount=function(){ir(this);return this.count_}; e.add=function(a,b){ir(this);this.encodedQuery_=null;a=jr(this,a);var c=this.keyMap_.get(a);c||this.keyMap_.set(a,c=[]);c.push(b);this.count_+=1;return this}; e.remove=function(a){ir(this);a=jr(this,a);return this.keyMap_.containsKey(a)?(this.encodedQuery_=null,this.count_-=this.keyMap_.get(a).length,this.keyMap_.remove(a)):!1}; e.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0}; e.isEmpty=function(){ir(this);return 0==this.count_}; e.containsKey=function(a){ir(this);a=jr(this,a);return this.keyMap_.containsKey(a)}; e.containsValue=function(a){var b=this.getValues();return mb(b,a)}; e.forEach=function(a,b){ir(this);this.keyMap_.forEach(function(c,d){db(c,function(f){a.call(b,f,d,this)},this)},this)}; e.getKeys=function(){ir(this);for(var a=this.keyMap_.getValues(),b=this.keyMap_.getKeys(),c=[],d=0;da)this.lastStatusCode_=200,this.request_.cancel(),this.channelDebug_.debug("Test connection succeeded; using streaming connection"),Iq(12),rr(this.channel_,this,!0)}else Iq(8),this.firstTime_=this.lastTime_=Wa(),this.receivedIntermediateResult_=!1}; e.onRequestComplete=function(){this.lastStatusCode_=this.request_.getLastStatusCode();this.request_.successful_?0==this.state_?(this.channelDebug_.debug("TestConnection: request complete for initial check"),this.blockedPrefix_?(this.state_=1,Aoa(this)):(this.state_=2,qr(this))):2==this.state_&&(this.channelDebug_.debug("TestConnection: request complete for stage 2"),(!te||Ge(10)?!this.receivedIntermediateResult_:200>this.lastTime_-this.firstTime_)?(this.channelDebug_.debug("Test connection failed; not using streaming"), Iq(11),rr(this.channel_,this,!1)):(this.channelDebug_.debug("Test connection succeeded; using streaming connection"),Iq(12),rr(this.channel_,this,!0))):(this.channelDebug_.debug("TestConnection: request failed, in state "+this.state_),0==this.state_?Iq(9):2==this.state_&&Iq(10),sr(this.channel_,this,this.request_.getLastError()))}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.shouldUseSecondaryDomains=function(){return this.channel_.shouldUseSecondaryDomains()}; e.isActive=function(){return this.channel_.isActive()}; e.notifyServerReachabilityEvent=function(a){this.channel_.notifyServerReachabilityEvent(a)};var tr=function(a,b,c,d){this.clientVersion_=a||null;this.state_=1;this.outgoingMaps_=[];this.pendingMaps_=[];this.channelDebug_=new Xq;this.parser_=new Fq;this.firstTestResults_=b||null;this.secondTestResults_=null!=c?c:null;this.asyncTest_=d||!1},Boa=function(a,b){this.mapId=a; this.map=b;this.context=null}; e=tr.prototype;e.extraHeaders_=null;e.extraParams_=null;e.forwardChannelRequest_=null;e.backChannelRequest_=null;e.path_=null;e.forwardChannelUri_=null;e.backChannelUri_=null;e.hostPrefix_=null;e.allowHostPrefix_=!0;e.nextRid_=0;e.nextMapId_=0;e.failFast_=!1;e.handler_=null;e.forwardChannelTimerId_=null;e.backChannelTimerId_=null;e.deadBackChannelTimerId_=null;e.connectionTest_=null;e.useChunked_=null;e.allowChunkedMode_=!0;e.lastArrayId_=-1;e.lastPostResponseArrayId_=-1;e.lastStatusCode_=-1; e.forwardChannelRetryCount_=0;e.backChannelRetryCount_=0;e.baseRetryDelayMs_=5E3;e.retryDelaySeedMs_=1E4;e.forwardChannelMaxRetries_=2;e.forwardChannelRequestTimeoutMs_=2E4;e.readyStateChangeThrottleMs_=0;e.supportsCrossDomainXhrs_=!1;e.channelVersion_=8;var Coa=function(a,b,c,d){hi.call(this,"timingevent",a);this.size=b;this.rtt=c;this.retries=d}; v(Coa,hi);var Doa=function(a,b){hi.call(this,"serverreachability",a);this.reachabilityType=b}; v(Doa,hi);e=tr.prototype;e.getChannelDebug=function(){return this.channelDebug_}; e.setChannelDebug=function(a){null!=a&&(this.channelDebug_=a)}; e.connect=function(a,b,c,d,f){this.channelDebug_.debug("connect()");Iq(0);this.path_=b;this.extraParams_=c||{};d&&void 0!==f&&(this.extraParams_.OSID=d,this.extraParams_.OAID=f);this.asyncTest_?(Gq(Ta(this.connectTest_,this,a),100),ur(this)):this.connectTest_(a)}; e.disconnect=function(){this.channelDebug_.debug("disconnect()");this.cancelRequests_();if(3==this.state_){var a=this.nextRid_++,b=this.forwardChannelUri_.clone();Wq(b,"SID",this.sid_);Wq(b,"RID",a);Wq(b,"TYPE","terminate");this.addAdditionalParams_(b);a=new Pq(this,this.channelDebug_,this.sid_,a,void 0);a.type_=2;a.baseUri_=Rq(b.clone());vc(new Image,a.baseUri_.toString());a.requestStartTime_=Wa();Sq(a)}this.onClose_()}; e.getSessionId=function(){return this.sid_}; e.connectTest_=function(a){this.channelDebug_.debug("connectTest_()");this.okToMakeRequest_()&&(this.connectionTest_=new pr(this,this.channelDebug_),this.connectionTest_.setExtraHeaders(this.extraHeaders_),this.connectionTest_.setParser(this.parser_),this.connectionTest_.connect(a))}; var ur=function(a){a.channelDebug_.debug("connectChannel_()");a.ensureInState_(1,0);a.forwardChannelUri_=a.getForwardChannelUri(a.path_);a.ensureForwardChannel_()}; e=tr.prototype; e.cancelRequests_=function(){this.connectionTest_&&(this.connectionTest_.abort(),this.connectionTest_=null);this.backChannelRequest_&&(this.backChannelRequest_.cancel(),this.backChannelRequest_=null);this.backChannelTimerId_&&(t.clearTimeout(this.backChannelTimerId_),this.backChannelTimerId_=null);vr(this);this.forwardChannelRequest_&&(this.forwardChannelRequest_.cancel(),this.forwardChannelRequest_=null);this.forwardChannelTimerId_&&(t.clearTimeout(this.forwardChannelTimerId_),this.forwardChannelTimerId_=null)}; e.setExtraHeaders=function(a){this.extraHeaders_=a}; e.setReadyStateChangeThrottle=function(a){this.readyStateChangeThrottleMs_=a}; e.setSupportsCrossDomainXhrs=function(a){this.supportsCrossDomainXhrs_=a}; e.getHandler=function(){return this.handler_}; e.setHandler=function(a){this.handler_=a}; e.getAllowHostPrefix=function(){return this.allowHostPrefix_}; e.setAllowHostPrefix=function(a){this.allowHostPrefix_=a}; e.isBuffered=function(){return!this.useChunked_}; e.getAllowChunkedMode=function(){return this.allowChunkedMode_}; e.setAllowChunkedMode=function(a){this.allowChunkedMode_=a}; e.sendMap=function(a){if(0==this.state_)throw Error("Invalid operation: sending map when state is closed");1E3==this.outgoingMaps_.length&&this.parser_.stringify(a);this.outgoingMaps_.push(new Boa(this.nextMapId_++,a));2!=this.state_&&3!=this.state_||this.ensureForwardChannel_()}; e.setFailFast=function(a){this.failFast_=a;this.channelDebug_.info("setFailFast: "+a);(this.forwardChannelRequest_||this.forwardChannelTimerId_)&&this.forwardChannelRetryCount_>wr(this)&&(this.channelDebug_.info("Retry count "+this.forwardChannelRetryCount_+" > new maxRetries "+wr(this)+". Fail immediately!"),this.forwardChannelRequest_?(this.forwardChannelRequest_.cancel(),this.onRequestComplete(this.forwardChannelRequest_)):(t.clearTimeout(this.forwardChannelTimerId_),this.forwardChannelTimerId_= null,this.signalError_(2)))}; var wr=function(a){return a.failFast_?0:a.forwardChannelMaxRetries_}; e=tr.prototype;e.setForwardChannelMaxRetries=function(a){this.forwardChannelMaxRetries_=a}; e.setForwardChannelRequestTimeout=function(a){this.forwardChannelRequestTimeoutMs_=a}; e.isClosed=function(){return 0==this.state_}; e.getState=function(){return this.state_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.hasOutstandingRequests=function(){var a=0;this.backChannelRequest_&&a++;this.forwardChannelRequest_&&a++;return 0!=a}; e.setParser=function(a){this.parser_=a}; e.ensureForwardChannel_=function(){this.forwardChannelRequest_||this.forwardChannelTimerId_||(this.forwardChannelTimerId_=Gq(Ta(this.onStartForwardChannelTimer_,this),0),this.forwardChannelRetryCount_=0)}; e.maybeRetryForwardChannel_=function(a){if(this.forwardChannelRequest_||this.forwardChannelTimerId_||1==this.state_||this.forwardChannelRetryCount_>=wr(this))return!1;this.channelDebug_.debug("Going to retry POST");this.forwardChannelTimerId_=Gq(Ta(this.onStartForwardChannelTimer_,this,a),this.getRetryTime_(this.forwardChannelRetryCount_));this.forwardChannelRetryCount_++;return!0}; e.onStartForwardChannelTimer_=function(a){this.forwardChannelTimerId_=null;this.startForwardChannel_(a)}; e.startForwardChannel_=function(a){this.channelDebug_.debug("startForwardChannel_");this.okToMakeRequest_()&&(1==this.state_?a||(this.open_(),this.state_=2):3==this.state_&&(a?this.makeForwardChannelRequest_(a):0==this.outgoingMaps_.length?this.channelDebug_.debug("startForwardChannel_ returned: nothing to send"):this.forwardChannelRequest_||(this.makeForwardChannelRequest_(),this.channelDebug_.debug("startForwardChannel_ finished, sent request"))))}; e.open_=function(){this.channelDebug_.debug("open_()");this.nextRid_=Math.floor(1E5*Math.random());var a=this.nextRid_++,b=new Pq(this,this.channelDebug_,"",a,void 0);b.setExtraHeaders(this.extraHeaders_);var c=this.dequeueOutgoingMaps_(),d=this.forwardChannelUri_.clone();Wq(d,"RID",a);this.clientVersion_&&Wq(d,"CVER",this.clientVersion_);this.addAdditionalParams_(d);b.xmlHttpPost(d,c,!0);this.forwardChannelRequest_=b}; e.makeForwardChannelRequest_=function(a){if(a){if(6=this.channelVersion_?f:d.$jscomp$loop$prop$mapId$2370-c;try{y.forEach(g,function(l){return function(m, n){b.push("req"+l.$jscomp$loop$prop$mapId$2370+"_"+n+"="+encodeURIComponent(m))}}(d))}catch(l){b.push("req"+d.$jscomp$loop$prop$mapId$2370+"_type="+encodeURIComponent("_badmap"))}}this.pendingMaps_=this.pendingMaps_.concat(this.outgoingMaps_.splice(0,a)); return b.join("&")}; e.requeuePendingMaps_=function(){this.outgoingMaps_=this.pendingMaps_.concat(this.outgoingMaps_);this.pendingMaps_.length=0}; e.ensureBackChannel_=function(){this.backChannelRequest_||this.backChannelTimerId_||(this.backChannelAttemptId_=1,this.backChannelTimerId_=Gq(Ta(this.onStartBackChannelTimer_,this),0),this.backChannelRetryCount_=0)}; e.maybeRetryBackChannel_=function(){if(this.backChannelRequest_||this.backChannelTimerId_||3<=this.backChannelRetryCount_)return!1;this.channelDebug_.debug("Going to retry GET");this.backChannelAttemptId_++;this.backChannelTimerId_=Gq(Ta(this.onStartBackChannelTimer_,this),this.getRetryTime_(this.backChannelRetryCount_));this.backChannelRetryCount_++;return!0}; e.onStartBackChannelTimer_=function(){this.backChannelTimerId_=null;this.startBackChannel_()}; e.startBackChannel_=function(){if(this.okToMakeRequest_()){this.channelDebug_.debug("Creating new HttpRequest");this.backChannelRequest_=new Pq(this,this.channelDebug_,this.sid_,"rpc",this.backChannelAttemptId_);this.backChannelRequest_.setExtraHeaders(this.extraHeaders_);this.backChannelRequest_.setReadyStateChangeThrottle(this.readyStateChangeThrottleMs_);var a=this.backChannelUri_.clone();Wq(a,"RID","rpc");Wq(a,"SID",this.sid_);Wq(a,"CI",this.useChunked_?"0":"1");Wq(a,"AID",this.lastArrayId_); this.addAdditionalParams_(a);if(!te||Ge(10))Wq(a,"TYPE","xmlhttp"),this.backChannelRequest_.xmlHttpGet(a,!0,this.hostPrefix_,!1);else{Wq(a,"TYPE","html");var b=this.backChannelRequest_,c=!!this.hostPrefix_;b.type_=3;b.baseUri_=Rq(a.clone());boa(b,c)}this.channelDebug_.debug("New Request created")}}; e.okToMakeRequest_=function(){return!0}; var rr=function(a,b,c){a.channelDebug_.debug("Test Connection Finished");a.useChunked_=a.allowChunkedMode_&&c;a.lastStatusCode_=b.getLastStatusCode();a.asyncTest_||ur(a)},sr=function(a,b){a.channelDebug_.debug("Test Connection Failed"); a.lastStatusCode_=b.getLastStatusCode();a.signalError_(2)}; e=tr.prototype; e.onRequestData=function(a,b){if(0!=this.state_&&(this.backChannelRequest_==a||this.forwardChannelRequest_==a))if(this.lastStatusCode_=a.getLastStatusCode(),this.forwardChannelRequest_==a&&3==this.state_){if(7a&&!this.isBuffered()&&0==this.backChannelRetryCount_}; e.correctHostPrefix=function(a){return this.allowHostPrefix_?this.handler_?this.handler_.correctHostPrefix(a):a:null}; e.onBackChannelDead_=function(){null!=this.deadBackChannelTimerId_&&(this.deadBackChannelTimerId_=null,this.backChannelRequest_.cancel(),this.backChannelRequest_=null,this.maybeRetryBackChannel_(),Iq(20))}; var vr=function(a){null!=a.deadBackChannelTimerId_&&(t.clearTimeout(a.deadBackChannelTimerId_),a.deadBackChannelTimerId_=null)}; e=tr.prototype; e.onRequestComplete=function(a){this.channelDebug_.debug("Request complete");if(this.backChannelRequest_==a){vr(this);this.backChannelRequest_=null;var b=2}else if(this.forwardChannelRequest_==a)this.forwardChannelRequest_=null,b=1;else return;this.lastStatusCode_=a.getLastStatusCode();if(0!=this.state_)if(a.successful_){if(1==b){b=Wa()-a.requestStartTime_;var c=Hq;c.dispatchEvent(new Coa(c,a.postData_?a.postData_.length:0,b,this.forwardChannelRetryCount_));this.ensureForwardChannel_();this.onSuccess_(); this.pendingMaps_.length=0}else this.ensureBackChannel_();}else{c=a.getLastError();if(3==c||7==c||0==c&&0c)return!1;!(b instanceof Or)&&5c&&(a.currentMaxDelayMs_=c))}a.inRetryMode_=!0;return b};var Sr=function(){this.logger_=null}; e=Sr.prototype;e.severe=function(){}; e.warning=function(){}; e.info=function(){}; e.fine=function(){}; e.isLoggable=function(){return null!=this.logger_&&Ea.log.ENABLED&&null}; e.setLevel=function(){}; e.logInternalLevel_=function(){};var Tr=function(){}; Tr.prototype.getSerializedValue=function(a,b){return Cr(a)?this.serialize(b):"number"!==typeof b||isFinite(b)?b:b.toString()}; Tr.prototype.deserialize=function(a,b){a=new a.messageType_;this.deserializeTo(a,b);return a}; Tr.prototype.getDeserializedValue=function(a,b){if(Cr(a))return b instanceof Dr?b:this.deserialize(a.nativeType_.prototype.getDescriptor(),b);if(14==a.fieldType_)return"string"===typeof b&&Qoa.test(b)&&(a=Number(b),0/,OPEN_LIST:/^\[/,CLOSE_LIST:/^\]/,STRING:es,COLON:/^:/,COMMA:/^,/,SEMI:/^;/,WHITESPACE:fs};Soa.prototype.next=function(){for(;Uoa(this);){var a=this.current_.type;if(a!=fs&&a!=ds||a==fs&&!this.ignoreWhitespace_||a==ds&&!this.ignoreComments_)return!0}this.current_={type:as,value:null};return!1}; var Uoa=function(a){if(a.index_>=a.data_.length)return!1;var b=a.currentData_,c=null;y.some(Toa,function(d){if(c||d==as)return!1;var f=d.exec(b);f&&0==f.index&&(c={type:d,value:f[0]});return!!c}); c&&(a.current_=c,a.index_+=c.value.length,a.currentData_=a.currentData_.substring(c.value.length));return!!c},Wr=function(){this.tokenizer_=this.error_=null; this.ignoreMissingFields_=!1}; Wr.prototype.parse=function(a,b,c){this.error_=null;this.ignoreMissingFields_=!!c;this.tokenizer_=new Soa(b);this.tokenizer_.next();return gs(this,a,"")}; Wr.prototype.getError=function(){return this.error_}; var gs=function(a,b,c){for(;">"!=a.tokenizer_.current_.value&&"}"!=a.tokenizer_.current_.value&&a.tokenizer_.current_.type!=as;)if(!Voa(a,b))return!1;if(c){if(!hs(a,c))return!1}else a.tokenizer_.current_.type!=as&&(a.error_="Expected END token");return!0},Xoa=function(a,b,c){a=Woa(a,c); if(null===a)return!1;c.isRepeated()?b.add(c,a):b.set(c,a);return!0},is=function(a){return Qb(a,".")?parseFloat(a):Eba(a)},Woa=function(a,b){switch(b.fieldType_){case 1:case 2:if(b=js(a,bs))if(b=/^-?inf(?:inity)?f?$/i.test(b)?Infinity*(Mb(b,"-")?-1:1):/^nanf?$/i.test(b)?NaN:null,null!=b)return b; case 5:case 13:case 7:case 15:case 17:return(a=js(a,cs))?is(a):null;case 3:case 4:case 6:case 16:case 18:return(a=js(a,cs))?b.nativeType_==Number?is(a):a:null;case 8:b=js(a,bs);if(!b)return null;switch(b){case"true":return!0;case"false":return!1;default:return a.error_="Unknown type for bool: "+b,null;}case 14:if(a.tokenizer_.current_.type==cs)return(a=js(a,cs))?is(a):null;var c=js(a,bs);if(!c)return null;b=b.nativeType_[c];return null==b?(a.error_="Unknown enum value: "+c,null):b;case 12:case 9:if(b= js(a,es)){for(c=JSON.parse(b).toString();a.tokenizer_.current_.type==es;)b=js(a,es),c+=JSON.parse(b).toString();a=c}else a=null;return a;}},Yoa=function(a){ks(a,":"); if(ks(a,"[")){for(;;){a.tokenizer_.next();if(ks(a,"]"))break;if(!hs(a,","))return!1}return!0}if(ks(a,"<"))return gs(a,null,">");if(ks(a,"{"))return gs(a,null,"}");a.tokenizer_.next();return!0},Voa=function(a,b){var c=js(a,bs); if(!c)return a.error_="Missing field name",!1;var d=null;b&&(d=Ar(b.getDescriptor(),c.toString()));if(null==d){if(a.ignoreMissingFields_)return Yoa(a);a.error_="Unknown field: "+c;return!1}if(11==d.fieldType_||10==d.fieldType_){ks(a,":");a:{c=d;if(ks(a,"<"))d=">";else{if(!hs(a,"{")){b=!1;break a}d="}"}var f=new(c.nativeType_.prototype.getDescriptor().messageType_);gs(a,f,d)?(c.isRepeated()?b.add(c,f):b.set(c,f),b=!0):b=!1}if(!b)return!1}else{if(!hs(a,":"))return!1;if(d.isRepeated()&&ks(a,"["))for(;;){if(!Xoa(a, b,d))return!1;if(ks(a,"]"))break;if(!hs(a,","))return!1}else if(!Xoa(a,b,d))return!1}ks(a,",")||ks(a,";");return!0},ks=function(a,b){return a.tokenizer_.current_.value==b?(a.tokenizer_.next(),!0):!1},js=function(a,b){if(a.tokenizer_.current_.type!=b)return a.error_="Expected token type: "+b,null; b=a.tokenizer_.current_.value;a.tokenizer_.next();return b},hs=function(a,b){return ks(a,b)?!0:(a.error_="Expected token \""+b+"\"",!1)};var Zoa=new Ur(0),$oa=new Ur(2),apa=new Vr,ls=function(a){a=Zoa.serialize(a);return tj(a)},bpa=JSON.parse,cpa=function(a,b){try{var c=bpa(b)}catch(f){return null}try{var d=$oa.deserialize(a,c)}catch(f){return null}return null==d?null:d}; Dr.prototype.toString=function(){return apa.serialize(this)}; var dpa=function(a){var b=bg(document,a);null==b&&(b=mg("DIV",{id:a,style:"display:none"}),dg(document,"body",void 0,void 0)[0].appendChild(b));return b};var ms=function(){yi.call(this);this.eventHandler_=new Kq(this);ifa&&(jfa?this.eventHandler_.listen(kfa?document.body:window,["online","offline"],this.handleChange_):(this.online_=this.isOnline(),this.timer_=new Wi(250),this.eventHandler_.listen(this.timer_,"tick",this.handleTick_),this.timer_.start()))}; v(ms,yi);ms.prototype.isOnline=function(){return ifa?navigator.onLine:!0}; ms.prototype.handleTick_=function(){var a=this.isOnline();a!=this.online_&&(this.online_=a,this.handleChange_())}; ms.prototype.handleChange_=function(){var a=this.isOnline()?"online":"offline";this.dispatchEvent(a)}; ms.prototype.disposeInternal=function(){ms.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.eventHandler_=null;this.timer_&&(this.timer_.dispose(),this.timer_=null)};var epa=function(a,b,c){return new ns(a,b,c)},os=function(a,b,c,d){d=void 0===d?epa:d; this.baseUri=a;this.handler=b;this.config=c;this.browserChannelProvider=d;this.hasBeenDisposed=!1;this.protocolVersion="5";this.stateVersionNumber=this.state=0;this.logger=new Sr;this.eventHandler=new Kq;this.delayGeneratorOnQuota=new Qr(3E5,12);this.delayGeneratorOnNotFound=new Qr(250,7200);this.authParams=new Nr;this.immediateConnectionRateLimiter=new Poa;this.lastStatusCode=-1;this.authState=0;this.eventHandler.listen(Hq,"statevent",this.onStatEvent.bind(this));this.delayGenerator=new Qr(Hr(c, 11),Hr(c,12));Rr(this.delayGeneratorOnQuota);Rr(this.delayGeneratorOnNotFound)}; p(os,xr);os.prototype.getStateForTest=function(){return this.state}; os.prototype.getImmediateConnectBudgetForTest=function(){var a=this.immediateConnectionRateLimiter;a.update();return a.tokens}; var ps=function(a,b){b!==a.state&&(a.state=b,a.stateVersionNumber++);return a.stateVersionNumber}; e=os.prototype;e.updateAuthParams=function(a){var b=!this.authParams||this.authParams.getToken()!==a.getToken();this.authParams=a.clone();this.browserChannel&&(a=Moa(this.authParams),this.browserChannel.setExtraHeaders(a));b&&(b=this.authState,this.authState=1,2===b&&this.tryImmediateReconnectByUserRequest())}; e.start=function(){ps(this,1);this.open(this.delayGenerator)}; e.startHandoff=function(){}; e.open=function(a){var b=this;if(1===this.state){ps(this,2);a=Rr(a)+Hr(this.config,3);Ir(this.config,3,0);var c=this.stateVersionNumber;Xi(function(){fpa(b,c)},a)}}; e.tryImmediateReconnectByUserRequest=function(){switch(this.state){case 1:case 2:var a=this.immediateConnectionRateLimiter;a.update();0=d&&(this.lastStatusCode=d,this.handler.channelError(new yr(2,d),this),void 0!==this.browserChannel&&this.browserChannel.disconnect()):a.push(c)}0=b.branches_&&b.cancel())}this.onCancelFunction_?this.onCancelFunction_.call(this.defaultScope_,this):this.silentlyCanceled_=!0;this.fired_||this.errback(new ct(this))}}; bt.prototype.continue_=function(a,b){this.blocked_=!1;dt(this,a,b)}; var dt=function(a,b,c){a.fired_=!0;a.result_=c;a.hadError_=!b;Wpa(a)},Xpa=function(a){if(a.fired_){if(!a.silentlyCanceled_)throw new et(a); a.silentlyCanceled_=!1}}; bt.prototype.callback=function(a){Xpa(this);dt(this,!0,a)}; bt.prototype.errback=function(a){Xpa(this);dt(this,!1,a)}; bt.prototype.assertNotDeferred_=function(){}; var gt=function(a,b,c){ft(a,b,null,c)}; bt.prototype.addErrback=function(a,b){return ft(this,null,a,b)}; bt.prototype.addBoth=function(a,b){return ft(this,a,a,b)}; bt.prototype.addFinally=function(a,b){return ft(this,a,function(c){var d=a.call(this,c);if(void 0===d)throw c;return d},b)}; var ft=function(a,b,c,d){a.sequence_.push([b,c,d]);a.fired_&&Wpa(a);return a}; bt.prototype.then=function(a,b,c){var d,f,g=new Ki(function(l,m){d=l;f=m}); ft(this,d,function(l){l instanceof ct?g.cancel():f(l)}); return g.then(a,b,c)}; Ii(bt);var ht=function(a,b){b instanceof bt?gt(a,Ta(b.branch,b)):gt(a,function(){return b})}; bt.prototype.branch=function(a){var b=new bt;ft(this,b.callback,b.errback,b);a&&(b.parent_=this,this.branches_++);return b}; bt.prototype.isError=function(a){return a instanceof Error}; var Ypa=function(a){return hb(a.sequence_,function(b){return"function"===typeof b[1]})}; bt.prototype.getLastValueForMigration=function(){return this.fired_&&!this.hadError_?this.result_:void 0}; var Wpa=function(a){if(a.unhandledErrorId_&&a.fired_&&Ypa(a)){var b=a.unhandledErrorId_,c=jt[b];c&&(t.clearTimeout(c.id_),delete jt[b]);a.unhandledErrorId_=0}a.parent_&&(a.parent_.branches_--,delete a.parent_);b=a.result_;for(var d=c=!1;a.sequence_.length&&!a.blocked_;){var f=a.sequence_.shift(),g=f[0],l=f[1];f=f[2];if(g=a.hadError_?l:g)try{var m=g.call(f||a.defaultScope_,b);void 0!==m&&(a.hadError_=a.hadError_&&(m==b||a.isError(m)),a.result_=b=m);if(Ji(b)||"function"===typeof t.Promise&&b instanceof t.Promise)d=!0,a.blocked_=!0}catch(n){b=n,a.hadError_=!0,Ypa(a)||(c=!0)}}a.result_=b;d&&(m=Ta(a.continue_,a,!0),d=Ta(a.continue_,a,!1),b instanceof bt?(ft(b,m,d),b.blocking_=!0):b.then(m,d));c&&(b=new Zpa(b),jt[b.id_]=b,a.unhandledErrorId_=b.id_)},et=function(a){$a.call(this); this.deferred=a}; v(et,$a);et.prototype.message="Deferred has already fired";et.prototype.name="AlreadyCalledError";var ct=function(a){$a.call(this);this.deferred=a}; v(ct,$a);ct.prototype.message="Deferred was canceled";ct.prototype.name="CanceledError";var Zpa=function(a){this.id_=t.setTimeout(Ta(this.throwError,this),0);this.error_=a}; Zpa.prototype.throwError=function(){delete jt[this.id_];throw this.error_}; var jt={};var $pa={1:"NativeMessagingTransport",2:"DirectTransport"},aqa=["pu","lru","pru","lpu","ppu"],kt=function(a){for(var b=bqa,c=b.length,d="";0a.peerProtocolVersion_&&(a.peerProtocolVersion_=b);1==a.peerProtocolVersion_&&(a.setupAckSent_.fired_||a.oneSidedHandshake_||a.setupAckSent_.callback(!0),a.peerEndpointId_=null)}; e=rt.prototype;e.connect=function(){var a=this.getWindow(),b=Ra(a),c=st[b];"number"!==typeof c&&(c=0);0==c&&si(a.postMessage?a:a.document,"message",iqa,!1,rt);st[b]=c+1;this.initialized_=!0;this.maybeAttemptToConnect_()}; e.maybeAttemptToConnect_=function(){var a=0==nt(this.channel_);this.oneSidedHandshake_&&a||this.channel_.isConnected()||this.isDisposed()?this.maybeAttemptToConnectTimer_.stop():(this.maybeAttemptToConnectTimer_.start(),this.sendSetupMessage_())}; e.send=function(a,b){var c=this.channel_.peerWindowObject_;c&&(this.send=function(d,f){var g=this,l=this.channel_.name;this.sendTimerId_=Xi(function(){g.sendTimerId_=0;try{var m=c.postMessage?c:c.document;m.postMessage&&m.postMessage(l+"|"+d+":"+f,g.peerHostname_)}catch(n){}},0)},this.send(a,b))}; e.notifyConnected_=function(){fqa(this.channel_,1==this.protocolVersion_||1==this.peerProtocolVersion_?200:void 0)}; e.disposeInternal=function(){if(this.initialized_){var a=this.getWindow(),b=Ra(a),c=st[b];st[b]=c-1;1==c&&vi(a.postMessage?a:a.document,"message",iqa,!1,rt)}this.sendTimerId_&&(Yi(this.sendTimerId_),this.sendTimerId_=0);Rg(this.eventHandler_);delete this.eventHandler_;Rg(this.maybeAttemptToConnectTimer_);delete this.maybeAttemptToConnectTimer_;this.setupAckReceived_.cancel();delete this.setupAckReceived_;this.setupAckSent_.cancel();delete this.setupAckSent_;this.connected_.cancel();delete this.connected_; delete this.send;rt.superClass_.disposeInternal.call(this)}; var gqa=function(a){a=a.split(",");a[1]=a[1]||null;return a};var ut=function(a,b){at.call(this);for(var c=0,d;d=aqa[c];c++)if(d in a&&!/^https?:\/\//.test(a[d]))throw Error("URI "+a[d]+" is invalid for field "+d);this.cfg_=a;this.name=this.cfg_.cn||kt(10);this.domHelper_=b||ag();this.deferredDeliveries_=[];this.peerLoadHandler_=new Kq(this);a.lpu=a.lpu||Bd(this.domHelper_.getWindow().location.href)+"/robots.txt";a.ppu=a.ppu||Bd(a.pu||"")+"/robots.txt";qt[this.name]=this;wfa(window,"unload",jqa)||ri(window,"unload",jqa)}; v(ut,at);var kqa=/^%*tp$/,lqa=/^%+tp$/;e=ut.prototype;e.connectionDelay_=null;e.peerWindowDeferred_=null;e.transport_=null;e.state_=1;e.isConnected=function(){return 2==this.state_}; e.peerWindowObject_=null;e.iframeElement_=null;e.getConfig=function(){return this.cfg_}; e.getIframeElement=function(){return this.iframeElement_}; e.getTransportType=function(){return this.transport_.getType()}; e.getTransportName=function(){return this.transport_.getName()}; var oqa=function(a,b){var c=a.cfg_.ifrid;c||(c=a.cfg_.ifrid="xpcpeer"+kt(4));var d=ag(b).createElement("IFRAME");d.id=d.name=c;d.style.width=d.style.height="100%";mqa(a);a.peerWindowDeferred_=new bt(void 0,a);var f=nqa(a);Lq(a.peerLoadHandler_,d,"load",a.peerWindowDeferred_.callback,!1,a.peerWindowDeferred_);we||xe?window.setTimeout(Ta(function(){b.appendChild(d);wc(d,mh(f.toString()))},a),1):(wc(d,mh(f.toString())),b.appendChild(d))},mqa=function(a){a.peerWindowDeferred_&&(a.peerWindowDeferred_.cancel(), a.peerWindowDeferred_=null); a.deferredDeliveries_.length=0;a.peerLoadHandler_.removeAll()},nqa=function(a){var b=a.cfg_.pu; "string"===typeof b&&(b=a.cfg_.pu=new fq(b));var c={};c.cn=a.name;c.tp=a.cfg_.tp;c.osh=a.cfg_.osh;a.cfg_.lru&&(c.pru=a.cfg_.lru);a.cfg_.lpu&&(c.ppu=a.cfg_.lpu);a.cfg_.ppu&&(c.lpu=a.cfg_.ppu);(a=a.cfg_.role)&&(c.role=1==a?0:1);Wq(b,"xpc",tj(c));return b}; ut.prototype.connect=function(a){this.connectCb_=a||Ka;3==this.state_&&(this.state_=1);this.peerWindowDeferred_?gt(this.peerWindowDeferred_,this.continueConnection_):this.continueConnection_()}; ut.prototype.continueConnection_=function(){this.peerWindowDeferred_=null;this.cfg_.ifrid&&(this.iframeElement_=this.domHelper_.getElement(this.cfg_.ifrid));if(this.iframeElement_){var a=this.iframeElement_.contentWindow;a||(a=window.frames[this.cfg_.ifrid]);this.peerWindowObject_=a}if(!this.peerWindowObject_){if(window==window.top)throw Error("CrossPageChannel: Can't connect, peer window-object not set.");this.peerWindowObject_=window.parent}if(!this.transport_){this.cfg_.tp||(this.cfg_.tp="function"=== typeof document.postMessage||"function"===typeof window.postMessage||te&&window.postMessage?1:0);if("function"===typeof this.cfg_.tp)this.transport_=new this.cfg_.tp(this,this.domHelper_);else switch(this.cfg_.tp){case 1:this.transport_=new rt(this,this.cfg_.ph,this.domHelper_,!!this.cfg_.osh,this.cfg_.nativeProtocolVersion||2);break;case 2:if(a=this.peerWindowObject_)try{a=window.document.domain==this.peerWindowObject_.document.domain}catch(b){a=!1}a&&(this.transport_=new ot(this,this.domHelper_));}if(!this.transport_)throw Error("CrossPageChannel: No suitable transport found! You may try injecting a Transport constructor directly via the channel config object."); }for(this.transport_.connect();0=a;a||(b.getName(),c.get(b));return a}; zt.prototype.nonEmpty=function(a,b){(b=!b.has(a)||""!=b.get(a))||a.getName();return b};var uqa=function(a){this.logger=a;a=function(){return!0}; var b=this.required.bind(this),c=this.greaterOrEqualTo.bind(this,0),d=this.nonEmpty.bind(this);this.specifications={Version:{major_version:[b,c],minor_version:[b,c]},ProtocolVersion:{version:[b]},ClientVersion:{version:[b],platform:[b],language:[b,d],application_info:[b,d]},ClientToServerMessage:{header:[b],init_endpoint_message:[a],init_session_message:[a],client_data_message_deprecated:[a],send_on_disconnect_message:[a],close_session_message:[a]},ClientHeader:{protocol_version:[b],client_version:[b], client_time_ms:[b],max_known_server_time_ms:[b],message_id:[a]},SessionId:{service_name:[b,d],session_name:[a]},InitEndpointMessage:{},InitSessionMessage:{session_id:[b],subscriber_info:[a]},CloseSessionMessage:{session_id:[b]},SessionStatusMessage:{session_id:[b],address:[a,d],is_broadcast_to_user:[a],subscriber_info:[a],status:[a]},DataMessage:{session_id:[b],message:[b]},LcsPostmanInvalidation:{signal:[b],session_id:[b],ack_id:[b]},LcsSignal:{subscription_key:[b],message:[b]},LcsSubscriptionKey:{name:[b], topic_name:[b]},LcsPostmanMessage:{data:[a],trace_id:[a],publish_timestamp_micros:[b],is_suppressor:[a]},ServerToClientMessage:{header:[b],server_data_message:[a],postman_invalidation:[a],channel_status_message:[a],session_status_message:[a]},ServerHeader:{protocol_version:[b],server_time_ms:[b,c],message_id:[a,d]},StatusP:{code:[b],description:[a]},ChannelStatusMessage:{status:[b],jid_resource:[a]}}}; p(uqa,zt);var At=function(a,b){this.channel=a;this.serviceName=b;this.isOpen=!1}; e=At.prototype;e.toString=function(){return"HangingGetChannel("+this.sessionName+")"}; e.open=function(){this.isOpen=!0;this.channel.sendSubscription(this)}; e.getSubscriberInfo=function(){return this.subscriberInfo||null}; e.getServiceName=function(){return this.serviceName}; e.getSessionName=function(){return this.sessionName||null}; var Bt=function(a,b,c){At.call(this,a,b);this.sessionHandler=c}; p(Bt,At);Bt.prototype.handleAddressAssigned=function(a){var b=this.sessionHandler,c=a!=b.address_;b.address_=a;b.isOnline_=null!=b.address_;a=k(b.networkStatusReceivers_);for(var d=a.next();!d.done;d=a.next())d=d.value,d(b.isOnline_,c)}; Bt.prototype.handleSubscriberInfo=function(){}; var Ct=function(a,b,c){At.call(this,a,b);this.sessionHandler=c}; p(Ct,At);Ct.prototype.getSessionHandler=function(){return this.sessionHandler}; Ct.prototype.handleAddressAssigned=function(){}; Ct.prototype.handleSubscriberInfo=function(a){this.subscriberInfo=a;var b=this.sessionHandler;if(Dt(b))if(a===b.subscriberInfo)b.logger.warning("Received duplicate subscriber info from LCS");else{b.logger.info("Received new subscriber info from LCS");b.subscriberInfo=a;for(var c=k(b.registrations),d=c.next();!d.done;d=c.next()){var f=k(d.value);d=f.next().value;f=f.next().value;Et(b,f);0this.nextChannelReloadTimeMs&&(this.nextChannelReloadTimeMs=a+Math.ceil(18E5*Math.random()),this.close(),this.channelClosed(),this.browserChannel=void 0,this.open())}; e.close=function(){void 0!==this.browserChannel&&this.browserChannel.close()}; e.dispose=function(){this.close();this.hasBeenDisposed=!0}; e.isDisposed=function(){return this.hasBeenDisposed}; e.updateAuthParams=function(){if(Ooa.contains(this.authParams.getScheme())){var a=this.channelConfig.getFirstPartyAuthSchemeAndHash(this.authParams.getOrigin());if(null!=a){var b=a.scheme;a=a.hash;a!==this.authParams.getToken()&&(this.authParams.setScheme(Joa[b]),this.authParams.setToken(a))}else this.authParams.setToken("")}this.browserChannel&&this.browserChannel.updateAuthParams(this.authParams)}; e.channelOpened=function(){}; e.handleSessionStatusMessage=function(a){var b=a.getSessionId();if(null!=b){var c=b.getSessionName();if(null!=c){var d=this.getSession(b);if(null==d)for(var f=0;fthis.nextChannelReloadTimeMs&&(this.nextChannelReloadTimeMs=a+Math.ceil(18E5*Math.random()),this.close(),this.open())};var Bqa=function(a){return!!document.currentScript&&(-1!=document.currentScript.src.indexOf("?"+a)||-1!=document.currentScript.src.indexOf("&"+a))},Cqa=function(){return"function"==typeof window.__onGCastApiAvailable?window.__onGCastApiAvailable:null},Ht=function(a){a.length?Dqa(a.shift(),function(){Ht(a)}):It()},Eqa=function(a){return"chrome-extension://"+a+"/cast_sender.js"},Dqa=function(a,b,c){var d=document.createElement("script"); d.onerror=b;c&&(d.onload=c);xc(d,mh(a));(document.head||document.documentElement).appendChild(d)},It=function(){var a=Cqa(); a&&a(!1,"No cast extension found")},Gqa=function(){if(Fqa){var a=2,b=Cqa(),c=function(){a--; 0==a&&b&&b(!0)}; window.__onGCastApiAvailable=c;Dqa("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",It,c)}},Hqa=function(){Gqa(); var a=(a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/))?parseInt(a[1],10):0;var b=[];if(0!=a){var c=a-1;b.push("//www.gstatic.com/eureka/clank/"+a+"/cast_sender.js");b.push("//www.gstatic.com/eureka/clank/"+c+"/cast_sender.js")}b.push("//www.gstatic.com/eureka/clank/cast_sender.js");Ht(b)},Fqa=Bqa("loadCastFramework")||Bqa("loadCastApplicationFramework"),Iqa=["pkedcjkdefgpdelpbcmbmeomcjbeemfm", "enhhojjnijigcajfphajepfemndkmdlo"];var Jt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/navigation_request";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; Jt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Jt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Jt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Kt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/navigation_response";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"result"},{field_type:3,field_name:"page_type"},{field_type:3,field_name:"error_type"})}; Kt.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; Kt.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; Kt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Lt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/servlet_response_errors";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"code"},{field_type:3,field_name:"location"})}; Lt.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)}; Lt.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)}; Lt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Mt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/navigate_page_type";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"request_type"})}; Mt.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)}; Mt.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)}; Mt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Nt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/away_from_app_endpoint";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; Nt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Nt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Nt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Ot=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/bad_endpoint";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; Ot.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Ot.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Ot.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Pt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/forcer_cold_load";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:1,field_name:"url_not_polymer_compatible"},{field_type:1,field_name:"config_disable_warm_loads"})}; Pt.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; Pt.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; Pt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Qt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/page_request_fail";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; Qt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Qt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Qt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Rt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/load_page_request";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:1,field_name:"has_player"},{field_type:3,field_name:"data_page_type"},{field_type:1,field_name:"from_history"},{field_type:1,field_name:"from_miniplayer"})}; Rt.prototype.increment=function(a,b,c,d){this.streamzService_.incrementCounter(this.metricName_,a,b,c,d)}; Rt.prototype.incrementBy=function(a,b,c,d,f){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d,f)}; Rt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var St=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/page_chunk_received";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:2,field_name:"chunks_received"},{field_type:3,field_name:"data_page_type"},{field_type:3,field_name:"page_type"})}; St.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; St.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; St.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Tt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/page_request_finished";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"data_page_type"},{field_type:1,field_name:"from_history"},{field_type:1,field_name:"from_miniplayer"})}; Tt.prototype.increment=function(a,b,c,d){this.streamzService_.incrementCounter(this.metricName_,a,b,c,d)}; Tt.prototype.incrementBy=function(a,b,c,d,f){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d,f)}; Tt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Ut=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/page_update_finish";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"data_page_type"},{field_type:3,field_name:"from_history"})}; Ut.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; Ut.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; Ut.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Vt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/third_party_apisid_cookie_reissue_iframe";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"client_name"})}; Vt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Vt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Vt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Wt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/third_party_apisid_cookie_status";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:1,field_name:"js_readable"})}; Wt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Wt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Wt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Xt=function(){var a=Ym();this.metricName_="/client_streamz/youtube/web/debug/browser_cookie_setting";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:1,field_name:"cookie_enabled"})}; Xt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Xt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Xt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Yt=function(a){this.metricName_="/client_streamz/youtube/web/navigation_requests";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"load_type"})}; Yt.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)}; Yt.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)}; Yt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)};var Zt;Zt=["av.key","js","unreleased"].slice(-1)[0];var Jqa={NONE:0,EFP:1};var $t=function(){this.exposure=0;this.tabHidden=!1;this.backgroundedState=-1;this.isLargeAd=!1;this.screenShare=0}; $t.prototype.isVisible=function(){return this.isLargeAd?.3<=this.exposure:.5<=this.exposure}; $t.prototype.isFullyVisible=function(){return 1<=this.exposure};var au={CONTROL:0,EXPERIMENT:1},Kqa={668123728:0,668123729:1},Lqa={44728149:0,44728150:1},Mqa={44728138:0,44728139:1},Nqa={44727842:0,44727843:1},Oqa={44731964:0,44731965:1},Pqa={NONE:0,INTERSECTION_OBSERVER:1,GEOMETRIC:2},Qqa={480596784:0,480596785:1,21063355:2};var bu=function(){this.value_=null;this.consumesParameter_=this.addsToPing_=!1;this.experimentIdMapping_=null}; bu.prototype.consumesParameter=function(a){this.consumesParameter_=void 0===a?!0:a;return this}; var cu=function(a){a.addsToPing_=!0;return a},du=function(a,b){a.experimentIdMapping_=void 0===b?null:b}; bu.prototype.setExperimentIds=function(a){var b=this;this.experimentIdMapping_&&db(a,function(c){c=b.experimentIdMapping_[c];void 0!==c&&b.setValue(c)})}; bu.prototype.getValue=function(){return this.value_}; var eu=function(a){bu.call(this);this.legalValues_=a}; p(eu,bu);eu.prototype.setValue=function(a){if(null!==this.value_||!y.containsValue(this.legalValues_,a))return!1;this.value_=a;return!0}; var fu=function(){bu.call(this)}; p(fu,bu);fu.prototype.setValue=function(a){if(null!==this.value_||"number"!==typeof a)return!1;this.value_=a;return!0}; var gu=function(){bu.call(this)}; p(gu,bu);gu.prototype.setValue=function(a){if(null!==this.value_||"string"!==typeof a)return!1;this.value_=a;return!0};var hu=function(){this.features_={};this.allowExperiments_=!0;this.forcedFeatures_={}}; hu.prototype.disable=function(){this.allowExperiments_=!1}; hu.prototype.enable=function(){this.allowExperiments_=!0}; hu.prototype.isEnabled=function(){return this.allowExperiments_}; hu.prototype.reset=function(){this.features_={};this.allowExperiments_=!0;this.forcedFeatures_={}}; var iu=function(a,b,c){a.features_[b]||(a.features_[b]=new eu(c));return a.features_[b]}; hu.prototype.defineStringFeature=function(a){this.features_[a]||(this.features_[a]=new gu);return this.features_[a]}; var ju=function(a,b){if(y.containsKey(a.forcedFeatures_,b))return a.forcedFeatures_[b];if(a=a.features_[b])return a.getValue()},ku=function(a){var b={},c=y.filter(a.features_,function(d){return d.addsToPing_}); y.forEach(c,function(d,f){d=void 0!==a.forcedFeatures_[f]?String(a.forcedFeatures_[f]):d.addsToPing_&&null!==d.value_?String(d.value_):"";0f?encodeURIComponent(cra(a,b,c,d,f+1)):"...";return encodeURIComponent(String(a))},yu=function(a,b,c){a.allPriorities_.push(b); a.allPriorityLists_[b]=c}; vu.prototype.addParams=function(a){Qg(a,function(b,c){if(null!=b){var d=this.nextPriority_++;yu(this,d,wu(c,b))}},this)}; vu.prototype.getUrl=function(a,b,c,d){a=a+"//"+b+c;var f=dra(this)-c.length-d.length;if(0>f)return"";this.allPriorities_.sort(function(u,z){return u-z}); c=null;b="";for(var g=0;g=r.length){f-=r.length;a+=r;b=this.paramDelimiter_;break}c=null==c?l:c}}f="";this.truncationParam&&null!=c&&(f=b+this.truncationParam+"="+(this.truncationValue||c));return a+f+d}; var dra=function(a){if(!a.truncationParam)return a.maxPathLength_;var b=1,c;for(c in a.allPriorityLists_)b=c.length>b?c.length:b;return a.maxPathLength_-a.truncationParam.length-b-a.paramDelimiter_.length-1}; vu.prototype.setMaxPathLength=function(a){this.maxPathLength_=a};var zu=function(a,b){this.urlAndMetadata=a;this.depth=b},fra=function(){var a=uu(),b=Math.max(a.length-1,0),c=bra(a); a=c.topFullUrl;var d=c.topOriginOnly,f=c.ampCacheUrl,g=[];c=function(m,n){return null==m?n:m}; f&&g.push(new zu([f.url,f.isOriginOnly?2:0],c(f.depth,1)));d&&d!=f&&g.push(new zu([d.url,2],0));a.url&&a!=f&&g.push(new zu([a.url,0],c(a.depth,b)));var l=fb(g,function(m,n){return g.slice(0,g.length-n)}); !a.url||(f||d)&&a!=f||(d=Uda(a.url))&&l.push([new zu([d,1],c(a.depth,b))]);l.push([]);return fb(l,function(m){return era(b,m)})}; function era(a,b){var c=gb(b,function(f,g){return Math.max(f,g.depth)},-1),d=Eaa(c+2); d[0]=a;db(b,function(f){return d[f.depth+1]=f.urlAndMetadata}); return d} var gra=function(){var a=fra();return fb(a,function(b){return xu(b)})};var Au=function(){this.pageVisibility=new Yqa;this.performance_=ru()?new su:new qu}; e=Au.prototype;e.checkActiveViewRequirements=function(){var a=Rf.document;return!!(a&&a.body&&a.body.getBoundingClientRect&&"function"===typeof Rf.setInterval&&"function"===typeof Rf.clearInterval&&"function"===typeof Rf.setTimeout&&"function"===typeof Rf.clearTimeout)}; e.setInterval=function(a,b){return Rf.setInterval(a,b)}; e.clearInterval=function(a){Rf.clearInterval(a)}; e.setTimeout=function(a,b){return Rf.setTimeout(a,b)}; e.clearTimeout=function(a){Rf.clearTimeout(a)}; var hra=function(a){Bu();var b=Ih()||Rf;Yg(b,a,!1)}; Au.prototype.getPageSignals=function(){return gra()}; La(Au);var Cu=function(){}; Cu.prototype.getContext=function(){if(!this.context_){if(!Rf)throw Error("Context has not been set and window is undefined.");this.context_=Au.getInstance()}return this.context_}; Cu.prototype.setContext=function(a){this.context_=a}; La(Cu);var Bu=function(){return Cu.getInstance().getContext()};var Du=function(a){G(this,a,0,-1,null,null)}; v(Du,F);e=Du.prototype;e.toObject=function(a){var b={accumulatedTime:sf(this,1),usedHeapSize:qf(this,2),totalHeapSize:qf(this,3),heapSizeLimit:qf(this,4),threadEntryCount:qf(this,5)};a&&(b.$jspbMessageInstance=this);return b}; e.serializeBinary=function(){var a=new B;var b=this.getAccumulatedTime();0!==b&&a.writeDouble(1,b);b=this.getUsedHeapSize();0!==b&&a.writeInt64(2,b);b=this.getTotalHeapSize();0!==b&&a.writeInt64(3,b);b=this.getHeapSizeLimit();0!==b&&a.writeInt64(4,b);b=this.getThreadEntryCount();0!==b&&a.writeInt32(5,b);return D(a)}; e.getAccumulatedTime=function(){return sf(this,1)}; e.getUsedHeapSize=function(){return qf(this,2)}; e.getTotalHeapSize=function(){return qf(this,3)}; e.getHeapSizeLimit=function(){return qf(this,4)}; e.getThreadEntryCount=function(){return qf(this,5)};var Eu=function(a){this.context_=a;this.enterTime_=-1;this.threadEntryCount_=this.accumulatedTime_=0},Fu=function(a,b){return function(c){for(var d=[],f=0;fMath.random())}; Nu.prototype.disable=function(){this.collectionEnabled=!1;this.events!=this.installedWindow.google_js_reporting_queue&&(Mu()&&db(this.events,Ou),this.events.length=0)}; var Ou=function(a){a&&Lu&&Mu()&&(Lu.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),Lu.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_end"))}; Nu.prototype.start=function(a,b){if(!this.collectionEnabled)return null;var c=Ku()||Ju();a=new mra(a,b,c);b="goog_"+a.label+"_"+a.uniqueId+"_start";Lu&&Mu()&&Lu.mark(b);return a}; Nu.prototype.end=function(a){if(this.collectionEnabled&&"number"===typeof a.value){var b=Ku()||Ju();a.duration=b-a.value;b="goog_"+a.label+"_"+a.uniqueId+"_end";Lu&&Mu()&&Lu.mark(b);!this.collectionEnabled||2048b.height?m>r?(c=m,d=n):(c=r,d=u):m=this.inherentVisibleGeometryCapability_?a:this;b!==this.effectiveViewportProvider?(this.effectiveViewportProvider==this||1==c&&0!=this.inherentVisibleGeometryCapability_||this.shutdown(),this.isActive_=this.effectiveViewportProvider.isActive_,iv(this)):this.isActive_!==this.effectiveViewportProvider.isActive_&&(this.isActive_=this.effectiveViewportProvider.isActive_, iv(this))}; var Nra=function(a,b){var c=a.alwaysSendUpdates||!a.currentObservation.equals(b,a.volumeRequired_);a.currentObservation=b;c&&Pra(a)}; hv.prototype.handleViewportObservationUpdate=function(a){a.originatingProvider===this.effectiveViewportProvider&&Nra(this,a)}; hv.prototype.requiresVolume=function(){return this.volumeRequired_}; hv.prototype.dispose=function(){this.disposed_=!0}; hv.prototype.isDisposed=function(){return this.disposed_};var lv=function(a,b,c,d){this.element=a;this.elementGeometry=new Ug(0,0,0,0);this.containerGeometry=null;this.frameVisibleGeometry=new Ug(0,0,0,0);this.viewportProvider=b;this.featureSet=c;this.requiresVolume_=d;this.disposed_=!1;this.isEventBasedMeasurement=!0;this.timestamp=-1;this.currentMeasurement=new av(b.getViewportObservation(),this.element,this.elementGeometry,new Ug(0,0,0,0),0,0,Zu(),0)}; e=lv.prototype;e.observe=function(){return!0}; e.unobserve=function(){}; e.dispose=function(){if(!this.isDisposed()){var a=this.viewportProvider;nb(a.observationListeners,this);a.volumeRequired_&&this.requiresVolume()&&Ora(a);this.unobserve();this.disposed_=!0}}; e.isDisposed=function(){return this.disposed_}; e.getLogParams=function(){return this.viewportProvider.getLogParams()}; e.getVisibleGeometryCapability=function(){return this.viewportProvider.getVisibleGeometryCapability()}; e.getFailureCode=function(){return this.viewportProvider.getFailureCode()}; e.hasFailed=function(){return this.viewportProvider.hasFailed()}; e.handleViewportProviderStatusUpdate=function(){}; e.handleViewportObservationUpdate=function(){this.calculateMeasurement()}; e.requiresVolume=function(){return this.requiresVolume_};var mv=function(a){this.disposed_=!1;this.viewportProvider=a;this.failureCallback=Ka}; e=mv.prototype;e.getVisibleGeometryCapability=function(){return this.viewportProvider.getVisibleGeometryCapability()}; e.getFailureCode=function(){return this.viewportProvider.getFailureCode()}; e.hasFailed=function(){return this.viewportProvider.hasFailed()}; e.create=function(a,b,c){var d=null;this.viewportProvider&&(d=this.createInstance(a,b,c),jv(this.viewportProvider,d));return d}; e.shouldBeUsedForMeasurement=function(){return this.canBeUsed()}; e.canBeUsed=function(){return!1}; e.init=function(a){return this.viewportProvider.initialize()?(jv(this.viewportProvider,this),this.failureCallback=a,!0):!1}; e.handleViewportProviderStatusUpdate=function(a){0==a.getVisibleGeometryCapability()&&this.failureCallback(a.getFailureCode(),this)}; e.handleViewportObservationUpdate=function(){}; e.requiresVolume=function(){return!1}; e.dispose=function(){this.disposed_=!0}; e.isDisposed=function(){return this.disposed_}; e.getLogParams=function(){return{}};var nv=function(a,b,c){this.priority_=void 0===c?0:c;this.key_=a;this.value_=null==b?"":b}; nv.prototype.getParameter=function(){return this.key_}; nv.prototype.getPriority=function(){return this.priority_}; var Qra=function(a){switch(Math.trunc(a.priority_)){case-16:return-16;case-8:return-8;case 0:return 0;case 8:return 8;case 16:return 16;default:return 16;}}; nv.prototype.lessThan=function(a){return this.priority_a.priority_?!1:this.key_a.key_?!1:typeof this.value_typeof a.value_?!1:this.value_=Math.abs(this.verificationMeasurement.exposure-this.baseMeasurement.exposure))}; wv.prototype.buildVerificationPing=function(){var a={};return a.b_name=this.baseMeasurement.strategyName,a.v_name=this.verificationMeasurement.strategyName,a.b_vp_off=JSON.stringify(this.baseMeasurement.offsetInViewport),a.v_vp_off=JSON.stringify(this.verificationMeasurement.offsetInViewport),a.b_vp_sz=JSON.stringify(this.baseMeasurement.viewportSize),a.v_vp_sz=JSON.stringify(this.verificationMeasurement.viewportSize),a.b_exp=this.baseMeasurement.exposure,a.v_exp=this.verificationMeasurement.exposure, a.efp_occ=this.baseMeasurement.usedEfpOcclusion,a.sbv=this.baseMeasurement.shouldUseViewportShareBasedVisibility,a};var xv=function(){uv.call(this,"capt");this.base_exposures_=[];this.verification_exposures_=[]}; p(xv,uv);xv.prototype.setCurrentFrameMeasurements=function(a,b){uv.prototype.setCurrentFrameMeasurements.call(this,a,b);20<=this.verification_exposures_.length||(this.base_exposures_.push(a.exposure),this.verification_exposures_.push(b.exposure))}; xv.prototype.shouldSendVerificationPing=function(){return 20===this.verification_exposures_.length}; xv.prototype.buildVerificationPing=function(){var a=Xra(this.base_exposures_,this.verification_exposures_),b=Yra(this.base_exposures_,this.verification_exposures_),c={};return c.b_name=this.baseMeasurement.strategyName,c.v_name=this.verificationMeasurement.strategyName,c.b_exp=this.base_exposures_.join(","),c.v_exp=this.verification_exposures_.join(","),c.diff=a,c.diff_buckets=b,c}; var Xra=function(a,b){return xaa(Gaa(a,b),function(c){return c[0]!==c[1]})},Yra=function(a,b){var c=function(d){return .25*Math.floor(d/.25)}; return Xra(fb(a,c),fb(b,c))};var yv=function(a,b,c,d,f){f=void 0===f?[new vv,new wv,new xv]:f;Sg.call(this);this.verificationStrategy_=a.createInstance(b,c,this.requiresVolume());this.verificationStrategy_.observe();this.verifications_=f;this.adKey_=d}; p(yv,Sg);yv.prototype.disposeInternal=function(){this.verificationStrategy_&&(this.verificationStrategy_.unobserve(),this.verificationStrategy_.dispose())}; var Zra=function(a,b,c){db(a.verifications_,function(d){var f=a.adKey_;if(!d.hasSentPing_&&(d.setCurrentFrameMeasurements(b,c),d.shouldSendVerificationPing())){d.hasSentPing_=!0;var g=d.buildVerificationPing(),l=new ov;l.add("id","av-js");l.add("type","verif");l.add("vtype",d.verificationGen204Type_);d=Wra.getInstance();l.add("i",d.sentPingCount_++);l.add("adk",f);pv(l,g);f=new qv(l);tv(f)}})}; yv.prototype.handleViewportObservationUpdate=function(){}; yv.prototype.handleViewportProviderStatusUpdate=function(){}; yv.prototype.requiresVolume=function(){return!1};var zv=function(){this.delta_=this.maxConsecutive_=this.currentConsecutive_=this.total_=0}; e=zv.prototype;e.getTotal=function(){return this.total_}; e.getMaxConsecutive=function(){return this.maxConsecutive_}; e.getCurrentConsecutive=function(){return this.currentConsecutive_}; e.getDelta=function(){return this.delta_}; e.resetDelta=function(){this.delta_=0}; e.update=function(a,b,c){a&&(this.total_+=b,this.delta_+=b,this.currentConsecutive_+=b,this.maxConsecutive_=Math.max(this.maxConsecutive_,this.currentConsecutive_));if(void 0===c?!a:c)this.currentConsecutive_=0};var $ra=[1,.75,.5,.3,0],Av=function(a){this.thresholds_=a=void 0===a?$ra:a;this.buckets_=fb(this.thresholds_,function(){return new zv})}; Av.prototype.getTotal=function(a){return Bv(this,function(b){return b.getTotal()},void 0===a?!0:a)}; var asa=function(a,b){return Cv(a,b,function(c){return c.getTotal()})}; Av.prototype.getMaxConsecutive=function(a){return Bv(this,function(b){return b.getMaxConsecutive()},void 0===a?!0:a)}; var bsa=function(a,b){return Cv(a,b,function(c){return c.getMaxConsecutive()})}; e=Av.prototype;e.getCurrentConsecutive=function(){return Bv(this,function(a){return a.getCurrentConsecutive()},!0)}; e.getDelta=function(){return Bv(this,function(a){return a.getDelta()},!0)}; e.getDeltaForThreshold=function(a){return Cv(this,a,function(b){return b.getDelta()})}; e.resetDelta=function(){db(this.buckets_,function(a){return a.resetDelta()})}; e.update=function(a,b,c,d,f,g){g=void 0===g?!0:g;b=f?Math.min(a,b):b;for(f=0;f=l;l=!(0=l)||c;this.buckets_[f].update(g&&m,d,!g||l)}}; var Bv=function(a,b,c){a=fb(a.buckets_,function(d){return b(d)}); return c?a:csa(a)},Cv=function(a,b,c){var d=yaa(a.thresholds_,function(f){return b<=f}); return-1==d?0:c(a.buckets_[d])},csa=function(a){return fb(a,function(b,c,d){return 0=this.requiredViewTime}; e.isCurrentlyViewable=function(){return this.viewTime_.getCurrentConsecutive()>=this.requiredViewTime};var dsa=new Ug(0,0,0,0);function Ev(a,b){b=Fv(b);return 0===b?0:Fv(a)/b} function Fv(a){return Math.max(a.bottom-a.top,0)*Math.max(a.right-a.left,0)} function esa(a,b){if(!a||!b)return!1;for(var c=0;null!==a&&100>c++;){if(a===b)return!0;try{if(a=yg(a)||a){var d=$f(a),f=d&&lg(d),g=f&&f.frameElement;g&&(a=g)}}catch(l){break}}return!1} function fsa(a,b,c){if(!a||!b)return!1;b=a.clone().translate(-b.left,-b.top);a=(b.left+b.right)/2;b=(b.top+b.bottom)/2;var d=Ih();Pg(d.top)&&d.top&&d.top.document&&(d=d.top);if(!Ara(d))return!1;a=d.document.elementFromPoint(a,b);if(!a)return!1;b=(b=(b=$f(c))&&b.defaultView&&b.defaultView.frameElement)&&esa(b,a);d=a===c;a=!d&&a&&Lg(a,function(f){return f===c}); return!(b||d||a)} function gsa(a,b,c,d){return ev.getInstance().insideCrossDomainIframe?!1:0>=a.getWidth()||0>=a.getHeight()?!0:c&&d?sra(208,function(){return fsa(a,b,c)}):!1} ;var hsa=new Ug(0,0,0,0),Gv=function(a,b,c){Sg.call(this);this.position=hsa.clone();this.measurementData=new Dv;this.loadTimeExposure=-2;this.timeCreated=Date.now();this.timestampViewedByUser=-1;this.lastUpdateTime=b;this.lastMeasurement_=null;this.elementLoaded_=!1;this.offsetInViewport=null;this.opacity=-1;this.requestSource=c;this.unmeasurableImpressionCallback=this.measurementUpdateCallback=Ka;this.creativeSearchResults=new Tqa;this.creativeSearchResults.markedUpElement=a;this.creativeSearchResults.monitoredElement= a;this.isUnmeasurableImpression=!1;this.contextualEventHandlers_={mouseOver:null,mouseOut:null};this.shouldSendTimeOnScreenPing=!0;this.strategyVerifier_=null;this.inFullscreenMode=this.isPedestalAd=!1;this.adBlockId=Gu.getInstance().nextAdBlockId++;this.lastComputedExposure_=0;this.lastAdState=new $t;this.timeLastSeen=this.timeFirstSeen=-1;this.hoverTime_=0;this.hoverStartTime_=-1;this.measurementStrategy=null;this.visibleBox=new Ug(0,0,0,0);this.isCoReRequest=!1;a=this.featureSet=new hu;iu(a,"od", Jqa);cu(iu(a,"opac",au));cu(iu(a,"sbeos",au));cu(iu(a,"prf",au));cu(iu(a,"mwt",au));iu(a,"iogeo",au);(a=this.creativeSearchResults.markedUpElement)&&a.getAttribute&&nu(a,"googleAvInapp")&&(ev.getInstance().inAppContext=!0);1==this.requestSource?(a=this.featureSet.features_.od)&&a.setValue(1):(a=this.featureSet.features_.od)&&a.setValue(0)}; p(Gv,Sg);e=Gv.prototype; e.disposeInternal=function(){Hv(this);this.strategyVerifier_&&this.strategyVerifier_.dispose();this.measurementStrategy&&this.measurementStrategy.dispose();delete this.measurementData;delete this.measurementUpdateCallback;delete this.unmeasurableImpressionCallback;delete this.creativeSearchResults.markedUpElement;delete this.creativeSearchResults.monitoredElement;delete this.contextualEventHandlers_;delete this.strategyVerifier_;delete this.measurementStrategy;delete this.featureSet;Sg.prototype.disposeInternal.call(this)}; e.getMeasurementStrategy=function(){return this.measurementStrategy}; e.getPosition=function(){return this.measurementStrategy?this.measurementStrategy.elementGeometry:this.position}; e.getContainerPosition=function(){return this.measurementStrategy?this.measurementStrategy.containerGeometry:null}; e.processActiveViewMetadata=function(a){Gu.getInstance().processActiveViewMetadata(a)}; e.processFlags=function(a){Gu.getInstance().processFlags(a)}; e.requiresVolume=function(){return!1}; e.setElementLoaded=function(){this.elementLoaded_=!0}; e.isReadyForMeasurement=function(){return this.elementLoaded_}; e.resetFractionOnScreenValues=function(){this.lastAdState.exposure=0}; e.resetTimeOnScreenTimers=function(){this.measurementData=new Dv}; e.setFullscreenMode=function(a){if(a!=this.inFullscreenMode){this.inFullscreenMode=a;var b=ev.getInstance();a?b.fullscreenAdblockCount_++:0=(this.isLargeAd()?.3:.5),this.measurementData.update(g,f,this.lastAdState,d),this.lastUpdateTime=b,0=Fv(a.getPosition())?!1:vsa(a)&&!a.cpmavViewUrlInvoked}; e=Kv.prototype;e.updateElementToMeasure=function(a){Hv(this);this.creativeSearchResults.monitoredElement=a;lsa(this);psa(this,a);if(this.measurementStrategy){var b=this.measurementStrategy;b.unobserve();b.element=a;b.observe();b.calculateMeasurement()}}; e.shouldSendImmediatePing=function(){return this.immediatePingEnabled&&!this.activeviewImmediatePingSent}; e.isGpt=function(){return 3==this.requestSource}; e.setRecheckedActiveViewDivs=function(){this.recheckedActiveViewDivs_=!0}; e.setRenderStartTimeFromEpoch=function(a){-1==this.timeRenderStartedFromEpoch_&&(this.timeRenderStartedFromEpoch_=a)}; e.setAdDomLoadingTime=function(a){-1==this.timeAdDomLoadingFromEpoch_&&(this.timeAdDomLoadingFromEpoch_=this.timeRenderStartedFromEpoch_+a)}; e.setScrollDepthAtRenderStart=function(a){this.renderStartScrollDepth_=a}; e.getScrollDepthAtRenderStart=function(){return this.renderStartScrollDepth_}; e.requiresVolume=function(){return!1}; e.hasMetricsChangeListener=function(){return void 0!==this.metricsChangeCallback_};var xsa=function(a){this.reporter_=a;this.key="goog_adspeed";this.validEvents=[3,4];this.cachedPayload_=null}; xsa.prototype.maybeSend=function(a,b,c){if(!mb(this.validEvents,c)||!Mv(a).isValid())return!1;c={};c=(c[0]=this.key,c[40]=tj(Ov(a)),c);if(this.cachedPayload_&&(0,y.equals)(this.cachedPayload_,c))return!1;this.cachedPayload_=c;var d={};(0,y.extend)(d,c,b);return this.reporter_.report(a,0,{urlParams:{},messageParams:d})};var Pv=function(a){this.reporter_=a;this.key="goog_update_data";this.validEvent=0;this.viewedMessageSent_=!1}; Pv.prototype.maybeSend=function(a,b,c){if(c!=this.validEvent||!Mv(a).isValid())return!1;c=1==a.listenerMode;var d=a.isViewed(),f={},g={};b={messageParams:(f[0]=this.key,f[40]=tj(Ov(a)),f),urlParams:Object.assign({},b,(g.r=b.r,g))};if(c)return d&&!this.viewedMessageSent_?(this.viewedMessageSent_=d,this.reporter_.report(a,0,b)):!1;this.viewedMessageSent_=d;return this.reporter_.report(a,0,b)};var ysa=function(a){Pv.call(this,a);this.key="goog_image_request";this.validEvent=2}; p(ysa,Pv);var Qv=function(a){Pv.call(this,a);this.key="goog_image_request";this.validEvent=1}; p(Qv,Pv);Qv.prototype.maybeSend=function(a,b,c){var d=a.isViewed()&&a.shouldSendTimeOnScreenPing,f=!a.activeviewPingSent;if(d||f){if(b=Pv.prototype.maybeSend.call(this,a,b,c))if(a.isViewed()||(a.activeviewPingSent=!0),a.isViewed()||a.shouldSendTimeOnScreenPing)a.shouldSendTimeOnScreenPing=!1;return b}return!1};var Rv=function(a,b,c,d){lv.call(this,a,b,c,d)}; p(Rv,lv);e=Rv.prototype;e.calculateElementGeometry=function(){if(this.element){var a=this.element,b=this.viewportProvider.getWindow();try{try{var c=Gra(a.getBoundingClientRect())}catch(r){c=new Ug(0,0,0,0)}var d=c.right-c.left,f=c.bottom-c.top,g=wh(a,b),l=g.x,m=g.y;var n=new Ug(Math.round(m),Math.round(l+d),Math.round(m+f),Math.round(l))}catch(r){n=dsa.clone()}this.elementGeometry=n}}; e.calculateFrameVisibleGeometry=function(){this.frameVisibleGeometry=this.viewportProvider.getViewportObservation().visibleGeometry}; e.isElementHidden=function(a){var b=1==ju(this.featureSet,"od");return gsa(a,this.frameVisibleGeometry,this.element,b)}; e.calculateMeasurement=function(){this.timestamp=Zu();this.calculateElementGeometry();if(1===ju(Gu.getInstance().featureSet,"vcm")&&this.element&&"number"===typeof this.element.videoWidth&&"number"===typeof this.element.videoHeight){var a=this.element,b=new Yf(a.videoWidth,a.videoHeight);this.containerGeometry=this.elementGeometry;a=this.elementGeometry;var c=a.getWidth(),d=a.getHeight(),f=b.width;b=b.height;0>=f||0>=b||0>=c||0>=d||(f/=b,b=c/d,a=a.clone(),f>b?(c/=f,d=(d-c)/2,0=a.bottom||a.left>=a.right?new Ug(0,0,0,0):a;a=this.viewportProvider.getViewportObservation(); b=f=d=0;0<(this.elementGeometry.bottom-this.elementGeometry.top)*(this.elementGeometry.right-this.elementGeometry.left)&&(this.isElementHidden(c)?c=new Ug(0,0,0,0):(d=ev.getInstance().screenSize,b=new Ug(0,d.height,d.width,0),d=Ev(c,this.elementGeometry),f=Ev(c,ev.getInstance().browserViewportBox),b=Ev(c,b)));c=c.top>=c.bottom||c.left>=c.right?new Ug(0,0,0,0):c.translate(-this.elementGeometry.left,-this.elementGeometry.top);fv()||(f=d=0);this.currentMeasurement=new av(a,this.element,this.elementGeometry, c,d,f,this.timestamp,b)}; e.getName=function(){return this.viewportProvider.getName()};var Sv=function(){this.videoInstreamAdBlocks_=[];this.displayAdBlocks_=[]}; Sv.prototype.findDisplayAdBlockByAdBlockId=function(a){return kb(this.displayAdBlocks_,function(b){return a.matches(Mv(b))})}; var Tv=function(a,b){return b?kb(a.displayAdBlocks_,function(c){return c.creativeSearchResults.markedUpElement==b}):null},zsa=function(a,b){return kb(a.videoInstreamAdBlocks_,function(c){return c.queryID==b})},Asa=function(a,b){return b?kb(a.videoInstreamAdBlocks_,function(c){return c.creativeSearchResults.markedUpElement==b}):null},Bsa=function(a){return kb(a.displayAdBlocks_,function(){return!1})}; Sv.prototype.findAdBlockByQueryID=function(a){return zsa(this,a)||Bsa(this)}; var Uv=function(a){return 0==a.videoInstreamAdBlocks_.length?a.displayAdBlocks_:0==a.displayAdBlocks_.length?a.videoInstreamAdBlocks_:pb(a.displayAdBlocks_,a.videoInstreamAdBlocks_)}; Sv.prototype.reset=function(){this.videoInstreamAdBlocks_=[];this.displayAdBlocks_=[]}; Sv.prototype.addVideoAdBlock=function(a){this.videoInstreamAdBlocks_.push(a)}; var Csa=function(a,b){a=a.displayAdBlocks_;var c=lb(a,function(d){return d==b}); return-1!=c?(a.splice(c,1),b.measurementStrategy&&b.measurementStrategy.unobserve(),b.dispose(),!0):!1},Dsa=function(a){var b=Vv; if(Csa(b,a)){a=function(){return null}; a=function(){return Bsa(b)}; for(var c=a();c;c=a())Csa(b,c)}}; Sv.prototype.mergeIntoVideoAdBlocks=function(a,b){var c=this;a=eb(a,(void 0===b?0:b)?function(d){return!zsa(c,d.queryID)}:function(d){return!Asa(c,d.creativeSearchResults.markedUpElement)}); this.videoInstreamAdBlocks_.push.apply(this.videoInstreamAdBlocks_,fa(a));return a}; var Esa=function(a){var b=Vv,c=[];db(a,function(d){d.creativeSearchResults.markedUpElement&&null==Tv(b,d.creativeSearchResults.markedUpElement)&&(b.displayAdBlocks_.push(d),c.push(d))})}; Sv.prototype.mergeIntoFlashVideoAdBlocks=function(a){var b=this,c=[];db(a,function(d){hb(b.videoInstreamAdBlocks_,function(f){return f.creativeSearchResults.markedUpElement===d.creativeSearchResults.markedUpElement&&f.sdkID===d.sdkID&&f.queryID===d.queryID})||(b.videoInstreamAdBlocks_.push(d),c.push(d))}); return c}; Sv.prototype.hasAdBlockInFullscreenMode=function(){return hb(Uv(this),function(a){return a.inFullscreenMode})}; La(Sv);var Vv=Sv.getInstance();var Wv=function(a,b,c,d){lv.call(this,a,b,c,d);this.currentMeasurement=new av(b.getViewportObservation(),this.element,new Ug(0,0,0,0),new Ug(0,0,0,0),1,1,Zu(),1)}; p(Wv,lv);Wv.prototype.getName=function(){return"a100"}; Wv.prototype.calculateMeasurement=function(){this.currentMeasurement=new av(this.viewportProvider.getViewportObservation(),this.element,new Ug(0,0,0,0),new Ug(0,0,0,0),1,1,Zu(),1)};var Xv=function(a){mv.call(this,new hv(a,2))}; p(Xv,mv);Xv.prototype.getName=function(){return"a100"}; Xv.prototype.shouldBeUsedForMeasurement=function(){return!0}; Xv.prototype.createInstance=function(a,b,c){return new Wv(a,this.viewportProvider,b,c)};var Yv=function(a,b,c,d){lv.call(this,a,b,c,d);this.isEventBasedMeasurement_=!1;this.screenShare_=this.visibleFraction_=0}; p(Yv,lv);Yv.prototype.handleExternalMeasurement=function(a){var b=a.position;this.elementGeometry=new Ug(b.top,b.right,b.bottom,b.left);this.visibleFraction_=a.exposure||0;this.screenShare_=a.screenShare;b=ev.getInstance();var c=a.insideIframe;void 0!==c&&0==c&&(b.insideCrossDomainIframe=!1);a.documentSize&&(b.documentSize=new Yf(a.documentSize.width,a.documentSize.height));a.viewportSize&&(b.browserViewportBox=new Ug(0,a.viewportSize.width,a.viewportSize.height,0))}; Yv.prototype.getName=function(){return"exc"}; Yv.prototype.calculateMeasurement=function(){this.currentMeasurement=new av(this.viewportProvider.getViewportObservation(),this.element,this.elementGeometry,new Ug(0,0,0,0),this.visibleFraction_,0,Zu(),this.screenShare_)};var Zv=function(){mv.call(this,new hv(Rf,2))}; p(Zv,mv);Zv.prototype.getName=function(){return"exc"}; Zv.prototype.shouldBeUsedForMeasurement=function(){return!0}; Zv.prototype.canBeUsed=function(){return!0}; Zv.prototype.createInstance=function(a,b,c){return new Yv(a,this.viewportProvider,b,c)};var $v=function(){this.selectedStrategy_=this.availableStrategies_=null}; $v.prototype.selectStrategy=function(a){if(null==this.availableStrategies_)return!1;var b=function(c,d){a(c,d)}; (this.selectedStrategy_=kb(this.availableStrategies_,function(c){return null!=c&&c.shouldBeUsedForMeasurement()}))&&(this.selectedStrategy_.init(b)?kv(this.selectedStrategy_.viewportProvider):a(this.selectedStrategy_.viewportProvider.getFailureCode(),this.selectedStrategy_)); return null!=this.selectedStrategy_}; La($v);var aw=function(a){var b=Fsa(a);mv.call(this,b.length?b[b.length-1]:new hv(Rf,0));this.selectedProviders_=b;this.activeProvider_=null;this.availableProviders_=a}; p(aw,mv);e=aw.prototype;e.getAvailableProviders=function(){return[].concat(this.availableProviders_)}; e.getName=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getName()}; e.getLogParams=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getLogParams()}; e.getVisibleGeometryCapability=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getVisibleGeometryCapability()}; e.init=function(a){var b=!1;db(this.selectedProviders_,function(c){c.initialize()&&(b=!0)}); b&&(this.failureCallback=a,jv(this.viewportProvider,this));return b}; e.dispose=function(){db(this.selectedProviders_,function(a){a.shutdown();a.dispose()}); mv.prototype.dispose.call(this)}; e.shouldBeUsedForMeasurement=function(){return hb(this.selectedProviders_,function(a){return a.shouldBeUsedForMeasurement()})}; e.canBeUsed=function(){return hb(this.selectedProviders_,function(a){return a.canBeUsed()})}; e.createInstance=function(a,b,c){return new Rv(a,this.viewportProvider,b,c)}; e.handleViewportObservationUpdate=function(a){this.activeProvider_=a.originatingProvider}; var Fsa=function(a){if(!a.length)return[];a=eb(a,function(c){return null!=c&&c.shouldBeUsedForMeasurement()}); for(var b=1;bc.time?b:c},a[0])}; e=bw.prototype;e.calculateMeasurement=function(){var a=cw(this);0this.effectiveViewportProvider.inherentVisibleGeometryCapability_&&(this.effectiveViewportProvider=this,iv(this)),this.inherentVisibleGeometryCapability_=a);return 2==a}; var Jsa=function(){if(Gu.getInstance().isInMobiStrategy)return 2;var a=ev.getInstance();return a.insideCrossDomainIframe||a.inAppContext?0:2}; La(fw);var gw={},Ksa=(gw[1]=function(){return new ew},gw[2]=function(){return new aw([fw.getInstance()])},gw);var hw=function(){this.selectedStrategy_=null;this.strategyMap_=Ksa}; hw.prototype.hasSelectedStrategy=function(){return null!=this.selectedStrategy_}; hw.prototype.selectStrategy=function(){a:{var a=ju(Gu.getInstance().featureSet,"mv");if(null!=a&&(a=this.strategyMap_[a])&&(a=a())&&a.canBeUsed())break a;a=null}this.selectedStrategy_=a;return null!=this.selectedStrategy_}; hw.prototype.getSelectedStrategy=function(){return this.selectedStrategy_}; La(hw);var iw=function(){this.done=!1;this.dbg={adBlocksRegistered:0,adBlocksFound:0,scrollTime:0,displayUpdates:0,initTime:-1,creativeOnLoadSearches:0,creativeOnDCLSearches:0,creativesAfterFirstSearch:0};this.protectedHandleTabVisibilityEvent_=null;this.isMonitoring=this.startMonitored_=!1;this.pingId_="";this.currentPageStats_=null;this.tabInViewTime_=0;this.sampler=new gv(this)}; iw.prototype.startMonitoring=function(a){var b=this;if(!this.startMonitored_){this.startMonitored_=!0;if(a){a=Uv(Vv);for(var c,d=0;d=Fv(f.getPosition())?2:f.isViewed()?4:3)||5!=f.requestSource){b.adk=f.adk||g+1;y.extend(b,Nv(f));c&&(b.avms=c.getName());b.itpl=Number(mu(f.creativeSearchResults.markedUpElement,"googleAvItpl"))||0;var l=f.shouldSendTimeOnScreenPing&&!f.isUnmeasurableImpression&&f.isViewed();g=new pw(function(){return y.clone(b)}); l?(l={},g.report(f,2,(l.id="lidar2",l.tsf=1,l)),f.shouldSendTimeOnScreenPing=!1):(l={},g.report(f,1,(l.id="lidar2",l)),f.activeviewPingSent=!0)}})}; Ysa.prototype.sendNoAdsFoundPing=function(a,b){b.nd=a;tv("//pagead2.googlesyndication.com/pagead/gen_204?id=lidar2&"+nw(b))}; var $sa=function(a,b){db(a,function(c,d){new sw(new pw(function(){b.adk=c.adk||d+1;y.extend(b,Nv(c));b.itpl=Number(mu(c.creativeSearchResults.markedUpElement,"googleAvItpl"))||0;return b})).maybeSend(c); c.shouldSendTimeOnScreenPing=!1})};var uw=function(a){rw.call(this,a,"lidar2")}; p(uw,rw);uw.prototype.maybeSend=function(a,b){b=void 0===b?{}:b;b.r="v";rw.prototype.maybeSend.call(this,a,b);a.activeviewPingSent=a.activeviewPingSent||this.sent_}; uw.prototype.meetsCriteria=function(a){return a.isViewed()&&!a.activeviewPingSent};var vw=["FRAME","IMG","IFRAME"],ata=/^[01](px)?$/;function bta(a){return"string"===typeof a?document.getElementById(a):a} function cta(a,b,c){var d=!0,f=!0;d=void 0===d?!0:d;f=void 0===f?!1:f;var g=void 0===g?!1:g;if(a=bta(a)){c||(c=function(E,T,la){E.addEventListener(T,la)}); for(var l=!1,m=function(E){l||(l=!0,b(E))},n,r,u=0;u l.length)a.suppressNoAdBlockPingDueToOsdMonitoring?lw.done=!0:xw("n");else{Qsa();var m=$v.getInstance();if(null==m.availableStrategies_){var n=gta();m.availableStrategies_=n}m.selectStrategy(function(r,u){yw(r,u)})?lw.done||(hta(),Rsa(),lw.startMonitoring(!1)):d.inAppContext?yw("w"):yw("i")}}else yw("pv")}}catch(r){throw Vv.reset(),xw("x"),r; }},jta=function(a){var b=Vv.displayAdBlocks_; Gu.getInstance().unmeasurableReason=a;db(b,function(c){return c.isUnmeasurableImpression=!0})},hta=function(){Bu().setTimeout(tra(176,function(){return xw("t")}),36E5)},yw=function(a,b){jta(a); xw(a,b)},xw=function(a,b){var c=Gu.getInstance(); if(1===ju(c.featureSet,"omid")){if("w"!==a&&"i"!==a&&!c.omidOnePixelImpressionHasOccurred)return}else if(c.isSellsideGma&&!c.webviewEverOnScreen)return;lw.sampler.cancel();if(!lw.done&&(c=Vv.displayAdBlocks_,jw(lw,c,!0),!lw.done)){var d=eb(c,function(g){return!g.activeviewPingSent}),f={}; a=(f.r=a,f);b&&y.extend(a,b.getLogParams());lw.dbg.adBlocksRegistered=Rf.__google_lidar_;f=kw(lw,Rf,!1);y.extend(a,f);0==d.length||Zsa(d,a,b);$sa(c,a);lw.done=!0}},kta=function(a,b,c,d){var f=new mw,g=new Vsa,l=Gu.getInstance(),m=new Kv(Rf,"",b,d,c,Ka,[],[new uw(new qw(f,g))]); c=l.monitor_.stopwatch_;msa(m,Fu(c,function(n){for(var r=[],u=0;u>>3;1!=g.tag_&&2!=g.tag_&&15!=g.tag_&&g.error_(l,m,"unexpected tag");g.state_=1;g.length_=0;g.countLengthBytes_=0} function c(n){g.countLengthBytes_++;5==g.countLengthBytes_&&n&240&&g.error_(l,m,"message length too long");g.length_|=(n&127)<<7*(g.countLengthBytes_-1);n&128||(g.state_=2,g.countMessageBytes_=0,g.messageBuffer_="undefined"!==typeof Uint8Array?new Uint8Array(g.length_):Array(g.length_),0==g.length_&&f())} function d(n){g.messageBuffer_[g.countMessageBytes_++]=n;g.countMessageBytes_==g.length_&&f()} function f(){if(15>g.tag_){var n={};n[g.tag_]=g.messageBuffer_;g.result_.push(n)}g.state_=0} for(var g=this,l=a instanceof Array?a:new Uint8Array(a),m=0;mb||3==b&&!f))if(d=200==d||206==d,4==b&&(8==c?Uy(this,7):7==c?Uy(this,8):d||Uy(this,3)),this.parser_||(this.parser_=Ava(this.xhr_),null==this.parser_&&Uy(this,5)),2this.pos_){var g=f.substr(this.pos_);this.pos_=f.length;try{var l=this.parser_.parse(g);null!= l&&this.dataHandler_&&this.dataHandler_(l)}catch(m){Uy(this,5);Vy(this);break a}}4==b?(0==f.length?Uy(this,4):Uy(this,2),Vy(this)):Uy(this,1)}}}catch(m){Uy(this,6),Vy(this)}};var Wy=function(a){this.logger_=null;this.xhrReader_=a;a=Ta(this.onData_,this);this.xhrReader_.dataHandler_=a;a=Ta(this.onStatusChange_,this);this.xhrReader_.statusHandler_=a;this.callbackMap_={};this.callbackOnceMap_={}}; e=Wy.prototype;e.on=function(a,b){var c=this.callbackMap_[a];c||(c=[],this.callbackMap_[a]=c);c.push(b);return this}; e.addListener=function(a,b){this.on(a,b);return this}; e.removeListener=function(a,b){var c=this.callbackMap_[a];c&&nb(c,b);(a=this.callbackOnceMap_[a])&&nb(a,b);return this}; e.once=function(a,b){var c=this.callbackOnceMap_[a];c||(c=[],this.callbackOnceMap_[a]=c);c.push(b);return this}; e.onData_=function(a){var b=this.callbackMap_.data;b&&Bva(this,a,b);(b=this.callbackOnceMap_.data)&&Bva(this,a,b);this.callbackOnceMap_.data=[]}; var Bva=function(a,b,c){for(var d={},f=0;fa&&b.setFullYear(b.getFullYear()-1900);return b}; e=RA.prototype;e.firstDayOfWeek_=NA.FIRSTDAYOFWEEK;e.firstWeekCutOffDay_=NA.FIRSTWEEKCUTOFFDAY;e.clone=function(){var a=new RA(this.date);a.firstDayOfWeek_=this.firstDayOfWeek_;a.firstWeekCutOffDay_=this.firstWeekCutOffDay_;return a}; e.getFullYear=function(){return this.date.getFullYear()}; e.getYear=function(){return this.getFullYear()}; e.getMonth=function(){return this.date.getMonth()}; e.getDate=function(){return this.date.getDate()}; e.getTime=function(){return this.date.getTime()}; e.getDay=function(){return this.date.getDay()}; e.getWeekday=function(){return((this.getDay()+6)%7-this.firstDayOfWeek_+7)%7}; e.getUTCFullYear=function(){return this.date.getUTCFullYear()}; e.getUTCMonth=function(){return this.date.getUTCMonth()}; e.getUTCDate=function(){return this.date.getUTCDate()}; e.getUTCDay=function(){return this.date.getDay()}; e.getUTCHours=function(){return this.date.getUTCHours()}; e.getUTCMinutes=function(){return this.date.getUTCMinutes()}; e.getUTCWeekday=function(){return((this.date.getUTCDay()+6)%7-this.firstDayOfWeek_+7)%7}; e.getNumberOfDaysInMonth=function(){return OA(this.getFullYear(),this.getMonth())}; e.getWeekNumber=function(){return oxa(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)}; e.getYearOfWeek=function(){return new Date(PA(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)).getFullYear()}; e.getDayOfYear=function(){for(var a=this.getDate(),b=this.getFullYear(),c=this.getMonth()-1;0<=c;c--)a+=OA(b,c);return a}; e.getTimezoneOffset=function(){return this.date.getTimezoneOffset()}; e.set=function(a){this.date=new Date(a.getFullYear(),a.getMonth(),a.getDate())}; e.setFullYear=function(a){this.date.setFullYear(a)}; e.setYear=function(a){this.setFullYear(a)}; e.setMonth=function(a){this.date.setMonth(a)}; e.setDate=function(a){this.date.setDate(a)}; e.setTime=function(a){this.date.setTime(a)}; e.setUTCFullYear=function(a){this.date.setUTCFullYear(a)}; e.setUTCMonth=function(a){this.date.setUTCMonth(a)}; e.setUTCDate=function(a){this.date.setUTCDate(a)}; e.add=function(a){if(a.years||a.months){var b=this.getMonth()+a.months+12*a.years,c=this.getYear()+Math.floor(b/12);b%=12;0>b&&(b+=12);var d=Math.min(OA(c,b),this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(d)}a.days&&(a=new Date(new Date(this.getYear(),this.getMonth(),this.getDate(),12).getTime()+864E5*a.days),this.setDate(1),this.setFullYear(a.getFullYear()),this.setMonth(a.getMonth()),this.setDate(a.getDate()),QA(this,a.getDate()))}; e.toIsoString=function(a){return[this.getFullYear(),Gc(this.getMonth()+1,2),Gc(this.getDate(),2)].join(a?"-":"")+""}; e.toUTCIsoString=function(a){return[this.getUTCFullYear(),Gc(this.getUTCMonth()+1,2),Gc(this.getUTCDate(),2)].join(a?"-":"")+""}; e.equals=function(a){return!(!a||this.getYear()!=a.getYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())}; e.toString=function(){return this.toIsoString()}; var QA=function(a,b){a.getDate()!=b&&a.date.setUTCHours(a.date.getUTCHours()+(a.getDate()b)throw Error("seconds must be at least -62135596800: "+b);if(253402300800<=b)throw Error("seconds must be less than 253402300800: "+b);if(0>c)throw Error("nanos must be at least 0: "+c);if(1E9<=c)throw Error("nanos must be less than 1000000000: "+c);if(!Number.isInteger(b))throw Error("seconds must be integer: "+b);if(!Number.isInteger(c))throw Error("nanos must be integer: "+c);return new TA(b,c)}catch(d){return null}}; TA.prototype.equals=function(a){return this.seconds===a.seconds&&this.nanos===a.nanos};var UA=function(a,b){this.low_=a|0;this.high_=b|0}; UA.prototype.toInt=function(){return this.low_}; var VA=function(a){return 4294967296*a.high_+(a.low_>>>0)}; UA.prototype.isSafeInteger=function(){var a=this.high_>>21;return 0==a||-1==a&&!(0==this.low_&&-2097152==this.high_)}; UA.prototype.toString=function(a){a=a||10;if(2>a||36>2);var c=Math.pow(a,b),d=WA(c,c/4294967296);c=this.div(d);d=Math.abs(VA(XA(this,c.multiply(d))));var f=10==a?""+d:d.toString(a);f.lengththis.compare(a)}; e.compare=function(a){return this.high_==a.high_?this.low_==a.low_?0:this.low_>>>0>a.low_>>>0?1:-1:this.high_>a.high_?1:-1}; e.negate=function(){var a=~this.low_+1|0;return WA(a,~this.high_+!a|0)}; e.add=function(a){var b=this.high_>>>16,c=this.high_&65535,d=this.low_>>>16,f=a.high_>>>16,g=a.high_&65535,l=a.low_>>>16;a=(this.low_&65535)+(a.low_&65535);l=(a>>>16)+(d+l);d=l>>>16;d+=c+g;b=(d>>>16)+(b+f)&65535;return WA((l&65535)<<16|a&65535,b<<16|d&65535)}; var XA=function(a,b){return a.add(b.negate())}; e=UA.prototype;e.multiply=function(a){if(YA(this))return this;if(YA(a))return a;var b=this.high_>>>16,c=this.high_&65535,d=this.low_>>>16,f=this.low_&65535,g=a.high_>>>16,l=a.high_&65535,m=a.low_>>>16;a=a.low_&65535;var n=f*a;var r=(n>>>16)+d*a;var u=r>>>16;r=(r&65535)+f*m;u+=r>>>16;u+=c*a;var z=u>>>16;u=(u&65535)+d*m;z+=u>>>16;u=(u&65535)+f*l;z=z+(u>>>16)+(b*a+c*m+d*l+f*g)&65535;return WA((r&65535)<<16|n&65535,z<<16|u&65535)}; e.div=function(a){if(YA(a))throw Error("division by zero");if(0>this.high_){if(this.equals(ZA)){if(a.equals($A)||a.equals(sxa))return ZA;if(a.equals(ZA))return $A;var b=1;if(0==b)b=this;else{var c=this.high_;b=32>b?WA(this.low_>>>b|c<<32-b,c>>b):WA(c>>b-32,0<=c?0:-1)}b=b.div(a).shiftLeft(1);if(b.equals(aB))return 0>a.high_?$A:sxa;c=XA(this,a.multiply(b));return b.add(c.div(a))}return 0>a.high_?this.negate().div(a.negate()):this.negate().div(a).negate()}if(YA(this))return aB;if(0>a.high_)return a.equals(ZA)? aB:this.div(a.negate()).negate();var d=aB;for(c=this;0<=c.compare(a);){b=Math.max(1,Math.floor(VA(c)/VA(a)));var f=Math.ceil(Math.log(b)/Math.LN2);f=48>=f?1:Math.pow(2,f-48);for(var g=bB(b),l=g.multiply(a);0>l.high_||0a?WA(b<>>32-a):WA(0,b<a?WA(this.low_>>>a|b<<32-a,b>>>a):32==a?WA(b,0):WA(b>>>a-32,0)}; var bB=function(a){return 0a?-9223372036854776000>=a?ZA:new UA(-a,-a/4294967296).negate():aB},WA=function(a,b){return new UA(a,b)},cB=function(a,b){if("-"==a.charAt(0))return cB(a.substring(1),b).negate(); var c=parseInt(a,b||10);if(9007199254740991>=c)return new UA(c%4294967296|0,c/4294967296|0);if(0==a.length)throw Error("number format error: empty string");if(0<=a.indexOf("-"))throw Error("number format error: interior \"-\" character: "+a);b=b||10;if(2>b||36g?(g=bB(Math.pow(b,g)),d=d.multiply(g).add(bB(l))):(d=d.multiply(c),d=d.add(bB(l)))}return d}, aB=WA(0,0),$A=WA(1,0),sxa=WA(-1,-1),txa=WA(4294967295,2147483647),ZA=WA(0,2147483648);var dB=function(a,b){this.value=a;this.isDecreasing=!!b}; dB.prototype.equals=function(a){if(this.isDecreasing!==a.isDecreasing)var b=!1;else if("string"===typeof this.value||"number"===typeof this.value)b=this.value===a.value;else if(this.value instanceof UA)b=a.value instanceof UA?this.value.equals(a.value):!1;else if(this.value instanceof Uint8Array){if(a.value instanceof Uint8Array){a:if(b=this.value,a=a.value,b.length!==a.length)b=!1;else{for(var c=0;ca.parts.length)b=!1;else{for(b=0;ba.length||(a=a[1],!Array.isArray(a)||1>a.length))){var b=a[0];if("noop"!=b&&"stop"!=b&&"close"!=b)for(b=1;ba||3==a&&!ve&&!this.xmlHttp_.getResponseText())){this.cancelled_||4!=a||7==b||(8==b||0>=c?mB(3):mB(2));Uq(this);var d=this.xmlHttp_.getStatus();this.lastStatusCode_=d;b=this.xmlHttp_.getResponseText();if(!b){var f=this;this.channelDebug_.debug(function(){return"No response text for uri "+f.requestUri_+" status "+d})}this.successful_=200==d; this.channelDebug_.xmlHttpChannelResponseMetaData(this.verb_,this.requestUri_,this.rid_,this.retryId_,a,d);if(this.successful_){if(this.decodeInitialResponse_&&!this.initialResponseDecoded_)if(c=Ixa(this))this.channelDebug_.xmlHttpChannelResponseText(this.rid_,c,"Initial handshake response via X-HTTP-Initial-Response"),this.initialResponseDecoded_=!0,this.safeOnRequestData_(c);else{this.successful_=!1;this.lastError_=3;nB(12);this.channelDebug_.warning("XMLHTTP Missing X_HTTP_INITIAL_RESPONSE ("+ this.rid_+")");this.cleanup_();Vq(this);return}this.decodeChunks_?(this.decodeNextChunks_(a,b),ve&&this.successful_&&3==a&&aoa(this)):(this.channelDebug_.xmlHttpChannelResponseText(this.rid_,b,null),this.safeOnRequestData_(b));4==a&&this.cleanup_();if(this.successful_&&!this.cancelled_)if(4==a)this.channel_.onRequestComplete(this);else this.successful_=!1,Sq(this)}else 400==d&&0a.length)return rB;a=a.substr(c,b);this.xmlHttpChunkStart_=c+b;return a}; e.cancel=function(){this.cancelled_=!0;this.cleanup_()}; e.ensureWatchDogTimer_=function(){this.watchDogTimeoutTime_=Wa()+this.timeout_;this.startWatchDogTimer_(this.timeout_)}; e.startWatchDogTimer_=function(a){if(null!=this.watchDogTimerId_)throw Error("WatchDog timer not null");this.watchDogTimerId_=oB(Ta(this.onWatchDogTimeout_,this),a)}; e.cancelWatchDogTimer_=function(){this.watchDogTimerId_&&(t.clearTimeout(this.watchDogTimerId_),this.watchDogTimerId_=null)}; e.onWatchDogTimeout_=function(){this.watchDogTimerId_=null;var a=Wa();0<=a-this.watchDogTimeoutTime_?this.handleTimeout_():(this.channelDebug_.warning("WatchDog timer called too early"),this.startWatchDogTimer_(this.watchDogTimeoutTime_-a))}; e.handleTimeout_=function(){this.channelDebug_.timeoutResponse(this.requestUri_);2!=this.type_&&(mB(3),nB(17));this.cleanup_();this.lastError_=2;Vq(this)}; e.dispatchFailure_=function(){if(!this.channel_.isClosed()&&!this.cancelled_)this.channel_.onRequestComplete(this)}; e.cleanup_=function(){Uq(this);Rg(this.readyStateChangeThrottle_);this.readyStateChangeThrottle_=null;this.pollingTimer_.stop();this.eventHandler_.removeAll();if(this.xmlHttp_){var a=this.xmlHttp_;this.xmlHttp_=null;a.abort();a.dispose()}}; e.getSuccess=function(){return this.successful_}; e.getLastError=function(){return this.lastError_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.getSessionId=function(){return this.sid_}; e.getRequestId=function(){return this.rid_}; e.getPostData=function(){return this.postData_}; e.getXhr=function(){return this.xmlHttp_}; e.getRequestStartTime=function(){return this.requestStartTime_}; e.safeOnRequestData_=function(a){try{this.channel_.onRequestData(this,a),mB(4)}catch(b){}};var Jxa=function(){this.bufferingProxyResult=this.handshakeResult=null};var Kxa=function(a,b){this.mapId=a;this.map=b;this.context=null};var tB=function(a){this.maxPoolSizeConfigured_=a||10;t.PerformanceNavigationTiming?(a=t.performance.getEntriesByType("navigation"),a=0=a.maxSize_:!1}; tB.prototype.getMaxSize=function(){return this.maxSize_}; var uB=function(a){return a.request_?1:a.requestPool_?a.requestPool_.size:0}; tB.prototype.hasRequest=function(a){return this.request_?this.request_==a:this.requestPool_?this.requestPool_.has(a):!1}; var vB=function(a,b){a.requestPool_?a.requestPool_.add(b):a.request_=b},Mxa=function(a,b){a.request_&&a.request_==b?a.request_=null:a.requestPool_&&a.requestPool_.has(b)&&a.requestPool_.delete(b)}; tB.prototype.cancel=function(){this.pendingMessages_=this.getPendingMessages();if(this.request_)this.request_.cancel(),this.request_=null;else if(this.requestPool_&&0!==this.requestPool_.size){for(var a=k(this.requestPool_.values()),b=a.next();!b.done;b=a.next())b.value.cancel();this.requestPool_.clear()}}; var Nxa=function(a){return null!=a.request_||null!=a.requestPool_&&0!==a.requestPool_.size}; tB.prototype.getPendingMessages=function(){if(null!=this.request_)return this.pendingMessages_.concat(this.request_.getPendingMessages());if(null!=this.requestPool_&&0!==this.requestPool_.size){for(var a=this.pendingMessages_,b=k(this.requestPool_.values()),c=b.next();!c.done;c=b.next())a=a.concat(c.value.getPendingMessages());return a}return qb(this.pendingMessages_)}; var Oxa=function(a,b){a.pendingMessages_=a.pendingMessages_.concat(b)},Pxa=function(a,b){if(null!=a.request_)return a.request_.cancel(),b(a.request_),!0; if(a.requestPool_&&0!==a.requestPool_.size){a=k(a.requestPool_.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.cancel(),b(c);return!0}return!1};var Qxa=function(a,b){var c=new pB;c.debug("TestLoadImage: loading "+a);if(t.Image){var d=new Image;d.onload=Ua(wB,c,d,"TestLoadImage: loaded",!0,b);d.onerror=Ua(wB,c,d,"TestLoadImage: error",!1,b);d.onabort=Ua(wB,c,d,"TestLoadImage: abort",!1,b);d.ontimeout=Ua(wB,c,d,"TestLoadImage: timeout",!1,b);t.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4); d.src=a}else b(!1)},wB=function(a,b,c,d,f){try{a.debug(c),b.onload=null,b.onerror=null,b.onabort=null,b.ontimeout=null,f(d)}catch(g){}};var Rxa=function(){this.parser_=new Fq},Sxa=function(a,b,c){var d=c||""; try{Zq(a,function(f,g){var l=f;Pa(f)&&(l=tj(f));b.push(d+g+"="+encodeURIComponent(l))})}catch(f){throw b.push(d+"type="+encodeURIComponent("_badmap")),f; }};var xB=function(a,b,c){return c&&c.internalChannelParams?c.internalChannelParams[a]||b:b},yB=function(a){this.clientVersion_=22; this.serverVersion_=0;this.outgoingMaps_=[];this.channelDebug_=new pB;this.connState_=new Jxa;this.hostPrefix_=this.backChannelUri_=this.forwardChannelUri_=this.path_=this.backChannelRequest_=this.httpSessionId_=this.httpSessionIdParam_=this.extraParams_=this.httpHeadersOverwriteParam_=this.initHeaders_=this.extraHeaders_=null;this.allowHostPrefix_=!0;this.nextMapId_=this.nextRid_=0;this.failFast_=xB("failFast",!1,a);this.enableStreaming_=this.deadBackChannelTimerId_=this.backChannelTimerId_=this.forwardChannelTimerId_= this.handler_=null;this.allowStreamingMode_=!0;this.lastStatusCode_=this.lastPostResponseArrayId_=this.lastArrayId_=-1;this.backChannelAttemptId_=this.backChannelRetryCount_=this.forwardChannelRetryCount_=0;this.baseRetryDelayMs_=xB("baseRetryDelayMs",5E3,a);this.retryDelaySeedMs_=xB("retryDelaySeedMs",1E4,a);this.forwardChannelMaxRetries_=xB("forwardChannelMaxRetries",2,a);this.forwardChannelRequestTimeoutMs_=xB("forwardChannelRequestTimeoutMs",2E4,a);this.xmlHttpFactory_=a&&a.xmlHttpFactory||void 0; this.backChannelRequestTimeoutMs_=void 0;this.readyStateChangeThrottleMs_=0;this.supportsCrossDomainXhrs_=a&&a.supportsCrossDomainXhr||!1;this.sid_="";this.forwardChannelRequestPool_=new tB(a&&a.concurrentRequestLimit);this.wireCodec_=new Rxa;this.fastHandshake_=a&&a.fastHandshake||!1;this.blockingHandshake_=a&&a.blockingHandshake||!1;a&&a.disableRedact&&this.channelDebug_.disableRedact();a&&a.forceLongPolling&&(this.allowStreamingMode_=!1);this.detectBufferingProxy_=!this.fastHandshake_&&this.allowStreamingMode_&& a&&a.detectBufferingProxy||!1;this.forwardChannelFlushedCallback_=void 0;this.handshakeRttMs_=0;this.bpDetectionDone_=!1;this.bpDetectionTimerId_=null;this.enableOriginTrials_=!a||!1!==a.enableOriginTrials}; e=yB.prototype;e.channelVersion_=8;e.state_=1;e.getServerVersion=function(){return this.serverVersion_}; e.getWireCodec=function(){return this.wireCodec_}; e.getChannelDebug=function(){return this.channelDebug_}; e.setChannelDebug=function(a){this.channelDebug_=a}; e.connect=function(a,b,c,d){this.channelDebug_.debug("connect()");this.enableOriginTrials_&&(this.channelDebug_.info("Origin Trials enabled."),Hi(Ta(this.runOriginTrials_,this,a)));nB(0);this.path_=a;this.extraParams_=b||{};c&&void 0!==d&&(this.extraParams_.OSID=c,this.extraParams_.OAID=d);this.enableStreaming_=this.allowStreamingMode_;ur(this)}; e.disconnect=function(){this.channelDebug_.debug("disconnect()");this.cancelRequests_();if(3==this.state_){var a=this.nextRid_++,b=this.forwardChannelUri_.clone();Wq(b,"SID",this.sid_);Wq(b,"RID",a);Wq(b,"TYPE","terminate");this.addAdditionalParams_(b);a=new qB(this,this.channelDebug_,this.sid_,a,void 0);a.type_=2;a.baseUri_=Rq(b.clone());b=!1;t.navigator&&t.navigator.sendBeacon&&(b=t.navigator.sendBeacon(a.baseUri_.toString(),""));!b&&t.Image&&(new Image().src=a.baseUri_,b=!0);b||(a.xmlHttp_=a.channel_.createXhrIo(null), a.xmlHttp_.send(a.baseUri_));a.requestStartTime_=Wa();Sq(a)}this.onClose_()}; e.getSessionId=function(){return this.sid_}; e.connectChannel_=function(){this.channelDebug_.debug("connectChannel_()");this.ensureInState_(1,0);this.forwardChannelUri_=this.getForwardChannelUri(this.path_);this.ensureForwardChannel_()}; e.runOriginTrials_=function(a){try{this.channelDebug_.info("Origin Trials invoked: "+a)}catch(b){}}; var zB=function(a){a.backChannelRequest_&&(sB(a),a.backChannelRequest_.cancel(),a.backChannelRequest_=null)}; yB.prototype.cancelRequests_=function(){zB(this);this.backChannelTimerId_&&(t.clearTimeout(this.backChannelTimerId_),this.backChannelTimerId_=null);vr(this);this.forwardChannelRequestPool_.cancel();this.forwardChannelTimerId_&&Txa(this)}; var Txa=function(a){"number"===typeof a.forwardChannelTimerId_&&t.clearTimeout(a.forwardChannelTimerId_);a.forwardChannelTimerId_=null}; e=yB.prototype;e.getExtraHeaders=function(){return this.extraHeaders_}; e.setExtraHeaders=function(a){this.extraHeaders_=a}; e.getInitHeaders=function(){return this.initHeaders_}; e.getHttpSessionId=function(){return this.httpSessionId_}; e.setReadyStateChangeThrottle=function(a){this.readyStateChangeThrottleMs_=a}; e.setSupportsCrossDomainXhrs=function(a){this.supportsCrossDomainXhrs_=a}; e.getHandler=function(){return this.handler_}; e.setHandler=function(a){this.handler_=a}; e.getAllowHostPrefix=function(){return this.allowHostPrefix_}; e.setAllowHostPrefix=function(a){this.allowHostPrefix_=a}; e.isBuffered=function(){return!this.enableStreaming_}; e.getAllowStreamingMode=function(){return this.allowStreamingMode_}; e.setAllowStreamingMode=function(a){this.allowStreamingMode_=a}; e.sendMap=function(a){this.outgoingMaps_.push(new Kxa(this.nextMapId_++,a));3==this.state_&&this.ensureForwardChannel_()}; e.setFailFast=function(a){this.failFast_=a;this.channelDebug_.info("setFailFast: "+a);if((Nxa(this.forwardChannelRequestPool_)||this.forwardChannelTimerId_)&&this.forwardChannelRetryCount_>wr(this)){var b=this;this.channelDebug_.info(function(){return"Retry count "+b.forwardChannelRetryCount_+" > new maxRetries "+wr(b)+". Fail immediately!"}); Pxa(this.forwardChannelRequestPool_,Ta(this.onRequestComplete,this))||(Txa(this),this.signalError_(2))}}; e.getForwardChannelMaxRetries=function(){return this.failFast_?0:this.forwardChannelMaxRetries_}; e.setForwardChannelMaxRetries=function(a){this.forwardChannelMaxRetries_=a}; e.setForwardChannelRequestTimeout=function(a){this.forwardChannelRequestTimeoutMs_=a}; e.getBackChannelMaxRetries=function(){return 3}; e.isClosed=function(){return 0==this.state_}; e.getState=function(){return this.state_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.getLastArrayId=function(){return this.lastArrayId_}; e.hasOutstandingRequests=function(){var a=0;this.backChannelRequest_&&a++;a+=uB(this.forwardChannelRequestPool_);return 0!=a}; e.ensureForwardChannel_=function(){Lxa(this.forwardChannelRequestPool_)||this.forwardChannelTimerId_||(this.forwardChannelTimerId_=!0,Hi(this.onStartForwardChannelTimer_,this),this.forwardChannelRetryCount_=0)}; e.maybeRetryForwardChannel_=function(a){if(uB(this.forwardChannelRequestPool_)>=this.forwardChannelRequestPool_.getMaxSize()-(this.forwardChannelTimerId_?1:0))return!1;if(this.forwardChannelTimerId_)return this.channelDebug_.debug("Use the retry request that is already scheduled."),this.outgoingMaps_=a.getPendingMessages().concat(this.outgoingMaps_),!0;if(1==this.state_||2==this.state_||this.forwardChannelRetryCount_>=wr(this))return!1;this.channelDebug_.debug("Going to retry POST");this.forwardChannelTimerId_= oB(Ta(this.onStartForwardChannelTimer_,this,a),this.getRetryTime_(this.forwardChannelRetryCount_));this.forwardChannelRetryCount_++;return!0}; e.onStartForwardChannelTimer_=function(a){this.forwardChannelTimerId_&&(this.forwardChannelTimerId_=null,this.startForwardChannel_(a))}; e.startForwardChannel_=function(a){this.channelDebug_.debug("startForwardChannel_");this.okToMakeRequest_()&&(1==this.state_?a||(this.open_(),this.state_=2):3==this.state_&&(a?this.makeForwardChannelRequest_(a):0==this.outgoingMaps_.length?this.channelDebug_.debug("startForwardChannel_ returned: nothing to send"):Lxa(this.forwardChannelRequestPool_)||(this.makeForwardChannelRequest_(),this.channelDebug_.debug("startForwardChannel_ finished, sent request"))))}; e.open_=function(){this.channelDebug_.debug("open_()");this.nextRid_=Math.floor(1E5*Math.random());var a=this.nextRid_++,b=new qB(this,this.channelDebug_,"",a,void 0),c=this.extraHeaders_;this.initHeaders_&&(c?(c=y.clone(c),y.extend(c,this.initHeaders_)):c=this.initHeaders_);null===this.httpHeadersOverwriteParam_&&b.setExtraHeaders(c);var d;if(this.fastHandshake_)a:{for(var f=d=0;fn)f=Math.max(0,d[m].mapId-100),l=!1;else try{Sxa(r,g,"req"+n+"_")}catch(u){c&&c(r)}}if(l){c=g.join("&");break a}}b=this.outgoingMaps_.splice(0,b);a.pendingMessages_= b;return c}; e.requeuePendingMaps_=function(a){this.outgoingMaps_=a.getPendingMessages().concat(this.outgoingMaps_)}; e.ensureBackChannel_=function(){this.backChannelRequest_||this.backChannelTimerId_||(this.backChannelAttemptId_=1,Hi(this.onStartBackChannelTimer_,this),this.backChannelRetryCount_=0)}; e.maybeRetryBackChannel_=function(){if(this.backChannelRequest_||this.backChannelTimerId_||3<=this.backChannelRetryCount_)return!1;this.channelDebug_.debug("Going to retry GET");this.backChannelAttemptId_++;this.backChannelTimerId_=oB(Ta(this.onStartBackChannelTimer_,this),this.getRetryTime_(this.backChannelRetryCount_));this.backChannelRetryCount_++;return!0}; e.onStartBackChannelTimer_=function(){this.backChannelTimerId_=null;this.startBackChannel_();if(this.detectBufferingProxy_&&!this.bpDetectionDone_)if(null==this.backChannelRequest_||0>=this.handshakeRttMs_)this.channelDebug_.warning("Skip bpDetectionTimerId_ "+this.backChannelRequest_+" "+this.handshakeRttMs_);else{var a=2*this.handshakeRttMs_;this.channelDebug_.info("BP detection timer enabled: "+a);this.bpDetectionTimerId_=oB(Ta(this.onBpDetectionTimer_,this),a)}}; e.onBpDetectionTimer_=function(){if(this.bpDetectionTimerId_){this.bpDetectionTimerId_=null;this.channelDebug_.info("BP detection timeout reached.");if(null!=this.backChannelRequest_.getXhr()){var a=this.backChannelRequest_.getXhr().getResponseText();a&&this.channelDebug_.warning("Timer should have been cancelled : "+a)}this.channelDebug_.info("Buffering proxy detected and switch to long-polling!");this.enableStreaming_=!1;this.bpDetectionDone_=!0;nB(10);zB(this);this.startBackChannel_()}else this.channelDebug_.warning("Invalid operation.")}; var sB=function(a){null!=a.bpDetectionTimerId_&&(a.channelDebug_.debug("Cancel the BP detection timer."),t.clearTimeout(a.bpDetectionTimerId_),a.bpDetectionTimerId_=null)}; e=yB.prototype; e.startBackChannel_=function(){if(this.okToMakeRequest_()){this.channelDebug_.debug("Creating new HttpRequest");this.backChannelRequest_=new qB(this,this.channelDebug_,this.sid_,"rpc",this.backChannelAttemptId_);null===this.httpHeadersOverwriteParam_&&this.backChannelRequest_.setExtraHeaders(this.extraHeaders_);this.backChannelRequest_.setReadyStateChangeThrottle(this.readyStateChangeThrottleMs_);var a=this.backChannelUri_.clone();Wq(a,"RID","rpc");Wq(a,"SID",this.sid_);Wq(a,"CI",this.enableStreaming_?"0": "1");Wq(a,"AID",this.lastArrayId_);this.addAdditionalParams_(a);Wq(a,"TYPE","xmlhttp");this.httpHeadersOverwriteParam_&&this.extraHeaders_&&Ny(a,this.httpHeadersOverwriteParam_,this.extraHeaders_);this.backChannelRequestTimeoutMs_&&this.backChannelRequest_.setTimeout(this.backChannelRequestTimeoutMs_);this.backChannelRequest_.xmlHttpGet(a,!0,this.hostPrefix_);this.channelDebug_.debug("New Request created")}}; e.okToMakeRequest_=function(){return!0}; e.onRequestData=function(a,b){if(0!=this.state_&&(this.backChannelRequest_==a||this.forwardChannelRequestPool_.hasRequest(a)))if(this.lastStatusCode_=a.getLastStatusCode(),!a.initialResponseDecoded_&&this.forwardChannelRequestPool_.hasRequest(a)&&3==this.state_){try{var c=this.wireCodec_.parser_.parse(b)}catch(d){c=null}if(Array.isArray(c)&&3==c.length){if(this.handlePostResponse_(c,a),1>=uB(this.forwardChannelRequestPool_)&&this.forwardChannelFlushedCallback_){try{this.forwardChannelFlushedCallback_()}catch(d){}this.forwardChannelFlushedCallback_= void 0}}else this.channelDebug_.debug("Bad POST response data returned"),this.signalError_(11)}else(a.initialResponseDecoded_||this.backChannelRequest_==a)&&vr(this),Ob(b)||(c=this.wireCodec_.parser_.parse(b),this.onInput_(c,a))}; e.handlePostResponse_=function(a,b){0==a[0]?this.handleBackchannelMissing_(b):(this.lastPostResponseArrayId_=a[1],b=this.lastPostResponseArrayId_-this.lastArrayId_,0a&&!this.isBuffered()&&0==this.backChannelRetryCount_}; e.correctHostPrefix=function(a){return this.allowHostPrefix_?this.handler_?this.handler_.correctHostPrefix(a):a:null}; e.onBackChannelDead_=function(){null!=this.deadBackChannelTimerId_&&(this.deadBackChannelTimerId_=null,zB(this),this.maybeRetryBackChannel_(),nB(19))}; e.clearDeadBackchannelTimer_=function(){null!=this.deadBackChannelTimerId_&&(t.clearTimeout(this.deadBackChannelTimerId_),this.deadBackChannelTimerId_=null)}; e.onRequestComplete=function(a){this.channelDebug_.debug("Request complete");var b=null;if(this.backChannelRequest_==a){vr(this);sB(this);this.backChannelRequest_=null;var c=2}else if(this.forwardChannelRequestPool_.hasRequest(a))b=a.getPendingMessages(),Mxa(this.forwardChannelRequestPool_,a),c=1;else return;this.lastStatusCode_=a.getLastStatusCode();if(0!=this.state_)if(a.successful_)1==c?(Fxa(a.postData_?a.postData_.length:0,Wa()-a.requestStartTime_,this.forwardChannelRetryCount_),this.ensureForwardChannel_(), this.onSuccess_(a)):this.ensureBackChannel_();else{var d=a.getLastError();if(3==d||0==d&&0=c[0].time-d.now();)c.shift().notification.observe(f);0a?b.lift(new nC(-1,b)):b.lift(new nC(a-1,b))}} var nC=function(a,b){this.count=a;this.source=b}; nC.prototype.call=function(a,b){return b.subscribe(new oC(a,this.count,this.source))}; var oC=function(a,b,c){LB.call(this,a);this.count=b;this.source=c}; p(oC,LB);oC.EMPTY=LB.EMPTY;oC.create=LB.create;oC.prototype.complete=function(){if(!this.isStopped){var a=this.source,b=this.count;if(0===b)return LB.prototype.complete.call(this);-1n.knowledgeTimestamp&&(n.knowledgeTimestamp=r);try{n.observer.next(m)}catch(J){}}break;case 2:if(r=M(n,vA,2)){n=new Mya;r=k(Lf(r,fA,1));for(u=r.next();!u.done;u=r.next()){var z=u.value,C=M(z,cA,1);u=z.getVersion();C&&u&&(z=of(I(z,2)),z=null=== z?void 0:z,(C=Yya(C))&&n.add(new MA(C,cB(u),z)))}r=n}else r=void 0;if(r&&(n=a,m=n.nonCausalStreams.get(m)||n.limboStreams.get(m)))for(n=k(r.changeList),r=n.next();!r.done;r=n.next()){r=r.value;r=new MA(r.objectId,r.version,r.payload);try{m.observer.next(r)}catch(J){}}break;case 5:if(n=a,r=n.causalStreams.get(m)||n.limboStreams.get(m)||n.nonCausalStreams.get(m))try{r.observer.complete(),tC(n,m)}catch(J){}}}if(g.hasStatus())switch(g.getStatus().getCode()){case 1:a.channel&&a.channel.close();}},a,b); b=[].concat(Array.from(a.causalStreams.entries())).concat(Array.from(a.nonCausalStreams.entries()));b.sort(function(g,l){return g[0]-l[0]}); b=k(b);for(var c=b.next();!c.done;c=b.next()){var d=k(c.value);c=d.next().value;d=d.next().value;sC(a,c,d)}b=k(a.limboStreams);for(c=b.next();!c.done;c=b.next())c=k(c.value),c.next(),c.next().value.observer.complete();a.limboStreams.clear();var f=a.channel;Xi(function(){a.channel===f&&a.delayGenerator.reset()},45E3)}; qC.prototype.watch=function(a,b){var c=this;b=void 0===b?{}:b;return new OB(function(d){var f,g=++c.streamNumber,l=null!==(f=b.projectOverride)&&void 0!==f?f:c.defaultProject;d=new Zya(d,l,a);c.causalStreams.set(g,d);c.newStreamSubject.next({});sC(c,g,d);return function(){tC(c,g)}})}; qC.prototype.watchWithStartTime=function(a,b,c){var d=this;c=void 0===c?{}:c;return new OB(function(f){var g,l=++d.streamNumber,m=null!==(g=c.projectOverride)&&void 0!==g?g:d.defaultProject;f=new rC(f,m,a,b);d.nonCausalStreams.set(l,f);d.newStreamSubject.next({});sC(d,l,f);return function(){tC(d,l)}})}; var Zya=function(a,b,c){this.observer=a;this.project=b;this.interestSet=c}; Zya.prototype.start=function(){return new $ya(this.observer,this.project,this.interestSet)}; var $ya=function(a,b,c){this.observer=a;this.project=b;this.interestSet=c}; $ya.prototype.advance=function(a){return new rC(this.observer,this.project,this.interestSet,a)}; var rC=function(a,b,c,d){this.observer=a;this.project=b;this.interestSet=c;this.knowledgeTimestamp=d}; function Sya(a){var b=new $z;b.setName(a);return b} function Tya(a){a.isPrivateToUser()?(a=new Rz,Bf(a,2,Qz[0],!0)):(a=new Rz,Bf(a,1,Qz[0],!0));return a} function Uya(a,b){var c=new Uz;b&&tf(c,2,2);a=k(a.parts);for(b=a.next();!b.done;b=a.next()){var d=b.value;b=new Wz;d.value instanceof UA?d.isDecreasing?Bf(b,4,Vz[0],d.value.toString()):Bf(b,2,Vz[0],d.value.toString()):"string"===typeof d.value?d.isDecreasing?Bf(b,3,Vz[0],d.value):Bf(b,1,Vz[0],d.value):"number"===typeof d.value?d.isDecreasing?Bf(b,9,Vz[0],d.value):Bf(b,10,Vz[0],d.value):d.value instanceof Uint8Array?d.isDecreasing?Bf(b,5,Vz[0],d.value):Bf(b,7,Vz[0],d.value):d.value instanceof TA&&( d.isDecreasing?(d=qxa(d.value),Df(b,11,Vz[0],d)):(d=qxa(d.value),Df(b,12,Vz[0],d)));Mf(c,1,b,Wz,void 0)}return c} function Yya(a){for(var b,c,d=[],f=k((null===(b=a.getPath())||void 0===b?void 0:Lf(b,Wz,1))||[]),g=f.next();!g.done;g=f.next())switch(g=g.value,gf(g,Vz[0])){case 4:d.push(eB(cB(I(g,4))));break;case 2:d.push(new dB(cB(I(g,2))));break;case 10:d.push(new dB(lf(g,10)));break;case 9:d.push(eB(new dB(lf(g,9))));break;case 3:d.push(eB(I(g,3)));break;case 1:d.push(new dB(g.getString()));break;case 7:d.push(new dB(of(I(g,7))));break;case 5:d.push(eB(of(I(g,5))));break;case 12:g=rxa(M(g,Jh,12));if(null===g)return null; d.push(new dB(g));break;case 11:g=rxa(M(g,Jh,11));if(null===g)return null;d.push(eB(g));break;default:return null;}switch(null===(c=a.getOwner())||void 0===c?void 0:gf(c,Qz[0])){case void 0:case 0:case 1:return vxa.apply(fB,fa(d));case 2:return wxa.apply(fB,fa(d));case 15:return null;default:return null;}} ;var aza={firstPartyUri:new fq("https://punctual-dev.corp.google.com"),thirdPartyUri:new fq("https://signaler-staging.sandbox.google.com")},bza=new Map(Object.entries({prod:{firstPartyUri:new fq("https://signaler-pa.clients6.google.com"),thirdPartyUri:new fq("https://signaler-pa.googleapis.com")},ytprod:{firstPartyUri:new fq("https://signaler-pa.youtube.com"),thirdPartyUri:new fq("https://signaler-pa.googleapis.com")},"dev-corp":aza,dev:aza}));var uC=function(){this.projectPath="/punctual/ytprod/youtube_live_chat_web";this.inferProject=!1}; uC.prototype.setAuthUser=function(a){this.authUser=a;return this}; uC.prototype.setOAuthTokens=function(a){this.oauthTokens=a;return this}; uC.prototype.inferProjectForMigrationFromTango=function(){this.inferProject=!0;return this}; uC.prototype.build=function(){if(this.oauthTokens)var a=new hB(this.oauthTokens);else if(this.apiKey)a=new gB(this.apiKey,this.authUser);else throw Error("An API key or OAuth token stream is required");var b=this.projectPath;if(!b.startsWith("/punctual/"))throw Error("Invalid Punctual project path does not start with /punctual/: "+b);var c=b.substring(10).split("/");if(2!==c.length)throw Error("Invalid Punctual path has an incorrect number of parts: "+b);b=k(c);c=b.next().value;b=b.next().value;if(c.startsWith("custom:"))c= new fq(decodeURIComponent(c.substring(7))),c={firstPartyUri:c,thirdPartyUri:c};else{var d=bza.get(c);if(!d)throw Error("Invalid Punctual environment: '"+c+"'");c=d}return Qya(c,a,this.inferProject?void 0:b)};var vC=function(a,b,c){this.maxSize=a;this.items=b;this.flushSeqno=c}; vC.prototype.advance=function(a){if("number"===typeof a)a=this.flushSeqno===a?{state:this.reset(),batch:this.items.slice()}:{state:this};else{var b=a.seqno,c,d=this.items.slice();d.push(a.value);a=d.length>=this.maxSize?{state:this.reset(),batch:d}:{state:new vC(this.maxSize,d,null!==(c=this.flushSeqno)&&void 0!==c?c:b)}}return a}; vC.prototype.reset=function(){return new vC(this.maxSize,[])}; function cza(a,b){return function(c){c=c.pipe(YB(function(f,g){return{value:f,seqno:g}})); var d=c.pipe(YB(function(f){return f.seqno}),zya(b)); return vya(c,d).pipe(Jya(function(f,g){return f.state.advance(g)},{state:new vC(a,[])}),YB(function(f){return f.batch}),gC(function(f){return void 0!==f}))}} ;var wC=function(){var a=this;this.statusSubscribers=new Set;this.status=new OB(function(b){a.statusSubscribers.add(b);if(4===a.getState())jB(function(){b.complete()});else {var c=a.lastChannelStatus;c&&jB(function(){b.next(c)})}return function(){return a.statusSubscribers.delete(b)}})}; wC.prototype.stop=function(){for(var a={},b=k(this.statusSubscribers),c=b.next();!c.done;a={$jscomp$loop$prop$subscriber$2383:a.$jscomp$loop$prop$subscriber$2383},c=b.next())a.$jscomp$loop$prop$subscriber$2383=c.value,jB(function(d){return function(){d.$jscomp$loop$prop$subscriber$2383.complete()}}(a)); return Promise.resolve()}; wC.prototype.onOpen=function(){if(Dt(this)){var a=new Hy;a.setCode(0);this.lastChannelStatus=a;xC(this,a)}}; wC.prototype.onError=function(a,b){Dt(this)&&(a=b.getLastHttpStatusCode(),b=new Hy,b.setCode(yxa(a)),this.lastChannelStatus=b,xC(this,b))}; wC.prototype.onClose=function(){}; var xC=function(a,b){var c={};a=k(a.statusSubscribers);for(var d=a.next();!d.done;c={$jscomp$loop$prop$subscriber$2385:c.$jscomp$loop$prop$subscriber$2385},d=a.next())c.$jscomp$loop$prop$subscriber$2385=d.value,jB(function(f){return function(){f.$jscomp$loop$prop$subscriber$2385.next(b)}}(c))},Dt=function(a){return 1===a.getState()||2===a.getState()},dza=function(a){this.authMethod=a};var yC=function(a,b){var c=void 0===c?zxa:c;this.authMethod=b;this.jspbClient=new kB(a,c)}; yC.prototype.subscribe=function(a){var b=a.getSubscription();tf(b,4,this.authMethod.getSubscriberKind());return this.jspbClient.post("/v1/subscriptions",a,jz,zC(this))}; yC.prototype.unsubscribe=function(a){tf(a,4,this.authMethod.getSubscriberKind());var b=new kz;b.setSubscription(a);return this.jspbClient.post("/v1/deleteSubscriptions",b,lz,zC(this))}; var eza=function(a,b){var c=new dz;b=k(b);for(var d=b.next();!d.done;d=b.next())Mf(c,2,d.value,az,void 0);return a.jspbClient.post("/v1/acknowledgments",c,ez,zC(a))},zC=function(a){return{queryParams:a.authMethod.getQueryParameters(), extraHeaders:a.authMethod.getHeaders(),withCredentials:a.authMethod.usesCredentialedRequests()}};var AC=function(){this.size=0;this.inner=new Map}; e=AC.prototype;e.clear=function(){this.inner.clear();this.size=this.inner.size}; e.delete=function(a){a=this.inner.delete(JSON.stringify(a));this.size=this.inner.size;return a}; e.forEach=function(a,b){var c=this;void 0!==b&&(a=a.bind(b));this.inner.forEach(function(d,f){f=JSON.parse(f);a(d,f,c)})}; e.get=function(a){return this.inner.get(JSON.stringify(a))}; e.has=function(a){return this.inner.has(JSON.stringify(a))}; e.set=function(a,b){this.inner.set(JSON.stringify(a),b);this.size=this.inner.size;return this}; AC.prototype[Symbol.iterator]=function(){return this.entries()}; AC.prototype.entries=function(){return new BC(this.inner.entries(),function(a){var b=k(a);a=b.next().value;b=b.next().value;return[JSON.parse(a),b]})}; AC.prototype.keys=function(){return new BC(this.inner.keys(),JSON.parse)}; AC.prototype.values=function(){return this.inner.values()}; var BC=function(a,b){this.inner=a;this.mapFunc=b}; BC.prototype[Symbol.iterator]=function(){return this}; BC.prototype.next=function(){var a=this.inner.next(),b=a.value;a=a.done;return{value:a?void 0:this.mapFunc(b),done:a}};var CC=function(a,b,c){this.name=a;this.isPrivateToUser=b;this.legacySource=c}; CC.makePrivateToUser=function(a){return new CC(a,!0)}; CC.makeLegacy=function(a,b){return new CC(b,!1,a)}; CC.prettyPrint=function(a){var b="{";a.legacySource&&(b=b.concat(" legacySource: "+a.legacySource+","));return b=b.concat(" name: \""+encodeURIComponent(a.name)+"\""," "+(a.isPrivateToUser?"(private)":"(public)")+" }")};var fza=new Set([1,2]),gza=new Set([408,429]),hza={callOnce:function(a,b){return Xi(a,b)}, clear:function(a){Yi(a)}},iza=function(a){this.cancelCallback=a},jza=function(a,b){var c=!1,d=a.callOnce(function(){c||b()},3E4); return new iza(function(){c=!0;a.clear(d)})}; iza.prototype.cancel=function(){this.cancelCallback()}; var DC=function(a,b,c){c=void 0===c?hza:c;wC.call(this);this.doorman=a;this.config=b;this.timer=c;this.logger=new Sr;this.registrations=new AC;this.privatePerUserObjects=new Map;this.state=0;this.delayGenerator=new Qr(500,1024);this.acks=new SB;this.channel=b.channelProvider(this)}; p(DC,wC);DC.prototype.start=function(){var a=this;this.config.authMethod instanceof hB?this.tokenSubscription=this.config.authMethod.oauthTokens.subscribe(function(b){a.setOAuthToken(b)}):this.config.authMethod instanceof iB&&(this.tokenSubscription=this.config.authMethod.appAuthTokens.subscribe(function(b){a.channel.setAppAuthToken(b)})); this.channel.newPostmanSession("tango_web",this).open();this.sendAckBatches=this.acks.pipe(cza(this.config.ackBatchMaxElements,this.config.ackBatchDelayMs)).subscribe(function(b){eza(a.doorman,b).catch(function(c){a.logger.warning("Encountered an error sending acks with acks="+(b+": "+JSON.stringify(c)))})}); this.state=2;return this}; DC.prototype.signalsFor=function(a){var b=this;return a.legacySource?fya(Error("Legacy ObjectIds are not supported by this implementation")):new OB(function(c){var d=b.registrations.get(a);d||(d=new EC(a.isPrivateToUser,function(f){kza(b,a,f)}),b.registrations.set(a,d),4===b.state&&d.terminate()); return lza(d,c)})}; var kza=function(a,b,c){if(Dt(a)&&a.registrations.get(b)===c)if(0===c.numSubscribers()){if(null==c.deleteSubscriptionTimeout){var d=jza(a.timer,function(){c.deleteSubscriptionTimeout=void 0;Et(a,c);a.registrations.delete(b);null!=c.fullTopicName&&a.privatePerUserObjects.delete(c.fullTopicName)}); c.deleteSubscriptionTimeout=d}}else c.deleteSubscriptionTimeout&&(c.deleteSubscriptionTimeout.cancel(),c.deleteSubscriptionTimeout=void 0),0===c.state&&null!=a.subscriberInfo&&vqa(a,c,b,a.subscriberInfo)}; DC.prototype.setOAuthToken=function(a){this.channel.setOAuthToken(a)}; DC.prototype.onSessionError=function(a,b){this.logger.warning("Received session error: "+JSON.stringify(b));a=new Hy;a.setCode(2);a.setMessage(b.description);xC(this,a);b.isTransient&&this.logger.warning("Ignoring transient session error")}; var xqa=function(a,b){if(Dt(a)){var c=Gr(b,1),d=Gr(c,1).getTopicName();d=a.privatePerUserObjects.get(d)||new CC(d,!1);if(d=a.registrations.get(d)){c=c.getMessage();var f=Gr(c,3);f=cB?cB(f):new UA(Number(f),Number(f)/4294967296);var g=Er(c,1)?c.getData():void 0,l=Er(c,2)?Gr(c,2):void 0;c=Hr(c,4);c={version:f,payload:g,traceId:l,isSynthetic:!1,isSuppressor:c};mza(d,c);d=k(d.subscribers);for(f=d.next();!f.done;f=d.next())f.value.next(c)}else a.logger.warning("Acking and dropping signal on object with no listeners"), null==a.subscriberInfo?a.logger.warning("Got signal for unregistered object before receiving subscriber info"):(a.logger.warning("Attempting to unsubscribe from unknown object for which we received an invalidation"),c=Gr(Gr(b,1),1),d=new fz,d.setTopicName(c.getTopicName()),tf(d,3,a.subscriberInfo),tf(d,4,a.config.authMethod.getSubscriberKind()),c=c.getName(),tf(d,5,c),a.unsubscribe(d));b=Gr(b,3);d=new Date().getTime();c=new az;c.setId(b);tf(c,2,1E3*d);a.acks.next(c)}},vqa=function(a,b,c,d){b.state= 1; var f=nza();b.subscriptionName=f;var g=new fz;g.setTopicName(c.name);tf(g,3,d);tf(g,5,f);tf(g,4,a.config.authMethod.getSubscriberKind());var l=new iz;l.setSubscription(g);tf(l,2,b.isPrivateToUser);var m=new Promise(function(n,r){oza(a,function(){return a.doorman.subscribe(l)},function(u){var z=g.clone(); K(u,2)&&(b.fullTopicName=I(u,2),z.setTopicName(b.fullTopicName));n(z);if(b.subscriptionName!==f||a.registrations.get(c)!==b)a.logger.warning("Received outdated subscribe response");else if(2===b.state)a.logger.warning("Received duplicate subscribe response");else{K(u,2)&&a.privatePerUserObjects.set(I(u,2),c);b.state=2;u=I(u,1);u={version:cB(u),isSynthetic:!0,isSuppressor:!0};mza(b,u);z=k(b.subscribers);for(var C=z.next();!C.done;C=z.next())C.value.next(u)}},function(u){r(u)},function(){return a.subscriberInfo=== d&&0a.length;)a.push(Math.floor(256*Math.random()));return Me(a)} var EC=function(a,b){this.isPrivateToUser=a;this.numSubscribersChangedCallback=b;this.state=0;this.subscribers=new Set}; EC.prototype.numSubscribers=function(){return this.subscribers.size}; var lza=function(a,b){if(3===a.state)return b.complete(),function(){}; a.subscribers.add(b);null!=a.latestSignal&&b.next(a.latestSignal);a.numSubscribersChangedCallback(a);return function(){a.subscribers.delete(b);a.numSubscribersChangedCallback(a)}},mza=function(a,b){if(null==a.latestSignal||0=a.status&&!gza.has(a.status)} ;var FC=function(){this.domainType=0},tza=function(a){return sza(a,a.getChannelUriForDomain(a.domainType))},uza=function(a){return sza(a,a.getDoormanUriForDomain(a.domainType))},sza=function(a,b){a.scheme&&b.setScheme(a.scheme); return b},GC=function(){FC.apply(this,arguments)}; p(GC,FC);GC.prototype.getChannelUriForDomain=function(a){switch(a){case 0:case 1:return new fq("https://client-channel.google.com/client-channel/client");case 2:return new fq("https://client-channel.youtube.com/client-channel/client");default:return new fq;}}; GC.prototype.getDoormanUriForDomain=function(a){switch(a){case 0:return new fq("https://signaler-pa.clients6.google.com");case 1:return new fq("https://signaler-pa.googleapis.com");case 2:return new fq("https://signaler-pa.youtube.com");default:return new fq;}}; var HC=function(){FC.apply(this,arguments)}; p(HC,FC);HC.prototype.getChannelUriForDomain=function(){return new fq("https://client-channel.sandbox.google.com/client-channel/client")}; HC.prototype.getDoormanUriForDomain=function(){return new fq("https://signaler-staging.sandbox.google.com")}; var IC=function(a,b){this.domainType=0;this.channelUri=a;this.doormanUri=b}; p(IC,FC);IC.prototype.getChannelUriForDomain=function(){return this.channelUri}; IC.prototype.getDoormanUriForDomain=function(){return this.doormanUri}; var JC=function(a,b){this.lcsClientType=a;this.environment=b;this.useSharedChannel=!1}; JC.forLocalEnv=function(a,b,c){b=new fq(b);c=new fq(c);return new JC(a,new IC(b,c))}; JC.forStagingEnv=function(a){return new JC(a,new HC())}; JC.forProdEnv=function(a){return new JC(a,new GC())}; JC.forYouTubeProd=function(a){var b=new GC;b.domainType=2;return new JC(a,b)}; e=JC.prototype;e.enableChannelSharing=function(){this.useSharedChannel=!0;return this}; e.withLegacyTangoChannel=function(a){this.channelProvider=function(b){a.setChannelHandler(b);return a.getRawChannel()}; return this}; e.withAuthUser=function(a){this.authUser=a;return this}; e.withApiKey=function(a){this.apiKey=a;return this}; e.withOAuthTokens=function(a){this.environment.domainType=1;this.oauthTokens=a;return this}; e.withAppAuthTokens=function(a){this.environment.domainType=1;this.appAuthTokens=a;this.oauthTokens=void 0;return this}; e.withPageId=function(a){this.pageId=a;return this}; e.withPlainHttpForTest=function(){this.environment.scheme="http";return this}; e.build=function(){var a=vza;var b=tza(this.environment).toString();b=new xt(b,this.lcsClientType,"lcsclient");return a(this,b)}; e.buildWithoutIframe=function(){var a=tza(this.environment);a.setPath("/client-channel/channel");return vza(this,new Zs(a.toString(),this.lcsClientType))}; var vza=function(a,b){if(a.oauthTokens)var c=new hB(a.oauthTokens,a.pageId);else{if(!a.apiKey)throw Error("An API key is required");c=a.appAuthTokens?new iB(a.apiKey,a.appAuthTokens):new gB(a.apiKey,a.authUser,a.pageId)}var d=uza(a.environment);a.channelProvider||(c instanceof gB&&b.setUseSharedChannel(a.useSharedChannel),a.pageId&&b.setPageId(a.pageId),a.authUser&&b.setAuthuser(a.authUser),a.channelProvider=function(f){f=!b.pageId&&t.SharedWorker&&b.isIframed()&&b.useSharedChannel?new Ft(f,b):new wqa(f, b);f.open();return f}); return new qza(c,a.channelProvider,d,250,20)};var KC=function(a){var b=void 0===b?{}:b;this.punctualClient=a;this.watchOpts=b;this.status=a.status}; KC.prototype.start=function(){return{stop:function(){return Promise.resolve()}}}; KC.prototype.signalsFor=function(a){a=a.isPrivateToUser?wxa(a.name):vxa(a.name);return this.punctualClient.watch(new xxa(a),this.watchOpts).pipe(gC(function(b){return!(b instanceof mxa)}),YB(function(b){if(b instanceof MA){var c=1===b.objectId.parts.length,d=b.payload&&Dca(b.payload); return{version:b.version,payload:d,isSynthetic:!1,isSuppressor:c}}return{isSynthetic:!0,isSuppressor:!0}}),Lya())};/* gapi.loader.OBJECT_CREATE_TEST_OVERRIDE &&*/ var LC=window,MC=document,wza=LC.location,xza=function(){},yza=/\[native code\]/,NC=function(a,b,c){return a[b]=a[b]||c},zza=function(a){a=a.sort(); for(var b=[],c=void 0,d=0;dg}g&&c.push(f)}return c},Xza=function(){var a=QC.nonce; return void 0!==a?a&&a===String(a)&&a.match(Vza)?a:QC.nonce=null:MC.querySelector?(a=MC.querySelector("script[nonce]"))?(a=a.nonce||a.getAttribute("nonce")||"",a&&a===String(a)&&a.match(Vza)?QC.nonce=a:QC.nonce=null):null:null},Zza=function(a){if("loading"!=MC.readyState)Yza(a);else {var b=Xza(),c="";null!==b&&(c=" nonce=\""+b+"\"");a="<"+YC+" src=\""+encodeURI(a)+"\""+c+">";MC.write(ZC?ZC.createHTML(a):a)}},Yza=function(a){var b=MC.createElement(YC); b.setAttribute("src",ZC?ZC.createScriptURL(a):a);a=Xza();null!==a&&b.setAttribute("nonce",a);b.async="true";(a=MC.getElementsByTagName(YC)[0])?a.parentNode.insertBefore(b,a):(MC.head||MC.body||MC.documentElement).appendChild(b)},$za=function(a,b){var c=b&&b._c; if(c)for(var d=0;d=f.right)&&(g&=-2);132==(g&132)&&(d.y=f.bottom)&&(g&=-5);d.xf.right&&(m.width=Math.min(f.right- d.x,r+m.width-f.left),m.width=Math.max(m.width,0),n|=4)}d.x+m.width>f.right&&g&1&&(d.x=Math.max(f.right-m.width,f.left),n|=1);g&2&&(n|=(d.xf.right?32:0));d.yf.bottom&&(m.height=Math.min(f.bottom-d.y,r+m.height-f.top),m.height=Math.max(m.height,0),n|=8));d.y+m.height>f.bottom&&g&4&&(d.y=Math.max(f.bottom-m.height,f.top),n|=2);g&8&&(n|=(d.yf.bottom?128:0));f=n}else f= 256;n=f}f=new Wg(0,0,0,0);f.left=a.x;f.top=a.y;f.width=l.width;f.height=l.height;n&496||(th(b,new Wf(f.left,f.top)),l=new Yf(f.width,f.height),c==l||c&&l&&c.width==l.width&&c.height==l.height||(c=l,l=ig(ag($f(b)).document_),!te||Fe("10")||l&&Fe("8")?(b=b.style,we?b.MozBoxSizing="border-box":xe?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(c.width,0)+"px",b.height=Math.max(c.height,0)+"px"):(f=b.style,l?(l=Eh(b,"padding"),b=Gh(b),f.pixelWidth=c.width-b.left-l.left-l.right- b.right,f.pixelHeight=c.height-b.top-l.top-l.bottom-b.bottom):(f.pixelWidth=c.width,f.pixelHeight=c.height))))},uD=function(a,b){return(b&8&&Bh(a)?b^4:b)&-9};var vD=function(){}; La(vD);vD.prototype.nextId_=0;vD.prototype.idPrefix_="";vD.prototype.setIdPrefix=function(a){this.idPrefix_=a};var wD=function(a){yi.call(this);this.dom_=a||ag();this.rightToLeft_=cBa;this.id_=null;this.inDocument_=!1;this.element_=null;this.googUiComponentHandler_=void 0;this.childIndex_=this.children_=this.parent_=this.model_=null;this.pointerEventsEnabled_=this.wasDecorated_=!1}; v(wD,yi);wD.prototype.idGenerator_=vD.getInstance();var cBa=null;e=wD.prototype;e.getId=function(){var a;(a=this.id_)||(a=this.idGenerator_,a=this.id_=a.idPrefix_+":"+(a.nextId_++).toString(36));return a}; e.setId=function(a){this.parent_&&this.parent_.childIndex_&&(y.remove(this.parent_.childIndex_,this.id_),y.add(this.parent_.childIndex_,a,this));this.id_=a}; e.getElement=function(){return this.element_}; e.getElementsByClass=function(a){return this.element_?this.dom_.getElementsByClass(a,this.element_):[]}; e.getElementByClass=function(a){return this.element_?this.dom_.getElementByClass(a,this.element_):null}; e.getRequiredElementByClass=function(a){return this.getElementByClass(a)}; e.getHandler=function(){this.googUiComponentHandler_||(this.googUiComponentHandler_=new Kq(this));return this.googUiComponentHandler_}; e.setParent=function(a){if(this==a)throw Error("Unable to set parent component");var b;if(b=a&&this.parent_&&this.id_){b=this.parent_;var c=this.id_;b=b.childIndex_&&c?y.get(b.childIndex_,c)||null:null}if(b&&this.parent_!=a)throw Error("Unable to set parent component");this.parent_=a;wD.superClass_.setParentEventTarget.call(this,a)}; e.getParent=function(){return this.parent_}; e.setParentEventTarget=function(a){if(this.parent_&&this.parent_!=a)throw Error("Method not supported");wD.superClass_.setParentEventTarget.call(this,a)}; e.getDomHelper=function(){return this.dom_}; e.createDom=function(){this.element_=this.dom_.createElement("DIV")}; e.render=function(a){xD(this,a)}; e.renderBefore=function(a){xD(this,a.parentNode,a)}; var xD=function(a,b,c){if(a.inDocument_)throw Error("Component already rendered");a.element_||a.createDom();b?b.insertBefore(a.element_,c||null):a.dom_.getDocument().body.appendChild(a.element_);a.parent_&&!a.parent_.inDocument_||a.enterDocument()}; e=wD.prototype;e.decorate=function(a){if(this.inDocument_)throw Error("Component already rendered");if(a&&this.canDecorate(a)){this.wasDecorated_=!0;var b=$f(a);this.dom_&&this.dom_.getDocument()==b||(this.dom_=ag(a));this.decorateInternal(a);this.enterDocument()}else throw Error("Invalid element to decorate")}; e.canDecorate=function(){return!0}; e.wasDecorated=function(){return this.wasDecorated_}; e.decorateInternal=function(a){this.element_=a}; e.enterDocument=function(){this.inDocument_=!0;yD(this,function(a){!a.inDocument_&&a.getElement()&&a.enterDocument()})}; e.exitDocument=function(){yD(this,function(a){a.inDocument_&&a.exitDocument()}); this.googUiComponentHandler_&&this.googUiComponentHandler_.removeAll();this.inDocument_=!1}; e.disposeInternal=function(){this.inDocument_&&this.exitDocument();this.googUiComponentHandler_&&(this.googUiComponentHandler_.dispose(),delete this.googUiComponentHandler_);yD(this,function(a){a.dispose()}); !this.wasDecorated_&&this.element_&&tg(this.element_);this.parent_=this.model_=this.element_=this.childIndex_=this.children_=null;wD.superClass_.disposeInternal.call(this)}; e.makeIds=function(a){var b={},c;for(c in a){var d=c;var f=a[c];f=this.getId()+"."+f;b[d]=f}return b}; e.getModel=function(){return this.model_}; e.setModel=function(a){this.model_=a}; e.getFragmentFromId=function(a){return a.substring(this.getId().length+1)}; e.getElementByFragment=function(a){if(!this.inDocument_)throw Error("Operation not supported while component is not in document");var b=this.dom_,c=b.getElement;a=this.getId()+"."+a;return c.call(b,a)}; e.addChild=function(a,b){var c=this.children_?this.children_.length:0;if(a.inDocument_&&(b||!this.inDocument_))throw Error("Component already rendered");if(0>c||c>(this.children_?this.children_.length:0))throw Error("Child component index out of bounds");this.childIndex_&&this.children_||(this.childIndex_={},this.children_=[]);a.getParent()==this?(y.set(this.childIndex_,a.getId(),a),nb(this.children_,a)):y.add(this.childIndex_,a.getId(),a);a.setParent(this);rb(this.children_,c,0,a);a.inDocument_&& this.inDocument_&&a.getParent()==this?(b=this.getContentElement(),(b.childNodes[c]||null)!=a.getElement()&&(a.getElement().parentElement==b&&b.removeChild(a.getElement()),c=b.childNodes[c]||null,b.insertBefore(a.getElement(),c))):b?(this.element_||this.createDom(),c=this.children_?this.children_[c+1]||null:null,xD(a,this.getContentElement(),c?c.element_:null)):this.inDocument_&&!a.inDocument_&&a.element_&&a.element_.parentNode&&1==a.element_.parentNode.nodeType&&a.enterDocument()}; e.getContentElement=function(){return this.element_}; e.isRightToLeft=function(){null==this.rightToLeft_&&(this.rightToLeft_=Bh(this.inDocument_?this.element_:this.dom_.getDocument().body));return this.rightToLeft_}; e.setRightToLeft=function(a){if(this.inDocument_)throw Error("Component already rendered");this.rightToLeft_=a}; e.getChildIds=function(){var a=[];yD(this,function(b){a.push(b.getId())}); return a}; var yD=function(a,b){a.children_&&db(a.children_,b,void 0)}; e=wD.prototype;e.indexOfChild=function(a){return this.children_&&a?cb(this.children_,a):-1}; e.removeChild=function(a,b){if(a){var c="string"===typeof a?a:a.getId();a=this.childIndex_&&c?y.get(this.childIndex_,c)||null:null;c&&a&&(y.remove(this.childIndex_,c),nb(this.children_,a),b&&(a.exitDocument(),a.element_&&tg(a.element_)),a.setParent(null))}if(!a)throw Error("Child is not in parent component");return a}; e.removeChildren=function(a){for(var b=[];this.children_&&0!=this.children_.length;){var c=b,d=c.push;var f=this.removeChild(this.children_?this.children_[0]||null:null,a);d.call(c,f)}return b}; e.pointerEventsEnabled=function(){return this.pointerEventsEnabled_}; e.setPointerEventsEnabled=function(a){if(this.inDocument_)throw Error("Component already rendered");this.pointerEventsEnabled_=a};var zD=function(a){wD.call(this,a)}; v(zD,wD);zD.prototype.createDom=function(){var a=this.getDomHelper(),b=a.createDom("DIV");this.element_=b;var c=a.createDom("DIV","picker-min-arrow-inner"),d=a.createDom("DIV","picker-min-arrow-border");a.appendChild(b,c);a.appendChild(b,d)}; var dBa=function(a,b,c){a=a.getElement();oh(a,"left","");oh(a,"right","");jj(b,"picker-min-top");jj(b,"picker-min-bottom");c=uD(b,c);c&1?(fj(a,"picker-min-arrow-down"),hj(b,"picker-min-bottom")):(fj(a,"picker-min-arrow-up"),hj(b,"picker-min-top"))}; zD.prototype.update=function(a,b,c){this.inDocument_&&(c||(c=new Ug(0,0,0,0)),dBa(this,a,b),a=this.getElement(),b&4?oh(a,"right",-c.right+"px"):oh(a,"left",-c.left+"px"))};function AD(a,b){mD.call(this,"set-drive-options");this.appId=a;this.appOrigin=b} v(AD,mD);var BD=function(a){mD.call(this,"visibility");this.visible=a}; v(BD,mD);var CD;var DD=function(a,b){b?a.setAttribute("role",b):a.removeAttribute("role")},ED=function(a,b,c){Array.isArray(c)&&(c=c.join(" ")); var d="aria-"+b;""===c||void 0==c?(CD||(CD=y.create("atomic",!1,"autocomplete","none","dropeffect","none","haspopup",!1,"live","off","multiline",!1,"multiselectable",!1,"orientation","vertical","readonly",!1,"relevant","additions text","required",!1,"sort","none","busy",!1,"disabled",!1,"hidden",!1,"invalid","false")),c=CD,b in c?a.setAttribute(d,c[b]):a.removeAttribute(d)):a.setAttribute(d,c)};var fBa=function(a){if(a.altKey&&!a.ctrlKey||a.metaKey||112<=a.keyCode&&123>=a.keyCode)return!1;if(eBa(a.keyCode))return!0;switch(a.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 252:case 224:case 92:return!1;case 0:return!we;default:return 166>a.keyCode||183=a||96<=a&&106>=a||65<=a&&90>=a||(xe||ue)&&0== a)return!0; switch(a){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:case 58:return!0;case 173:return we;default:return!1;}},gBa=function(a){switch(a){case 61:return 187; case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a;}},hBa=function(a){switch(a){case 93:return 91; default:return a;}};var FD=function(a,b,c){yi.call(this);this.target=a;this.handle=b||a;this.limits=c||new Wg(NaN,NaN,NaN,NaN);this.document_=$f(a);this.eventHandler_=new Kq(this);Tg(this,this.eventHandler_);this.deltaY=this.deltaX=this.startY=this.startX=this.screenY=this.screenX=this.clientY=this.clientX=0;this.enabled_=!0;this.dragging_=!1;this.preventMouseDown_=!0;this.hysteresisDistanceSquared_=0;this.useRightPositioningForRtl_=this.ieDragStartCancellingOn_=!1;si(this.handle,["touchstart","mousedown"],this.startDrag, !1,this);this.useSetCapture_=iBa}; v(FD,yi);var iBa=t.document&&t.document.documentElement&&!!t.document.documentElement.setCapture&&!!t.document.releaseCapture;e=FD.prototype;e.setAllowSetCapture=function(a){this.useSetCapture_=a&&iBa}; e.enableRightPositioningForRtl=function(a){this.useRightPositioningForRtl_=a}; e.getHandler=function(){return this.eventHandler_}; e.setHysteresis=function(a){this.hysteresisDistanceSquared_=Math.pow(a,2)}; e.getHysteresis=function(){return Math.sqrt(this.hysteresisDistanceSquared_)}; e.setCancelIeDragStart=function(a){this.ieDragStartCancellingOn_=a}; e.getEnabled=function(){return this.enabled_}; e.setPreventMouseDown=function(a){this.preventMouseDown_=a}; e.disposeInternal=function(){FD.superClass_.disposeInternal.call(this);vi(this.handle,["touchstart","mousedown"],this.startDrag,!1,this);this.eventHandler_.removeAll();this.useSetCapture_&&this.document_.releaseCapture();this.handle=this.target=null}; var jBa=function(a){void 0===a.rightToLeft_&&(a.rightToLeft_=Bh(a.target));return a.rightToLeft_}; FD.prototype.startDrag=function(a){var b="mousedown"==a.type;if(!this.enabled_||this.dragging_||b&&(!(ffa?0==a.event_.button:"click"==a.type||a.event_.button&mfa[0])||ye&&a.ctrlKey))this.dispatchEvent("earlycancel");else{if(0==this.hysteresisDistanceSquared_){if(this.dispatchEvent(new GD("start",this,a.clientX,a.clientY,a)))this.dragging_=!0,this.preventMouseDown_&&b&&a.preventDefault();else return;}else this.preventMouseDown_&&b&&a.preventDefault();b=this.document_;var c=b.documentElement,d=!this.useSetCapture_; this.eventHandler_.listen(b,["touchmove","mousemove"],this.handleMove_,{capture:d,passive:!1});this.eventHandler_.listen(b,["touchend","mouseup"],this.endDrag,d);this.useSetCapture_?(c.setCapture(!1),this.eventHandler_.listen(c,"losecapture",this.endDrag)):this.eventHandler_.listen(lg(b),"blur",this.endDrag);te&&this.ieDragStartCancellingOn_&&this.eventHandler_.listen(b,"dragstart",efa);this.scrollTarget_&&this.eventHandler_.listen(this.scrollTarget_,"scroll",this.onScroll_,d);this.clientX=this.startX= a.clientX;this.clientY=this.startY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;this.deltaX=this.useRightPositioningForRtl_?aBa(this.target):this.target.offsetLeft;this.deltaY=this.target.offsetTop;this.pageScroll=kg(ag(this.document_).document_)}}; FD.prototype.endDrag=function(a,b){this.eventHandler_.removeAll();this.useSetCapture_&&this.document_.releaseCapture();this.dragging_?(this.dragging_=!1,this.dispatchEvent(new GD("end",this,a.clientX,a.clientY,a,kBa(this,this.deltaX),lBa(this,this.deltaY),b||"touchcancel"==a.type))):this.dispatchEvent("earlycancel")}; FD.prototype.endDragCancel=function(a){this.endDrag(a,!0)}; FD.prototype.handleMove_=function(a){if(this.enabled_){var b=(this.useRightPositioningForRtl_&&jBa(this)?-1:1)*(a.clientX-this.clientX),c=a.clientY-this.clientY;this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.dragging_){var d=this.startX-this.clientX,f=this.startY-this.clientY;if(d*d+f*f>this.hysteresisDistanceSquared_)if(this.dispatchEvent(new GD("start",this,a.clientX,a.clientY,a)))this.dragging_=!0;else{this.isDisposed()||this.endDrag(a);return}}c= mBa(this,b,c);b=c.x;c=c.y;this.dragging_&&this.dispatchEvent(new GD("beforedrag",this,a.clientX,a.clientY,a,b,c))&&(nBa(this,a,b,c),a.preventDefault())}}; var mBa=function(a,b,c){var d=kg(ag(a.document_).document_);b+=d.x-a.pageScroll.x;c+=d.y-a.pageScroll.y;a.pageScroll=d;a.deltaX+=b;a.deltaY+=c;return new Wf(kBa(a,a.deltaX),lBa(a,a.deltaY))}; FD.prototype.onScroll_=function(a){var b=mBa(this,0,0);a.clientX=this.clientX;a.clientY=this.clientY;nBa(this,a,b.x,b.y)}; var nBa=function(a,b,c,d){a.useRightPositioningForRtl_&&jBa(a)?a.target.style.right=c+"px":a.target.style.left=c+"px";a.target.style.top=d+"px";a.dispatchEvent(new GD("drag",a,b.clientX,b.clientY,b,c,d))},kBa=function(a,b){var c=a.limits; a=isNaN(c.left)?null:c.left;c=isNaN(c.width)?0:c.width;return Math.min(null!=a?a+c:Infinity,Math.max(null!=a?a:-Infinity,b))},lBa=function(a,b){var c=a.limits; a=isNaN(c.top)?null:c.top;c=isNaN(c.height)?0:c.height;return Math.min(null!=a?a+c:Infinity,Math.max(null!=a?a:-Infinity,b))}; FD.prototype.isDragging=function(){return this.dragging_}; var GD=function(a,b,c,d,f,g,l,m){hi.call(this,a);this.clientX=c;this.clientY=d;this.browserEvent=f;this.left=void 0!==g?g:b.deltaX;this.top=void 0!==l?l:b.deltaY;this.dragger=b;this.dragCanceled=!!m}; v(GD,hi);var HD=function(a){this.map_=new Map;var b=arguments.length;if(1Wa()-this.lastHideTime_}; e.setVisible=function(a){this.showTransition_&&this.showTransition_.stop();this.hideTransition_&&this.hideTransition_.stop();a?this.show_():this.hide_()}; e.reposition=Ka; e.show_=function(){if(!this.isVisible_&&this.dispatchEvent("beforeshow")){if(!this.element_)throw Error("Caller must call setElement before trying to show the popup");this.reposition();var a=$f(this.element_);this.hideOnEscape_&&this.handler_.listen(a,"keydown",this.onDocumentKeyDown_,!0);if(this.autoHide_)if(this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,!0),te){try{var b=a.activeElement}catch(d){}for(;b&&"IFRAME"==b.nodeName;){try{var c=Bg(b)}catch(d){break}a=c;b=a.activeElement}this.handler_.listen(a,"mousedown", this.onDocumentMouseDown_,!0);this.handler_.listen(a,"deactivate",this.onDocumentBlur_)}else this.handler_.listen(a,"blur",this.onDocumentBlur_);"toggle_display"==this.type_?vBa(this):"move_offscreen"==this.type_&&this.reposition();this.isVisible_=!0;this.lastShowTime_=Wa();this.lastHideTime_=-1;if(this.showTransition_)ri(this.showTransition_,"end",this.onShow,!1,this),this.showTransition_.play();else this.onShow()}}; e.hide_=function(a){if(!this.isVisible_||!this.dispatchEvent({type:"beforehide",target:a}))return!1;this.handler_&&this.handler_.removeAll();this.isVisible_=!1;this.lastHideTime_=Wa();this.hideTransition_?(ri(this.hideTransition_,"end",Ua(this.continueHidingPopup_,a),!1,this),this.hideTransition_.play()):this.continueHidingPopup_(a);return!0}; e.continueHidingPopup_=function(a){"toggle_display"==this.type_?this.shouldHideAsync_?Xi(this.hidePopupElement,0,this):this.hidePopupElement():"move_offscreen"==this.type_&&(this.element_.style.top="-10000px");this.onHide(a)}; var vBa=function(a){a.element_.style.visibility="visible";Ah(a.element_,!0)}; e=MD.prototype;e.hidePopupElement=function(){this.element_.style.visibility="hidden";Ah(this.element_,!1)}; e.onShow=function(){this.dispatchEvent("show")}; e.onHide=function(a){this.dispatchEvent({type:"hide",target:a})}; e.onDocumentMouseDown_=function(a){a=a.target;zg(this.element_,a)||ND(this,a)||this.autoHideRegion_&&!zg(this.autoHideRegion_,a)||150>Wa()-this.lastShowTime_||this.hide_(a)}; e.onDocumentKeyDown_=function(a){27==a.keyCode&&this.hide_(a.target)&&(a.preventDefault(),a.stopPropagation())}; e.onDocumentBlur_=function(a){if(this.enableCrossIframeDismissal_){var b=$f(this.element_);if("undefined"!=typeof document.activeElement){if(a=b.activeElement,!a||zg(this.element_,a)||"BODY"==a.tagName||ND(this,a))return}else if(a.target!=b)return;150>Wa()-this.lastShowTime_||this.hide_()}}; var ND=function(a,b){return hb(a.autoHidePartners_||[],function(c){return b===c||zg(c,b)})}; MD.prototype.disposeInternal=function(){MD.superClass_.disposeInternal.call(this);this.handler_.dispose();Rg(this.showTransition_);Rg(this.hideTransition_);delete this.element_;delete this.handler_;delete this.autoHidePartners_};var OD=function(a,b){wD.call(this,b);this.useIframeMask_=!!a;this.lastFocus_=null;this.resizeBackgroundTask_=rBa({mutate:this.resizeBackground_},this)}; v(OD,wD);e=OD.prototype;e.focusHandler_=null;e.visible_=!1;e.bgEl_=null;e.bgIframeEl_=null;e.tabCatcherElement_=null;e.backwardTabWrapInProgress_=!1;e.getCssClass=function(){return"goog-modalpopup"}; e.getBackgroundElement=function(){return this.bgEl_}; e.createDom=function(){OD.superClass_.createDom.call(this);var a=this.getElement(),b=Pb(this.getCssClass()).split(" ");ij(a,b);Hg(a,!0);Ah(a,!1);wBa(this);xBa(this)}; var wBa=function(a){if(a.useIframeMask_&&!a.bgIframeEl_){var b=a.getDomHelper().createDom("IFRAME",{frameborder:0,style:"border:0;vertical-align:bottom;"});wc(b,sBa);a.bgIframeEl_=b;a.bgIframeEl_.className=a.getCssClass()+"-bg";Ah(a.bgIframeEl_,!1);yea(a.bgIframeEl_,0)}a.bgEl_||(a.bgEl_=a.getDomHelper().createDom("DIV",a.getCssClass()+"-bg"),Ah(a.bgEl_,!1))},xBa=function(a){a.tabCatcherElement_||(a.tabCatcherElement_=a.getDomHelper().createElement("SPAN"),Ah(a.tabCatcherElement_,!1),Hg(a.tabCatcherElement_, !0),a.tabCatcherElement_.style.position="absolute")}; e=OD.prototype;e.resetBackwardTabWrap_=function(){this.backwardTabWrapInProgress_=!1}; e.canDecorate=function(a){return!!a&&"DIV"==a.tagName}; e.decorateInternal=function(a){OD.superClass_.decorateInternal.call(this,a);a=Pb(this.getCssClass()).split(" ");ij(this.getElement(),a);wBa(this);xBa(this);Hg(this.getElement(),!0);Ah(this.getElement(),!1)}; e.enterDocument=function(){this.bgIframeEl_&&rg(this.bgIframeEl_,this.getElement());rg(this.bgEl_,this.getElement());OD.superClass_.enterDocument.call(this);sg(this.tabCatcherElement_,this.getElement());this.focusHandler_=new KD(this.getDomHelper().getDocument());this.getHandler().listen(this.focusHandler_,"focusin",this.onFocus);PD(this,!1)}; e.exitDocument=function(){this.isVisible()&&this.setVisible(!1);Rg(this.focusHandler_);OD.superClass_.exitDocument.call(this);tg(this.bgIframeEl_);tg(this.bgEl_);tg(this.tabCatcherElement_)}; e.setVisible=function(a){a!=this.visible_&&(this.popupShowTransition_&&this.popupShowTransition_.stop(),this.bgShowTransition_&&this.bgShowTransition_.stop(),this.popupHideTransition_&&this.popupHideTransition_.stop(),this.bgHideTransition_&&this.bgHideTransition_.stop(),this.inDocument_&&PD(this,a),a?this.show_():this.hide_())}; var PD=function(a,b){a.modalAriaVisibilityHelper_||(a.modalAriaVisibilityHelper_=new uBa(a.element_,a.dom_));a=a.modalAriaVisibilityHelper_;if(b){a.hiddenElements_||(a.hiddenElements_=[]);b=a.dom_.getChildren(a.dom_.getDocument().body);for(var c=0;c"),a.getDirection()));this.content_=a;this.contentEl_&&sc(this.contentEl_,a)}; e.getContent=function(){return null!=this.content_?oc(this.content_):""}; e.getSafeHtmlContent=function(){return this.content_}; e.setPreferredAriaRole=function(a){this.preferredAriaRole_=a}; e.isAriaDescribedByContent=function(){return this.isAriaDescribedByContent_}; e.setIsAriaDescribedByContent=function(a){this.isAriaDescribedByContent_=a}; var UD=function(a){a.getElement()||a.render()}; e=TD.prototype;e.getContentElement=function(){UD(this);return this.contentEl_}; e.getTitleElement=function(){UD(this);return this.titleEl_}; e.getTitleTextElement=function(){UD(this);return this.titleTextEl_}; e.getTitleCloseElement=function(){UD(this);return this.titleCloseEl_}; e.getDialogCloseMessage=function(){return"Close"}; e.getButtonElement=function(){UD(this);return this.buttonEl_}; var zBa=function(a){UD(a);return a.getElement()}; TD.prototype.getBackgroundElement=function(){UD(this);return TD.superClass_.getBackgroundElement.call(this)}; TD.prototype.getBackgroundElementOpacity=function(){return this.backgroundElementOpacity_}; var ABa=function(a,b){a.backgroundElementOpacity_=b;a.getElement()&&(b=a.getBackgroundElement())&&yea(b,a.backgroundElementOpacity_)}; TD.prototype.setModal=function(a){a!=this.modal_&&BBa(this,a)}; var BBa=function(a,b){a.modal_=b;if(a.inDocument_){var c=a.getDomHelper(),d=a.getBackgroundElement(),f=a.bgIframeEl_;b?(f&&c.insertSiblingBefore(f,a.getElement()),c.insertSiblingBefore(d,a.getElement())):(c.removeNode(f),c.removeNode(d))}a.isVisible()&&PD(a,b)}; TD.prototype.getModal=function(){return this.modal_}; TD.prototype.getClass=function(){return this.getCssClass()}; TD.prototype.setDraggable=function(a){this.draggable_=a;VD(this,a&&this.inDocument_)}; TD.prototype.getDraggable=function(){return this.draggable_}; var VD=function(a,b){var c=Pb(a.class_+"-title-draggable").split(" ");a.getElement()&&(b?ij(a.titleEl_,c):kj(a.titleEl_,c));b&&!a.dragger_?(b=new FD(a.getElement(),a.titleEl_),a.dragger_=b,ij(a.titleEl_,c),si(a.dragger_,"start",a.setDraggerLimits_,!1,a)):!b&&a.dragger_&&(a.dragger_.dispose(),a.dragger_=null)}; e=TD.prototype; e.createDom=function(){TD.superClass_.createDom.call(this);var a=this.getElement(),b=this.getDomHelper();this.titleTextId_=this.getId();var c=this.getId()+".contentEl";this.titleEl_=b.createDom("DIV",this.class_+"-title",this.titleTextEl_=b.createDom("SPAN",{className:this.class_+"-title-text",id:this.titleTextId_},this.title_),this.titleCloseEl_=b.createDom("SPAN",this.class_+"-title-close"));Dda(a,this.titleEl_,this.contentEl_=b.createDom("DIV",{className:this.class_+"-content",id:c}),this.buttonEl_= b.createDom("DIV",this.class_+"-buttons"));DD(this.titleTextEl_,"heading");DD(this.titleCloseEl_,"button");Hg(this.titleCloseEl_,!0);ED(this.titleCloseEl_,"label","Close");DD(a,this.preferredAriaRole_);ED(a,"labelledby",this.titleTextId_||"");this.content_&&(sc(this.contentEl_,this.content_),this.isAriaDescribedByContent_&&c&&ED(a,"describedby",c));Ah(this.titleCloseEl_,this.hasTitleCloseButton_);this.buttons_&&(a=this.buttons_,a.element_=this.buttonEl_,a.render());Ah(this.buttonEl_,!!this.buttons_); ABa(this,this.backgroundElementOpacity_)}; e.decorateInternal=function(a){TD.superClass_.decorateInternal.call(this,a);a=this.getElement();var b=this.class_+"-content";this.contentEl_=dg(document,null,b,a)[0];this.contentEl_||(this.contentEl_=this.getDomHelper().createDom("DIV",b),this.content_&&sc(this.contentEl_,this.content_),a.appendChild(this.contentEl_));b=this.class_+"-title";var c=this.class_+"-title-text",d=this.class_+"-title-close";(this.titleEl_=dg(document,null,b,a)[0])?(this.titleTextEl_=dg(document,null,c,this.titleEl_)[0], this.titleCloseEl_=dg(document,null,d,this.titleEl_)[0]):(this.titleEl_=this.getDomHelper().createDom("DIV",b),a.insertBefore(this.titleEl_,this.contentEl_));this.titleTextEl_?(this.title_=Jg(this.titleTextEl_),this.titleTextEl_.id||(this.titleTextEl_.id=this.getId())):(this.titleTextEl_=mg("SPAN",{className:c,id:this.getId()}),this.titleEl_.appendChild(this.titleTextEl_));this.titleTextId_=this.titleTextEl_.id;ED(a,"labelledby",this.titleTextId_||"");this.titleCloseEl_||(this.titleCloseEl_=this.getDomHelper().createDom("SPAN", d),this.titleEl_.appendChild(this.titleCloseEl_));Ah(this.titleCloseEl_,this.hasTitleCloseButton_);b=this.class_+"-buttons";(this.buttonEl_=dg(document,null,b,a)[0])?(this.buttons_=new QD(this.getDomHelper()),this.buttons_.decorate(this.buttonEl_)):(this.buttonEl_=this.getDomHelper().createDom("DIV",b),a.appendChild(this.buttonEl_),this.buttons_&&(a=this.buttons_,a.element_=this.buttonEl_,a.render()),Ah(this.buttonEl_,!!this.buttons_));ABa(this,this.backgroundElementOpacity_)}; e.enterDocument=function(){TD.superClass_.enterDocument.call(this);this.getHandler().listen(this.getElement(),"keydown",this.onKey_).listen(this.getElement(),"keypress",this.onKey_);this.getHandler().listen(this.buttonEl_,"click",this.onButtonClick_);VD(this,this.draggable_);this.getHandler().listen(this.titleCloseEl_,"click",this.onTitleCloseClick_);var a=this.getElement();DD(a,this.preferredAriaRole_);""!==this.titleTextEl_.id&&ED(a,"labelledby",this.titleTextEl_.id);this.modal_||BBa(this,!1)}; e.exitDocument=function(){this.isVisible()&&this.setVisible(!1);VD(this,!1);TD.superClass_.exitDocument.call(this)}; e.setVisible=function(a){a!=this.isVisible()&&(this.inDocument_||this.render(),TD.superClass_.setVisible.call(this,a))}; e.onShow=function(){TD.superClass_.onShow.call(this);this.dispatchEvent("aftershow")}; e.onHide=function(){TD.superClass_.onHide.call(this);this.dispatchEvent("afterhide");this.disposeOnHide_&&this.dispose()}; e.setDraggerLimits_=function(){var a=this.getDomHelper().getDocument(),b=hg(lg(a)||window),c=Math.max(a.body.scrollWidth,b.width);a=Math.max(a.body.scrollHeight,b.height);var d=yh(this.getElement());"fixed"==rh(this.getElement())?this.dragger_.limits=new Wg(0,0,Math.max(0,b.width-d.width),Math.max(0,b.height-d.height)):this.dragger_.limits=new Wg(0,0,c-d.width,a-d.height)}; e.onTitleCloseClick_=function(){WD(this)}; var WD=function(a){if(a.hasTitleCloseButton_){var b=a.buttons_,c=b&&b.cancelButton_;c?(b=b.get(c),a.dispatchEvent(new XD(c,b))&&a.setVisible(!1)):a.setVisible(!1)}}; TD.prototype.getHasTitleCloseButton=function(){return this.hasTitleCloseButton_}; var CBa=function(a){a.hasTitleCloseButton_=!1;a.titleCloseEl_&&Ah(a.titleCloseEl_,a.hasTitleCloseButton_)}; e=TD.prototype;e.isEscapeToCancel=function(){return this.escapeToCancel_}; e.setDisposeOnHide=function(a){this.disposeOnHide_=a}; e.getDisposeOnHide=function(){return this.disposeOnHide_}; e.disposeInternal=function(){this.buttonEl_=this.titleCloseEl_=null;TD.superClass_.disposeInternal.call(this)}; e.onButtonClick_=function(a){a:{for(a=a.target;null!=a&&a!=this.buttonEl_;){if("BUTTON"==a.tagName)break a;a=a.parentNode}a=null}if(a&&!a.disabled){a=a.name;var b=this.buttons_.get(a);this.dispatchEvent(new XD(a,b))&&this.setVisible(!1)}}; e.onKey_=function(a){var b=!1,c=!1,d=this.buttons_,f=a.target;if("keydown"==a.type){if(this.escapeToCancel_&&27==a.keyCode){var g=d&&d.cancelButton_;f="SELECT"==f.tagName&&!f.disabled;g&&!f?(c=!0,b=d.get(g),b=this.dispatchEvent(new XD(g,b))):f||(b=!0)}else{if(9==a.keyCode&&a.shiftKey&&f==this.getElement()){this.backwardTabWrapInProgress_=!0;try{this.tabCatcherElement_.focus()}catch(n){}Xi(this.resetBackwardTabWrap_,0,this)}}}else if(13==a.keyCode){if("BUTTON"==f.tagName&&!f.disabled)g=f.name;else if(f== this.titleCloseEl_)WD(this);else if(d){var l=d.defaultButton_,m=l&&DBa(d,l);f=("TEXTAREA"==f.tagName||"SELECT"==f.tagName||"A"==f.tagName)&&!f.disabled;!m||m.disabled||f||(g=l)}g&&d&&(c=!0,b=this.dispatchEvent(new XD(g,String(d.get(g)))))}else f!=this.titleCloseEl_||32!=a.keyCode&&" "!=a.key||WD(this);if(b||c)a.stopPropagation(),a.preventDefault();b&&this.setVisible(!1)}; var XD=function(a,b){this.type="dialogselect";this.key=a;this.caption=b}; v(XD,hi);var QD=function(a){HD.call(this);this.dom_=a||ag();this.class_="goog-buttonset";this.cancelButton_=this.element_=this.defaultButton_=null}; v(QD,HD);e=QD.prototype;e.clear=function(){HD.prototype.clear.call(this);this.defaultButton_=this.cancelButton_=null}; e.set=function(a,b,c,d){HD.prototype.set.call(this,a,b);c&&(this.defaultButton_=a);d&&(this.cancelButton_=a);return this}; e.addButton=function(a,b,c){return this.set(a.key,a.caption,b,c)}; e.render=function(){if(this.element_){sc(this.element_,rc);var a=ag(this.element_);this.forEach(function(b,c){b=a.createDom("BUTTON",{name:c},b);c==this.defaultButton_&&(b.className=this.class_+"-default");this.element_.appendChild(b)},this)}}; e.decorate=function(a){if(a&&1==a.nodeType){this.element_=a;a=cg("BUTTON",this.element_);for(var b=0,c,d,f;c=a[b];b++)if(d=c.name||c.id,f=Jg(c)||c.value,d){var g=0==b;this.set(d,f,g,"cancel"==c.name);g&&hj(c,this.class_+"-default")}}}; e.getElement=function(){return this.element_}; e.getDomHelper=function(){return this.dom_}; e.setDefault=function(a){this.defaultButton_=a}; e.setCancel=function(a){this.cancelButton_=a}; var DBa=function(a,b){a=cg("BUTTON",a.element_);for(var c=0,d;d=a[c];c++)if(d.name==b||d.id==b)return d;return null}; QD.prototype.setButtonEnabled=function(a,b){if(a=DBa(this,a))a.disabled=!b}; QD.prototype.setAllButtonsEnabled=function(a){for(var b=cg("BUTTON",this.element_),c=0,d;d=b[c];c++)d.disabled=!a}; var RD={key:"ok",caption:"OK"},SD={key:"cancel",caption:"Cancel"},EBa={key:"yes",caption:"Yes"},FBa={key:"no",caption:"No"},GBa={key:"save",caption:"Save"},HBa={key:"continue",caption:"Continue"};"undefined"!=typeof document&&(new QD().addButton(RD,!0,!0),new QD().addButton(RD,!0).addButton(SD,!1,!0),new QD().addButton(EBa,!0).addButton(FBa,!1,!0),new QD().addButton(EBa).addButton(FBa,!0).addButton(SD,!1,!0),new QD().addButton(HBa).addButton(GBa).addButton(SD,!0,!0));var IBa=function(a,b,c){TD.call(this,a,b,c)}; v(IBa,TD);var JBa=function(a){lD.call(this,a)}; v(JBa,lD);var KBa=Lb(Db("//www-onepick-opensocial.googleusercontent.com/gadgets/js/rpc.js?c=1&container=onepick")),LBa=Lb(Db("//apis.google.com/js/rpc.js"));function MBa(a,b){if(!YD(b)){b=b||ag(document);var c=b.createElement("SCRIPT");xc(c,a);c.type="text/javascript";b.getDocument().body.appendChild(c)}} function YD(a){a=a&&a.getWindow()||window;return a.gadgets&&a.gadgets.rpc} var ZD=null;function NBa(a,b){var c=b&&b.getWindow()||window;if(YD(b))a();else if(ZD)ZD.push(a);else var d=ZD=[a],f=c.setInterval(function(){if(YD(b)){c.clearInterval(f);for(var g=0;gl&&(f=l,d.getBoundingClientRect().left+ l/2>a.getBoundingClientRect().left&&(f=Math.min(f,l/2))));oh(c,"left",f+"px")}}else this.calloutArrow_.update(this.getElement(),b,this.margin_||null);uD(this.getElement(),b)&1?fj(this.iframe_,"picker-min-frame-down"):fj(this.iframe_,"picker-min-frame-up")}}; var dE=function(a){return te&&Fe("7")&&Mb(a.url_,"https")?Lb(Db("https://about:blank")):te?Lb(Db("javascript:\"\"")):Lb(Db("about:blank"))}; e=cE.prototype;e.handleIFrameLoad_=function(){this.iframe_.src!=Hb(dE(this))&&(this.iframeLoaded_=!0,this.getHandler().unlisten(this.getDomHelper().getWindow(),"keydown",this.handleKeydown_),Hg(this.iframe_,!0),this.isVisible()&&Xi(Ta(this.focus,this,this.iframe_),0))}; e.handleKeydown_=function(a){27==a.keyCode&&(PBa(this),a.stopPropagation(),a.preventDefault())}; e.execOnGadgetsLoad_=function(a){var b=this.getDomHelper();NBa(function(){a(b.getWindow().gadgets.rpc)},b)}; e.setUrl=function(a){a=Wq(Wq(new fq(a),"rpctoken",this.rpcToken_),"rpcService",this.targetId_);a.setScheme("https");this.url_=a.toString();this.iframe_&&wc(this.iframe_,mh(this.url_))}; e.setAppId=function(a){this.appId_=a;this.loadedFired_&&eE(this)}; e.setCallback=function(a){this.callback_=a;this.execOnGadgetsLoad_(Ta(function(b){b.register(this.targetId_,Ta(this.handlePickerAction_,this))},this))}; e.handlePickerAction_=function(a){switch(a.action){case"viewUpdated":case"viewChanged":this.reposition();return;case"enableWhiteCallout":a=a.extraUserInputs;var b=this.getElement();a&&a.ewc?hj(b,"picker-white-callout"):jj(b,"picker-white-callout");return;case"loaded":this.loadedFired_=!0;this.sendCommand(new BD(this.isVisible()));eE(this);break;case"blurred":this.getElement()!=Og(this.getDomHelper().getDocument())&&this.isVisible()&&(this.setVisible(!1),this.callback_({action:"cancel"}));return; case"picked":case"cancel":this.setVisible(!1);}this.callback_(a)}; var eE=function(a){a.appId_&&a.sendCommand(new AD(a.appId_,window.location.protocol+"//"+window.location.host))}; e=cE.prototype;e.setRelayUrl=function(a){this.execOnGadgetsLoad_(Ta(function(b){b.setRelayUrl(this.targetId_,a)},this))}; e.setDefaultRelayUrl_=function(a){var b=null,c=a.indexOf("/picker?");-1d&&n.top>m+(r.bottom-r.top))g^=1,c=new $D(a.element,g),b^=1;if(g&4&&r.leftf&&n.right>l+(r.right-r.left))c=new $D(a.element,g^4),b^=4;c&&(this.setPosition(c),this.popupCorner_=b,this.isVisible()&&this.reposition(),this.reposition())}this.iframeLoaded_?this.focus(this.iframe_):this.focus(this.getElement())}; e.onHide=function(a){cE.superClass_.onHide.call(this,a);Rg(this.focusHandler_);tg(this.tabCatcherElement_);this.sendCommand(new BD(!1))}; e.handleDocumentMouseDown_=function(a){a=a.target;zg(this.getElement(),a)||ND(this,a)||this.autoHideRegion_&&!zg(this.autoHideRegion_,a)||150>Wa()-this.lastShowTime_||PBa(this)}; var PBa=function(a){a.isVisible()&&(a.setVisible(!1),a.callback_({action:"cancel"}))}; cE.prototype.disposeInternal=function(){this.canDispose_?(tg(this.getElement()),cE.superClass_.disposeInternal.call(this)):Xi(function(){this.canDispose_=!0;this.disposeInternal()},0,this)};var fE=function(a,b){yi.call(this);this.element_=a;a=xg(this.element_)?this.element_:this.element_?this.element_.body:null;this.isRtl_=!!a&&Bh(a);this.listenKey_=si(this.element_,we?"DOMMouseScroll":"mousewheel",this,b)}; v(fE,yi);fE.prototype.setMaxDeltaX=function(a){this.maxDeltaX_=a}; fE.prototype.setMaxDeltaY=function(a){this.maxDeltaY_=a}; fE.prototype.handleEvent=function(a){var b=0,c=0,d=a.event_;"mousewheel"==d.type?(a=gE(-d.wheelDelta),void 0!==d.wheelDeltaX?(b=gE(-d.wheelDeltaX),c=gE(-d.wheelDeltaY)):c=a):(a=d.detail,100a&&(a=-3),void 0!==d.axis&&d.axis===d.HORIZONTAL_AXIS?b=a:c=a);"number"===typeof this.maxDeltaX_&&(b=Uf(b,-this.maxDeltaX_,this.maxDeltaX_));"number"===typeof this.maxDeltaY_&&(c=Uf(c,-this.maxDeltaY_,this.maxDeltaY_));this.isRtl_&&(b=-b);b=new QBa(a,d,b,c);this.dispatchEvent(b)}; var gE=function(a){return xe&&(ye||Sca)&&0!=a%40?a:a/40}; fE.prototype.disposeInternal=function(){fE.superClass_.disposeInternal.call(this);wi(this.listenKey_);this.listenKey_=null}; var QBa=function(a,b,c,d){ii.call(this,b);this.type="mousewheel";this.detail=a;this.deltaX=c;this.deltaY=d}; v(QBa,ii);var RBa=function(a,b){var c;a:{for(c=b.target;c;){if(1==c.nodeType){var d=qh(c,"overflowY");if("auto"==d||"scroll"==d)break a}c=c.parentNode}c=null}(!c||!zg(a,c)||c.scrollHeight==c.clientHeight||0=Math.abs(c.scrollTop-(c.scrollHeight-c.clientHeight))||0>b.deltaY&&0==c.scrollTop)&&b.stopPropagation()};var hE;var iE=function(a,b,c,d,f,g,l){TD.call(this,g?g+" "+this.className_:this.className_,!0,c);this.useGapiIframesProtocol_="gapi_iframes"==Ld(a,"protocol");this.iframeManager_=new pD;this.targetId_=Hc();this.rpcToken_=Hc();this.useGapi_=!1;this.setUrl(a);this.preferredDialogWidth_=d;this.preferredDialogHeight_=f;void 0!==d||void 0!==f?c=!0:(c=gr(hr(a),"hostId"),hE||(hE=new Set("DocVerse fusiontables geo geowiki gm gmail-gadget gws hotpot jointly presentations pwa sites templates trix trix-copy-sheet webstore".split(" "))), c=!hE.has(c));this.autoSizeDialog_=c;this.gadgetsDomHelper_=l||this.getDomHelper();b&&(gr(hr(a),"hostId"),b="true"==gr(hr(this.url_),"grugl"),MBa(b?LBa:KBa,this.gadgetsDomHelper_));this.setDefaultRelayUrl_(a);this.escapeToCancel_=!1;this.buttons_=null;this.buttonEl_&&(this.buttons_?(a=this.buttons_,a.element_=this.buttonEl_,a.render()):sc(this.buttonEl_,rc),Ah(this.buttonEl_,!!this.buttons_));this.logger_=null}; v(iE,IBa);e=iE.prototype;e.className_="picker modal-dialog";e.url_="";e.iframe_=null;e.iframeLoaded_=!1;e.loadedFired_=!1;e.callback_=Ka;e.enterDocument=function(){iE.superClass_.enterDocument.call(this);var a=this.getBackgroundElement(),b=this.getHandler(),c=new fE(a);Tg(b,c);b.listen(c,"mousewheel",Ta(RBa,void 0,a)).listen(a,"scroll",Ta(RBa,void 0,a))}; e.render=function(a){var b=this;iE.superClass_.render.call(this,a);this.useGapi_?this.iframeManager_.gapiLibPromise_.then(function(){return SBa(b)}).then(null,function(c){return void b.handleError_(c)}):(this.iframe_=this.dom_.createDom("IFRAME",{id:this.targetId_, name:this.targetId_,"class":"picker-frame",onload:Ta(this.handleIFrameLoad_,this),frameBorder:"0",allow:"camera"}),wc(this.iframe_,dE(this)),this.getContentElement().appendChild(this.iframe_),hj(this.getElement(),"picker-dialog"),this.iframe_.src=this.url_,TBa(this),UBa(this))}; var SBa=function(a){var b=a.getDomHelper().createDom("div",["picker-dialog-content","picker-frame"]);Ah(b,!1);a.getContentElement().appendChild(b);return DAa(a.iframeManager_,b,function(c){var d=Nf(Dq,c["iframe-command"]);switch(pf(d,1,0)){case 1:c=a.callback_;var f=M(d,iq,2);d="";switch(f.getStatus()){case 2:d="cancel";break;case 1:d="picked";break;case 3:d="error";}f=f.getItemList();d=0===f.length?{action:d}:uAa(f,d);c.call(a,d);a.setVisible(!1);break;case 4:CBa(a),a.callback_({action:"loaded"});}}, a.url_,a.targetId_,a.rpcToken_).then(function(c){a.iframe_=c.getIframeEl(); a.handleIFrameLoad_();Ah(a.iframe_.parentElement,!0);hj(a.getElement(),"picker-dialog");TBa(a);UBa(a);return c})},TBa=function(a){a.execOnGadgetsLoad_(Ta(function(b){b.setAuthToken(this.targetId_,this.rpcToken_)},a))},UBa=function(a){var b=gr(hr(a.url_),"title"); b&&a.setTitle(b)}; e=iE.prototype;e.getSafeBlankUrl_=function(){return te&&Fe("7")&&Mb(this.url_,"https")?Lb(Db("https://about:blank")):te?Lb(Db("javascript:\"\"")):Lb(Db("about:blank"))}; e.handleIFrameLoad_=function(){this.iframe_.src!=Hb(dE(this))&&(this.iframeLoaded_=!0,Hg(this.iframe_,!0),this.isVisible()&&this.focus())}; e.handleKeydown_=function(a){27==a.keyCode&&(this.setVisible(!1),this.callback_({action:"cancel"}),a.stopPropagation(),a.preventDefault())}; e.execOnGadgetsLoad_=function(a){var b=this.gadgetsDomHelper_;NBa(function(){a(b.getWindow().gadgets.rpc)},b)}; e.setUrl=function(a){a=Wq(new fq(a),"rpcService",this.targetId_);this.useGapi_=void 0!==gr(a,"v2");Wq(a,"rpctoken",this.rpcToken_);cr(a,"rpctoken="+this.rpcToken_);a.setScheme("https");this.url_=a.toString();this.iframe_&&(this.iframe_.src=this.url_)}; e.setAppId=function(a){this.appId_=a;this.loadedFired_&&eE(this)}; e.setCallback=function(a){this.callback_=a;this.execOnGadgetsLoad_(Ta(function(b){b.register(this.targetId_,Ta(this.handlePickerAction_,this))},this))}; e.handlePickerAction_=function(a){var b=a.action;"loaded"==b&&(this.loadedFired_=!0,this.sendCommand(new BD(this.isVisible())),eE(this),CBa(this),this.getHandler().unlisten(this.getDomHelper().getWindow(),"keydown",this.handleKeydown_),Hg(this.iframe_,!0));"picked"!=b&&"cancel"!=b||this.setVisible(!1);this.callback_(a)}; e.setDriveOptions_=function(){this.appId_&&this.sendCommand(new AD(this.appId_,window.location.protocol+"//"+window.location.host))}; e.setRelayUrl=function(a){this.execOnGadgetsLoad_(Ta(function(b){b.setRelayUrl(this.targetId_,a)},this))}; e.setDefaultRelayUrl_=function(a){var b=null,c=a.indexOf("/picker?");-1f||(b[d.substring(0,f)]=d.substring(f+2,d.length))}return b} pE(function(){if(!t.Blob)return!1;var a=new Uint8Array(100);try{var b=new Blob([a])}catch(c){return!1}return 100!=b.size?!1:!0}); var bCa=pE(function(){if(!t.Blob)return!1;var a=new Uint8Array(100);try{var b=new Blob([a])}catch(c){return!1}return null===oE(b,0,1)?!1:!0});var cCa=!/^\s*class\s*\{\s*\}\s*$/.test(function(){}.toString());var rE=Symbol("PIECES");function sE(a,b,c){dCa(a,b);a[b][rE].unshift(c)} function dCa(a,b){if(!a[b]||!a[b][rE]){var c=a[b],d=c?[c]:[];a[b]=function(){for(var f=k(d),g=f.next();!g.done;g=f.next())g.value.apply(this,arguments)}; a[b][rE]=d}} function eCa(a){if(!a)return[];var b=[];a=k(a);for(var c=a.next();!c.done;c=a.next())c=c.value,Array.isArray(c)?b.push.apply(b,fa(eCa(c))):b.push(c);return b} ;var tE=window.Polymer,uE=tE&&tE.version&&tE.version.startsWith("1."),vE=/\bclass\b/.test(function(){}.toString()); window.PolymerFakeBaseClass=function(){}; var O=function(){return PolymerFakeBaseClass.apply(this,arguments)||this}; p(O,PolymerFakeBaseClass);var wE=function(){return PolymerFakeBaseClass.apply(this,arguments)||this}; p(wE,PolymerFakeBaseClass);function fCa(a){var b={};Object.defineProperties(b,Object.getOwnPropertyDescriptors(a));return b} var gCa=Symbol("POLYMER_COMPONENT_DEFINITION"); function hCa(a){var b="string"!==typeof a?a:{is:a,notifyObserversOnUndefined:!0};void 0===b.fastInit&&(b.fastInit=!0);return function(c){if(Object.getPrototypeOf(c.prototype).constructor!==O)throw Error("Custom elements must inherit directly from PolymerElement.");var d=vE&&uE?fCa(c.prototype):c.prototype;d.is=b.is;iCa(d,c,b.fastInit);b.notifyObserversOnUndefined&&(uE?sE(d,"created",function(){var r=this._propertyEffects;if(r)for(var u=k(Object.keys(r)),z=u.next();!z.done;z=u.next()){z=k(r[z.value]); for(var C=z.next();!C.done;C=z.next())if(C=C.value,"compute"===C.kind||"complexObserver"===C.kind)C.effect.args=[]}}):d._overrideLegacyUndefined=!0); if(vE)for(var f=k(Object.getOwnPropertyNames(d)),g=f.next();!g.done;g=f.next()){g=g.value;var l=Object.getOwnPropertyDescriptor(d,g);!1===l.enumerable&&(l.enumerable=!0,Object.defineProperty(d,g,l))}if("template"in c)var m=function(){return c.template};else void 0!==b.template&&(m=b.template);if(void 0!==m){var n;Object.defineProperty(d,"_template",{get:function(){void 0===n&&(n=m());return n}, set:function(r){n=r}, configurable:!0,enumerable:!0})}Polymer(d);c[gCa]=d}} function xE(){var a=void 0===a?{}:a;void 0===a.fastInit&&(a.fastInit=!0);return function(b){if(Object.getPrototypeOf(b.prototype).constructor!==wE)throw Error("Custom behaviors must inherit directly from PolymerBehavior.");iCa(b.prototype,b,a.fastInit)}} function iCa(a,b,c){c=void 0===c?!1:c;jCa(b);uE||!c?sE(a,"ready",function(){for(var d={},f=k(eCa(this.behaviors)),g=f.next();!g.done;g=f.next())g=g.value,g.properties&&Object.assign(d,kCa(this,g.properties));Object.assign(d,kCa(this,this.properties));lCa(b,this);f=k(Object.keys(d));for(g=f.next();!g.done;g=f.next())g=g.value,this[g]=d[g]}):sE(a,"created",function(){lCa(b,this)})} function lCa(a,b){if(vE){a=new a;for(var c=k(Object.getOwnPropertyNames(a)),d=c.next();!d.done;d=c.next())d=d.value,b[d]=a[d];for(c=b;c&&c!==Object.prototype;c=Object.getPrototypeOf(c)){d=k(Object.getOwnPropertyNames(c));for(var f=d.next();!f.done;f=d.next())f=f.value,a.hasOwnProperty(f)||Object.defineProperty(a,f,mCa(b,f))}}else a.apply(b)} function mCa(a,b){return{get:function(){var c=a[b];return c instanceof Function?c.bind(a):c}, set:function(c){a[b]=c}}} function kCa(a,b){if(!b)return{};for(var c={},d=k(Object.keys(b)),f=d.next();!f.done;f=d.next())if(f=f.value,!b[f].readOnly){var g=a[f];void 0!==g&&(c[f]=g)}return c} function jCa(a){var b=new a;a=a.prototype.properties||{};for(var c=k(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,b.hasOwnProperty(d)){var f=a[d];"function"===typeof f&&(a[d]=f={type:f});null!=b[d]&&f.type===Object&&(f.type=nCa(b[d].constructor))}} var oCa=[Array,Boolean,Date,Number,Object,String];function nCa(a){for(var b=k(oCa),c=b.next();!c.done;c=b.next())if(c=c.value,a===c)return c;return Object} function P(a){return function(b,c){b.behaviors=b.behaviors||[];b.behaviors.push(a||(void 0!==window.Reflect&&void 0!==window.Reflect.getMetadata?Reflect.getMetadata("design:type",b,c).prototype:void 0));Object.defineProperty(b,c,{get:function(){return this}, enumerable:!0,configurable:!0})}} function R(a){a=void 0===a?{}:a;return function(b,c){b.properties=b.properties||{};a.type||(a.type=void 0!==window.Reflect&&void 0!==window.Reflect.getMetadata?nCa(Reflect.getMetadata("design:type",b,c)):String);var d=a,f=b.properties[c];b.properties[c]=f?Object.assign(Object.assign({},f),d):d}} function S(a){return function(b,c){b.listeners=b.listeners||{};b.listeners[a]=c}} function yE(a){for(var b=[],c=0;cb?"#"+(16777216|c).toString(16).substr(1):"#"+c.toString(16)},wCa=/^#(?:[0-9a-f]{3}){1,2}$/i;var FE=function(a,b,c){if(isNaN(a)||0>a||255b||255c||255=this.compareBrowserRangeEndpoints(a,1,0):0<=this.compareBrowserRangeEndpoints(a,0,0)&&0>=this.compareBrowserRangeEndpoints(a,1,1)}catch(c){if(!te)throw c;return!1}}; LE.prototype.containsNode=function(a,b){return this.containsRange(ME(a),b)}; LE.prototype.getHtmlFragment=function(){var a=new xCa;oj(this,function(b,c,d){3==b.nodeType?a.append(Cc(b.nodeValue.substring(d.getStartTextOffset(),d.getEndTextOffset()))):1==b.nodeType&&(-1==d.tagType?pg(b)&&a.append(""):(c=b.cloneNode(!1),c=Eg(c),te&&"LI"==b.tagName?a.append(c):(b=c.lastIndexOf("<"),a.append(b?c.substr(0,b):c))))},this); return a.toString()}; LE.prototype.__iterator__=function(){return new KE(this.getStartNode(),this.getStartOffset(),this.getEndNode(),this.getEndOffset())};var NE=function(a){this.range_=a}; v(NE,LE);var PE=function(a){var b=$f(a).createRange();if(3==a.nodeType)b.setStart(a,0),b.setEnd(a,a.length);else if(OE(a)){for(var c,d=a;(c=d.firstChild)&&OE(c);)d=c;b.setStart(d,0);for(d=a;(c=d.lastChild)&&OE(c);)d=c;b.setEnd(d,1==d.nodeType?d.childNodes.length:d.length)}else c=a.parentNode,a=cb(c.childNodes,a),b.setStart(c,a),b.setEnd(c,a+1);return b},QE=function(a,b,c,d){var f=$f(a).createRange(); f.setStart(a,b);f.setEnd(c,d);return f}; e=NE.prototype;e.clone=function(){return new this.constructor(this.range_.cloneRange())}; e.getContainer=function(){return this.range_.commonAncestorContainer}; e.getStartNode=function(){return this.range_.startContainer}; e.getStartOffset=function(){return this.range_.startOffset}; e.getEndNode=function(){return this.range_.endContainer}; e.getEndOffset=function(){return this.range_.endOffset}; e.compareBrowserRangeEndpoints=function(a,b,c){return this.range_.compareBoundaryPoints(1==c?1==b?t.Range.START_TO_START:t.Range.START_TO_END:1==b?t.Range.END_TO_START:t.Range.END_TO_END,a)}; e.isCollapsed=function(){return this.range_.collapsed}; e.getText=function(){return this.range_.toString()}; e.getValidHtml=function(){var a=ag(this.range_.startContainer).createDom("DIV");a.appendChild(this.range_.cloneContents());a=a.innerHTML;if(Mb(a,"<")||!this.isCollapsed()&&!Qb(a,"<"))return a;var b=this.getContainer();b=1==b.nodeType?b:b.parentNode;return Eg(b.cloneNode(!1)).replace(">",">"+a)}; e.select=function(a){var b=lg($f(this.getStartNode()));this.selectInternal(b.getSelection(),a)}; e.selectInternal=function(a){a.removeAllRanges();a.addRange(this.range_)}; e.removeContents=function(){var a=this.range_;a.extractContents();if(a.startContainer.hasChildNodes()){var b=a.startContainer.childNodes[a.startOffset];if(b){var c=b.previousSibling;""==Kg(b)&&tg(b);c&&""==Kg(c)&&tg(c)}}if(ve){b=this.getStartNode();c=this.getStartOffset();var d=this.getEndNode(),f=this.getEndOffset(),g=b.nextSibling;b==d&&b.parentNode&&3==b.nodeType&&g&&3==g.nodeType&&(b.nodeValue+=g.nodeValue,tg(g),a.setStart(b,c),a.setEnd(d,f))}}; e.surroundContents=function(a){this.range_.surroundContents(a);return a}; e.insertNode=function(a,b){var c=this.range_.cloneRange();c.collapse(b);c.insertNode(a);c.detach();return a}; e.surroundWithNodes=function(a,b){var c=lg($f(this.getStartNode()));if(c=RE(c))var d=c.getStartNode(),f=c.getEndNode(),g=c.getStartOffset(),l=c.getEndOffset();var m=this.range_.cloneRange(),n=this.range_.cloneRange();m.collapse(!1);n.collapse(!0);m.insertNode(b);n.insertNode(a);m.detach();n.detach();if(c){if(3==d.nodeType)for(;g>d.length;){g-=d.length;do d=d.nextSibling;while(d==a||d==b)}if(3==f.nodeType)for(;l>f.length;){l-=f.length;do f=f.nextSibling;while(f==a||f==b)}SE(d,g,f,l).select()}}; e.collapse=function(a){this.range_.collapse(a)};var TE=function(a){this.range_=a}; v(TE,NE);TE.prototype.selectInternal=function(a,b){!b||this.isCollapsed()?TE.superClass_.selectInternal.call(this,a,b):(a.collapse(this.getEndNode(),this.getEndOffset()),a.extend(this.getStartNode(),this.getStartOffset()))};var UE=function(a,b){this.endNode_=this.startNode_=this.parentNode_=null;this.endOffset_=this.startOffset_=-1;this.range_=a;this.doc_=b}; v(UE,LE);var VE=function(a){var b=$f(a).body.createTextRange();if(1==a.nodeType)b.moveToElementText(a),OE(a)&&!a.childNodes.length&&b.collapse(!1);else{for(var c=0,d=a;d=d.previousSibling;){var f=d.nodeType;if(3==f)c+=d.length;else if(1==f){b.moveToElementText(d);break}}d||b.moveToElementText(a.parentNode);b.collapse(!d);c&&b.move("character",c);b.moveEnd("character",a.length)}return b}; UE.prototype.clone=function(){var a=new UE(this.range_.duplicate(),this.doc_);a.parentNode_=this.parentNode_;a.startNode_=this.startNode_;a.endNode_=this.endNode_;return a}; UE.prototype.getBrowserRange=function(){return this.range_}; UE.prototype.clearCachedValues_=function(){this.parentNode_=this.startNode_=this.endNode_=null;this.startOffset_=this.endOffset_=-1}; UE.prototype.getContainer=function(){if(!this.parentNode_){var a=this.range_.text,b=this.range_.duplicate(),c=a.replace(/ +$/,"");(c=a.length-c.length)&&b.moveEnd("character",-c);c=b.parentElement();b=b.htmlText.replace(/(\r\n|\r|\n)+/g," ").length;if(this.isCollapsed()&&0c.outerHTML.replace(/(\r\n|\r|\n)+/g," ").length;)c=c.parentNode;for(;1==c.childNodes.length&&c.innerText==zCa(c.firstChild)&&OE(c.firstChild);)c=c.firstChild;0==a.length&&(c=ACa(this,c));this.parentNode_= c}return this.parentNode_}; var ACa=function(a,b){for(var c=b.childNodes,d=0,f=c.length;d=a.compareBrowserRangeEndpoints(l,1,0):a.range_.inRange(l))return ACa(a,g)}}return b}; e=UE.prototype;e.getStartNode=function(){this.startNode_||(this.startNode_=WE(this,1),this.isCollapsed()&&(this.endNode_=this.startNode_));return this.startNode_}; e.getStartOffset=function(){0>this.startOffset_&&(this.startOffset_=BCa(this,1),this.isCollapsed()&&(this.endOffset_=this.startOffset_));return this.startOffset_}; e.getEndNode=function(){if(this.isCollapsed())return this.getStartNode();this.endNode_||(this.endNode_=WE(this,0));return this.endNode_}; e.getEndOffset=function(){if(this.isCollapsed())return this.getStartOffset();0>this.endOffset_&&(this.endOffset_=BCa(this,0),this.isCollapsed()&&(this.startOffset_=this.endOffset_));return this.endOffset_}; e.compareBrowserRangeEndpoints=function(a,b,c){return this.range_.compareEndPoints((1==b?"Start":"End")+"To"+(1==c?"Start":"End"),a)}; var WE=function(a,b,c){c=c||a.getContainer();if(!c||!c.firstChild)return c;for(var d=1==b,f=0,g=c.childNodes.length;fa.compareBrowserRangeEndpoints(r,1, 0)&&0"+a+"";else if(a.match(/^\s*";else if(a.match(/^\s*";else if(a.match(/^\s*"+a+""}return a}; e.__iterator__=function(){return new KE(this.getStartNode(),this.getStartOffset(),this.getEndNode(),this.getEndOffset())}; e.select=function(){iF(this).select(this.isReversed_)}; e.removeContents=function(){iF(this).removeContents();this.clearCachedValues_()}; e.surroundContents=function(a){a=iF(this).surroundContents(a);this.clearCachedValues_();return a}; e.insertNode=function(a,b){a=iF(this).insertNode(a,b);this.clearCachedValues_();return a}; e.surroundWithNodes=function(a,b){iF(this).surroundWithNodes(a,b);this.clearCachedValues_()}; e.saveUsingDom=function(){return new kF(this)}; e.saveUsingCarets=function(){return this.getStartNode()&&this.getEndNode()?new bF(this):null}; e.collapse=function(a){a=this.isReversed()?!a:a;this.browserRangeWrapper_&&this.browserRangeWrapper_.collapse(a);a?(this.endNode_=this.startNode_,this.endOffset_=this.startOffset_):(this.startNode_=this.endNode_,this.startOffset_=this.endOffset_);this.isReversed_=!1}; var kF=function(a){Sg.call(this);this.anchorNode_=a.isReversed()?a.getEndNode():a.getStartNode();this.anchorOffset_=a.isReversed()?a.getEndOffset():a.getStartOffset();this.focusNode_=a.isReversed()?a.getStartNode():a.getEndNode();this.focusOffset_=a.isReversed()?a.getStartOffset():a.getEndOffset()}; v(kF,aF);kF.prototype.restoreInternal=function(){return SE(this.anchorNode_,this.anchorOffset_,this.focusNode_,this.focusOffset_)}; kF.prototype.disposeInternal=function(){kF.superClass_.disposeInternal.call(this);this.focusNode_=this.anchorNode_=null};var lF=function(){}; v(lF,HE);lF.prototype.containsRange=function(a,b){var c=IE(this);a=IE(a);return(b?hb:jb)(a,function(d){return hb(c,function(f){return f.containsRange(d,b)})})}; lF.prototype.containsNode=function(a,b){return this.containsRange(gF(a),b)}; lF.prototype.insertNode=function(a,b){b?rg(a,this.getStartNode()):sg(a,this.getEndNode());return a}; lF.prototype.surroundWithNodes=function(a,b){this.insertNode(a,!0);this.insertNode(b,!1)};var mF=function(){this.sortedElements_=this.elements_=this.range_=null}; v(mF,lF);var nF=function(a){var b=new mF;b.range_=a;return b},FCa=function(a){for(var b=$f(arguments[0]).body.createControlRange(),c=0,d=arguments.length;cb.right&&(this.dragger_.deltaX=c-this.draggerEl_.halfWidth);d>b.bottom&&(this.dragger_.deltaY=d-this.draggerEl_.halfHeight)}this.draggerEl_.style.visibility="";this.updateWhileDragging_&&(this.currDragItem_.style.display="none");DF(this,this.currDragItem_);this.currDragItem_.style.display="";si(this.dragger_,"drag",this.handleDragMove_,!1,this);this.dispatchEvent(new EF(AF,this,a.browserEvent,this.currDragItem_,this.draggerEl_, this.dragger_))}else a.preventDefault(),this.cleanup_()}; e.handleDragMove_=function(a){var b=vh(this.draggerEl_);b=new Wf(b.x+this.draggerEl_.halfWidth,b.y+this.draggerEl_.halfHeight);a:{var c=null;if("none"!=this.currDragItem_.style.display){c=this.currDragItem_.parentNode;var d=zh(c);if(TCa(b,d))break a}d=0;for(var f=this.dragLists_.length;dg?null:n}else l=null;if(!this.dispatchEvent(new EF(MCa,this,a,this.currDragItem_,this.draggerEl_,this.dragger_, b,c,l)))return!1;if(c&&1!=c.dlgDragPermission)this.updateWhileDragging_?this.currDragItem_.parentNode==c&&wg(this.currDragItem_)==l||c.insertBefore(this.currDragItem_,l):l&&(this.currHoverItem_=l),this.currDragItem_.style.display="",c.dlgDragHoverClass_&&hj(c,c.dlgDragHoverClass_);else for(this.isCurrDragItemAlwaysDisplayed_||(this.currDragItem_.style.display="none"),m=0,r=this.dragLists_.length;mb.left&&a.xb.top&&a.yb},EF=function(a,b,c,d,f,g,l,m,n){hi.call(this,a); this.dragListGroup=b;this.event=c;this.currDragItem=d;this.draggerEl=f;this.dragger=g;this.draggerElCenter=l;this.hoverList=m;this.hoverNextItem=n}; v(EF,hi);var FF=function(a,b,c){Sg.call(this);this.constrainScroll_=!1;this.horizontalScrolling_=!0;this.containerNode_=a;this.scrollTimer_=new Wi(50);this.eventHandler_=new Kq(this);this.scrollDelta_=new Wf;this.containerBounds_=zh(a);if("BODY"===a.tagName||"HTML"===a.tagName)a=hg(),this.containerBounds_.height=a.height,this.containerBounds_.width=a.width;this.margin_=b||0;if(b){if(b=this.containerBounds_.clone(),a=this.margin_){var d=Math.min(a,.25*b.height);b.top+=d;b.height-=2*d;a=Math.min(a,.25*b.width); b.left+=a;b.width-=2*a}}else b=this.containerBounds_;this.scrollBounds_=b;c||this.eventHandler_.listen($f(this.containerNode_),"mousemove",this.onMouseMove);this.eventHandler_.listen(this.scrollTimer_,"tick",this.onTick_)}; v(FF,Sg);FF.prototype.onTick_=function(){this.containerNode_.scrollTop+=this.scrollDelta_.y;this.containerNode_.scrollLeft+=this.scrollDelta_.x}; FF.prototype.onMouseMove=function(a){var b=this.horizontalScrolling_?$Ca(a.clientX,this.scrollBounds_.left,this.scrollBounds_.width):0,c=$Ca(a.clientY,this.scrollBounds_.top,this.scrollBounds_.height);this.scrollDelta_.x=b;this.scrollDelta_.y=c;!(b=!b&&!c)&&(b=this.constrainScroll_)&&(b=a.clientX,a=a.clientY,c=this.containerBounds_,b=!(c.left<=b&&c.left+c.width>=b&&c.top<=a&&c.top+c.height>=a));b?this.scrollTimer_.stop():this.scrollTimer_.enabled||this.scrollTimer_.start()}; var $Ca=function(a,b,c){var d=0;ab+c&&(d=8);return d}; FF.prototype.disposeInternal=function(){FF.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.scrollTimer_.dispose()};var aDa={COMPACT_DECIMAL_SHORT_PATTERN:{1E3:{other:"0K"},1E4:{other:"00K"},1E5:{other:"000K"},1E6:{other:"0M"},1E7:{other:"00M"},1E8:{other:"000M"},1E9:{other:"0B"},1E10:{other:"00B"},1E11:{other:"000B"},1E12:{other:"0T"},1E13:{other:"00T"},1E14:{other:"000T"}},COMPACT_DECIMAL_LONG_PATTERN:{1E3:{other:"0 thousand"},1E4:{other:"00 thousand"},1E5:{other:"000 thousand"},1E6:{other:"0 million"},1E7:{other:"00 million"},1E8:{other:"000 million"},1E9:{other:"0 billion"},1E10:{other:"00 billion"},1E11:{other:"000 billion"}, 1E12:{other:"0 trillion"},1E13:{other:"00 trillion"},1E14:{other:"000 trillion"}}},GF=aDa;GF=aDa;var bDa=!1,dDa=function(){if(!bDa){for(var a in cDa)HF[a]=cDa[a];bDa=!0}},HF={AED:[2, "dh","\u062F.\u0625."],ALL:[0,"Lek","Lek"],AUD:[2,"$","AU$"],BDT:[2,"\u09F3","Tk"],BGN:[2,"lev","lev"],BRL:[2,"R$","R$"],CAD:[2,"$","C$"],CDF:[2,"FrCD","CDF"],CHF:[2,"CHF","CHF"],CLP:[0,"$","CL$"],CNY:[2,"\xA5","RMB\xA5"],COP:[32,"$","COL$"],CRC:[0,"\u20A1","CR\u20A1"],CZK:[50,"K\u010D","K\u010D"],DKK:[50,"kr.","kr."],DOP:[2,"RD$","RD$"],EGP:[2,"\xA3","LE"],ETB:[2,"Birr","Birr"],EUR:[2,"\u20AC","\u20AC"],GBP:[2,"\xA3","GB\xA3"],HKD:[2,"$","HK$"],HRK:[2,"kn","kn"],HUF:[34,"Ft","Ft"],IDR:[0, "Rp","Rp"],ILS:[34,"\u20AA","IL\u20AA"],INR:[2,"\u20B9","Rs"],IRR:[0,"Rial","IRR"],ISK:[0,"kr","kr"],JMD:[2,"$","JA$"],JPY:[0,"\xA5","JP\xA5"],KRW:[0,"\u20A9","KR\u20A9"],LKR:[2,"Rs","SLRs"],LTL:[2,"Lt","Lt"],MNT:[0,"\u20AE","MN\u20AE"],MVR:[2,"Rf","MVR"],MXN:[2,"$","Mex$"],MYR:[2,"RM","RM"],NOK:[50,"kr","NOkr"],PAB:[2,"B/.","B/."],PEN:[2,"S/.","S/."],PHP:[2,"\u20B1","PHP"],PKR:[0,"Rs","PKRs."],PLN:[50,"z\u0142","z\u0142"],RON:[2,"RON","RON"],RSD:[0,"din","RSD"],RUB:[50,"\u20BD","RUB"],SAR:[2, "Rial","Rial"],SEK:[50,"kr","kr"],SGD:[2,"$","S$"],THB:[2,"\u0E3F","THB"],TRY:[2,"\u20BA","TRY"],TWD:[2,"$","NT$"],TZS:[0,"TSh","TSh"],UAH:[2,"\u0433\u0440\u043D.","UAH"],USD:[2,"$","US$"],UYU:[2,"$","$U"],VND:[48,"\u20AB","VN\u20AB"],YER:[0,"Rial","Rial"],ZAR:[2,"R","ZAR"]},cDa={AFN:[48,"Af.","AFN"],AMD:[32,"Dram","dram"],ANG:[2,"NAf.","ANG"],AOA:[2,"Kz","Kz"],ARS:[34,"$","AR$"],AWG:[2,"Afl.","Afl."],AZN:[34,"\u20BC","AZN"],BAM:[2,"KM","KM"],BBD:[2,"$","Bds$"],BHD:[3,"din","din"],BIF:[0,"FBu","FBu"], BMD:[2,"$","BD$"],BND:[2,"$","B$"],BOB:[2,"Bs","Bs"],BSD:[2,"$","BS$"],BTN:[2,"Nu.","Nu."],BWP:[2,"P","pula"],BYN:[50,"\u0440.","BYN"],BYR:[48,"\u0440.","BYR"],BZD:[2,"$","BZ$"],CLF:[4,"UF","CLF"],CNH:[2,"\xA5","RMB\xA5"],CUC:[1,"$","CUC$"],CUP:[2,"$","CU$"],CVE:[2,"CVE","Esc"],DJF:[0,"Fdj","Fdj"],DZD:[2,"din","din"],ERN:[2,"Nfk","Nfk"],FJD:[2,"$","FJ$"],FKP:[2,"\xA3","FK\xA3"],GEL:[2,"GEL","GEL"],GHS:[2,"GHS","GHS"],GIP:[2,"\xA3","GI\xA3"],GMD:[2,"GMD","GMD"],GNF:[0,"FG","FG"],GTQ:[2, "Q","GTQ"],GYD:[0,"$","GY$"],HNL:[2,"L","HNL"],HTG:[2,"HTG","HTG"],IQD:[0,"din","IQD"],JOD:[3,"din","JOD"],KES:[2,"Ksh","Ksh"],KGS:[2,"KGS","KGS"],KHR:[2,"Riel","KHR"],KMF:[0,"CF","KMF"],KPW:[0,"\u20A9KP","KPW"],KWD:[3,"din","KWD"],KYD:[2,"$","KY$"],KZT:[2,"\u20B8","KZT"],LAK:[0,"\u20AD","\u20AD"],LBP:[0,"L\xA3","LBP"],LRD:[2,"$","L$"],LSL:[2,"LSL","LSL"],LYD:[3,"din","LD"],MAD:[2,"dh","MAD"],MDL:[2,"MDL","MDL"],MGA:[0,"Ar","MGA"],MKD:[2,"din","MKD"],MMK:[0,"K","MMK"],MOP:[2,"MOP","MOP$"],MRO:[0, "MRO","MRO"],MUR:[0,"MURs","MURs"],MWK:[2,"MWK","MWK"],MZN:[2,"MTn","MTn"],NAD:[2,"$","N$"],NGN:[2,"\u20A6","NG\u20A6"],NIO:[2,"C$","C$"],NPR:[2,"Rs","NPRs"],NZD:[2,"$","NZ$"],OMR:[3,"Rial","OMR"],PGK:[2,"PGK","PGK"],PYG:[16,"Gs.","PYG"],QAR:[2,"Rial","QR"],RWF:[0,"RF","RF"],SBD:[2,"$","SI$"],SCR:[2,"SCR","SCR"],SDG:[2,"SDG","SDG"],SHP:[2,"\xA3","SH\xA3"],SLL:[0,"SLL","SLL"],SOS:[0,"SOS","SOS"],SRD:[2,"$","SR$"],SSP:[2,"\xA3","SSP"],STD:[0,"Db","Db"],SYP:[0,"\xA3","SY\xA3"],SZL:[2,"SZL", "SZL"],TJS:[2,"Som","TJS"],TMT:[50,"m","TMT"],TND:[3,"din","DT"],TOP:[2,"T$","T$"],TTD:[2,"$","TT$"],UGX:[0,"UGX","UGX"],UZS:[0,"so\u02BCm","UZS"],VEF:[2,"Bs","Bs"],VES:[2,"Bs","Bs"],VUV:[0,"VUV","VUV"],WST:[2,"WST","WST"],XAF:[0,"FCFA","FCFA"],XCD:[2,"$","EC$"],XOF:[0,"CFA","CFA"],XPF:[48,"FCFP","FCFP"],ZMW:[0,"ZMW","ZMW"],ZWD:[0,"$","Z$"]};var IF=function(){},KF=function(a){if("number"==typeof a){var b=new IF; b.standardOffset_=a;var c=a;if(0==c)c="Etc/GMT";else{var d=["Etc/GMT",0>c?"-":"+"];c=Math.abs(c);d.push(Math.floor(c/60)%100);c%=60;0!=c&&d.push(":",Gc(c,2));c=d.join("")}b.timeZoneId_=c;c=eDa(a);a=JF(a);b.tzNames_=[c,c];b.tzNamesExt_={STD_LONG_NAME_GMT:a,STD_GENERIC_LOCATION:a};b.transitions_=[];return b}b=new IF;b.timeZoneId_=a.id;b.standardOffset_=-a.std_offset;b.tzNames_=a.names;b.tzNamesExt_=a.names_ext;b.transitions_=a.transitions;return b},JF=function(a){var b=["GMT"]; b.push(0>=a?"+":"-");a=Math.abs(a);b.push(Gc(Math.floor(a/60)%100,2),":",Gc(a%60,2));return b.join("")},eDa=function(a){if(0==a)return"UTC"; var b=["UTC",0>a?"+":"-"];a=Math.abs(a);b.push(Math.floor(a/60)%100);a%=60;0!=a&&b.push(":",a);return b.join("")}; IF.prototype.getTimeZoneData=function(){return{id:this.timeZoneId_,std_offset:-this.standardOffset_,names:qb(this.tzNames_),names_ext:y.clone(this.tzNamesExt_),transitions:qb(this.transitions_)}}; var LF=function(a,b){b=Date.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes())/36E5;for(var c=0;c=a.transitions_[c];)c+=2;return 0==c?0:a.transitions_[c-1]}; IF.prototype.getUTCString=function(a){return eDa(this.standardOffset_-LF(this,a))}; IF.prototype.getLongNameGMT=function(a){return 0a)var b=this.dateTimeSymbols_.DATEFORMATS[a];else if(8>a)b=this.dateTimeSymbols_.TIMEFORMATS[a-4];else if(12>a)b=this.dateTimeSymbols_.DATETIMEFORMATS[a-8],b=b.replace("{1}",this.dateTimeSymbols_.DATEFORMATS[a-8]),b=b.replace("{0}",this.dateTimeSymbols_.TIMEFORMATS[a-8]);else{this.applyStandardPattern_(10);return}this.applyPattern_(b)}; var PF=function(a,b){b=String(b);a=a.dateTimeSymbols_||NA;if(void 0!==a.ZERODIGIT&&!hDa){for(var c=[],d=0;d=f?String.fromCharCode(a.ZERODIGIT+f-48):b.charAt(d))}b=c.join("")}return b},hDa=!1,OF=!1,QF=function(a){if(!(a.getHours&&a.getSeconds&&a.getMinutes))throw Error("The date to format has no time (probably a goog.date.Date). Use Date or goog.date.DateTime, or use a pattern without time fields."); },gDa=function(a,b,c,d,f,g){var l=b.length; switch(b.charAt(0)){case"G":return c=0c&&(c=-c),2==l&&(c%=100),PF(a,Gc(c,l));case"Y":return c=new Date(PA(d.getFullYear(),d.getMonth(),d.getDate(),a.dateTimeSymbols_.FIRSTWEEKCUTOFFDAY,a.dateTimeSymbols_.FIRSTDAYOFWEEK)).getFullYear(),0>c&&(c=-c),2==l&&(c%=100),PF(a,Gc(c,l));case"M":a:switch(c=d.getMonth(),l){case 5:l=a.dateTimeSymbols_.NARROWMONTHS[c];break a;case 4:l=a.dateTimeSymbols_.MONTHS[c]; break a;case 3:l=a.dateTimeSymbols_.SHORTMONTHS[c];break a;default:l=PF(a,Gc(c+1,l));}return l;case"k":return QF(f),PF(a,Gc(NF(f)||24,l));case"S":return PF(a,(f.getMilliseconds()/1E3).toFixed(Math.min(3,l)).substr(2)+(3l?1:0];case"h":return QF(f),PF(a,Gc(NF(f)%12||12,l));case"K":return QF(f),PF(a,Gc(NF(f)%12,l)); case"H":return QF(f),PF(a,Gc(NF(f),l));case"c":a:switch(c=d.getDay(),l){case 5:l=a.dateTimeSymbols_.STANDALONENARROWWEEKDAYS[c];break a;case 4:l=a.dateTimeSymbols_.STANDALONEWEEKDAYS[c];break a;case 3:l=a.dateTimeSymbols_.STANDALONESHORTWEEKDAYS[c];break a;default:l=PF(a,Gc(c,1));}return l;case"L":a:switch(c=d.getMonth(),l){case 5:l=a.dateTimeSymbols_.STANDALONENARROWMONTHS[c];break a;case 4:l=a.dateTimeSymbols_.STANDALONEMONTHS[c];break a;case 3:l=a.dateTimeSymbols_.STANDALONESHORTMONTHS[c];break a; default:l=PF(a,Gc(c+1,l));}return l;case"Q":return c=Math.floor(d.getMonth()/3),4>l?a.dateTimeSymbols_.SHORTQUARTERS[c]:a.dateTimeSymbols_.QUARTERS[c];case"d":return PF(a,Gc(d.getDate(),l));case"m":return QF(f),PF(a,Gc(f.getMinutes(),l));case"s":return QF(f),PF(a,Gc(f.getSeconds(),l));case"v":return l=g||KF(c.getTimezoneOffset()),l.timeZoneId_;case"V":return a=g||KF(c.getTimezoneOffset()),2>=l?a.timeZoneId_:0l?a.tzNames_[0l?(l=-(b.standardOffset_-LF(b,c)),a=[0>l?"-":"+"],l=Math.abs(l),a.push(Gc(Math.floor(l/60)%100,2),Gc(l%60,2)),l=a.join("")):l=PF(a,JF(b.standardOffset_-LF(b,c))),l;default:return"";}};var RF=function(a){this.patternParts_=[];this.dateTimeSymbols_=NA;"number"==typeof a?this.applyStandardPattern_(a):this.applyPattern_(a)}; RF.prototype.applyPattern_=function(a){for(var b=!1,c="",d=0;da)var b=this.dateTimeSymbols_.DATEFORMATS[a];else 8>a?b=this.dateTimeSymbols_.TIMEFORMATS[a-4]:(b=this.dateTimeSymbols_.DATETIMEFORMATS[a-8],b=b.replace("{1}",this.dateTimeSymbols_.DATEFORMATS[a-8]),b=b.replace("{0}",this.dateTimeSymbols_.TIMEFORMATS[a-8]));this.applyPattern_(b)}; RF.prototype.parse=function(a,b,c){return TF(this,a,b,c||0,!1)}; var TF=function(a,b,c,d,f){for(var g=new iDa,l=[d],m=-1,n=0,r=0,u=0;um&&a.patternParts_[u].abutStart&&(m=u,n=d,r=0),0<=m){var z=a.patternParts_[u].count;if(u==m&&(z-=r,r++,0==z))return 0;jDa(a,b,l,a.patternParts_[u],z,g)||(u=m-1,l[0]=n)}else{if(m=-1,!jDa(a,b,l,a.patternParts_[u],0,g))return 0}}else{m=-1;if(" "==a.patternParts_[u].text.charAt(0)){if(z=l[0],kDa(b,l),l[0]>z)continue}else if(b.indexOf(a.patternParts_[u].text,l[0])==l[0]){l[0]+= a.patternParts_[u].text.length;continue}return 0}a:{if(null==c)throw Error("Parameter 'date' should not be null.");void 0!=g.era&&void 0!=g.year&&0==g.era&&0b?b:a));"function"===typeof c.setHours&&(void 0==g.hours&&(g.hours=c.getHours()),void 0!=g.ampm&&0g.hours&&(g.hours+=12), c.setHours(g.hours));"function"===typeof c.setMinutes&&void 0!=g.minutes&&c.setMinutes(g.minutes);"function"===typeof c.setSeconds&&void 0!=g.seconds&&c.setSeconds(g.seconds);"function"===typeof c.setMilliseconds&&void 0!=g.milliseconds&&c.setMilliseconds(g.milliseconds);if(f&&(void 0!=g.year&&g.year!=c.getFullYear()||void 0!=g.month&&g.month!=c.getMonth()||void 0!=g.day&&g.day!=c.getDate()||24<=g.hours||60<=g.minutes||60<=g.seconds||1E3<=g.milliseconds))c=!1;else{void 0!=g.tzOffset&&c.setTime(c.getTime()+ 6E4*(g.tzOffset-c.getTimezoneOffset()));g.ambiguousYear&&(f=new Date,f.setFullYear(f.getFullYear()-80),c.getTime()=a.count)return!1; var b="MydhHmsSDkK".indexOf(a.text.charAt(0));return 0a.count},kDa=function(a,b){(a=a.substring(b[0]).match(/^\s+/))&&(b[0]+=a[0].length)},jDa=function(a,b,c,d,f,g){kDa(b,c); var l=c[0],m=d.text.charAt(0),n=-1;if(SF(d))if(0b.length)return!1;n=UF(a,b.substring(0,l+f),c)}else n=UF(a,b,c);switch(m){case"G":return n=VF(b,c,a.dateTimeSymbols_.ERAS),0<=n&&(g.era=n),!0;case"M":case"L":a:{d=n;if(0>d){d=VF(b,c,a.dateTimeSymbols_.MONTHS.concat(a.dateTimeSymbols_.STANDALONEMONTHS).concat(a.dateTimeSymbols_.SHORTMONTHS).concat(a.dateTimeSymbols_.STANDALONESHORTMONTHS));if(0>d){g=!1;break a}g.month=d%12}else g.month=d-1;g=!0}return g;case"E":return d=VF(b,c,a.dateTimeSymbols_.WEEKDAYS), 0>d&&(d=VF(b,c,a.dateTimeSymbols_.SHORTWEEKDAYS)),0>d?g=!1:(g.dayOfWeek=d,g=!0),g;case"a":return n=VF(b,c,a.dateTimeSymbols_.AMPMS),0<=n&&(g.ampm=n),!0;case"y":a:{if(0>n){var r=b.charAt(c[0]);if("+"!=r&&"-"!=r){g=!1;break a}c[0]++;n=UF(a,b,c);if(0>n){g=!1;break a}"-"==r&&(n=-n)}r||2!=c[0]-l||2!=d.count?g.year=n:(a=n,b=new Date().getFullYear()-80,c=b%100,g.ambiguousYear=a==c,a+=100*Math.floor(b/100)+(an?(d=VF(b,c,a.dateTimeSymbols_.QUARTERS),0> d&&(d=VF(b,c,a.dateTimeSymbols_.SHORTQUARTERS)),0>d?g=!1:(g.month=3*d,g.day=1,g=!0)):g=!1,g;case"d":return 0<=n&&(g.day=n),!0;case"S":return a=c[0]-l,g.milliseconds=3>a?n*Math.pow(10,3-a):Math.round(n/Math.pow(10,a-3)),!0;case"h":12==n&&(n=0);case"K":case"H":case"k":return 0<=n&&(g.hours=n),!0;case"m":return 0<=n&&(g.minutes=n),!0;case"s":return 0<=n&&(g.seconds=n),!0;case"z":case"Z":case"v":b.indexOf("GMT",c[0])==c[0]&&(c[0]+=3);a:if(c[0]>=b.length)g.tzOffset=0,g=!0;else{d=1;switch(b.charAt(c[0])){case"-":d= -1;case"+":c[0]++;}l=c[0];n=UF(a,b,c);if(0>n)g=!1;else{if(c[0]n){g=!1;break a}r+=n}else r=n,r=24>r&&2>=c[0]-l?60*r:r%100+r/100*60;g.tzOffset=-(r*d);g=!0}}return g;default:return!1;}},UF=function(a,b,c){if(a.dateTimeSymbols_.ZERODIGIT){for(var d=[],f=c[0];f=g?String.fromCharCode(g+48):b.charAt(f))}b=d.join("")}else b=b.substring(c[0]);a=b.match(/^\d+/);if(!a)return-1;c[0]+=a[0].length;return parseInt(a[0],10)},VF=function(a,b,c){var d=0,f=-1; a=a.substring(b[0]).toLowerCase();for(var g=0;gd&&0==a.indexOf(c[g].toLowerCase())&&(f=g,d=l)}0<=f&&(b[0]+=d);return f},iDa=function(){};var lDa={DECIMAL_SEP:".",GROUP_SEP:",",PERCENT:"%",ZERO_DIGIT:"0",PLUS_SIGN:"+",MINUS_SIGN:"-",EXP_SYMBOL:"E",PERMILL:"\u2030",INFINITY:"\u221E",NAN:"NaN",DECIMAL_PATTERN:"#,##0.###",SCIENTIFIC_PATTERN:"#E0",PERCENT_PATTERN:"#,##0%",CURRENCY_PATTERN:"\xA4#,##0.00",DEF_CURRENCY_CODE:"USD"},mDa=lDa;mDa=lDa;var XF=function(a){var b;if(b=a){a:if(a&&3===a.length){for(b=0;3>b;b++){var c=a[b];if("A">c||"Z"c||"z"d&&m++;break;case"0":if(0d&&m++;break;case",":0f+g||1>this.minExponentDigits_)throw Error("Malformed exponential pattern \""+a+"\"");r=!1;break;default:b[0]--,r=!1;}0==g&&0d&&0f+g)||0==m)throw Error("Malformed pattern \""+a+"\"");l=f+g+l;this.maximumFractionDigits_=0<= d?l-d:0;0<=d&&(this.minimumFractionDigits_=f+g-d,0>this.minimumFractionDigits_&&(this.minimumFractionDigits_=0));this.minimumIntegerDigits_=(0<=d?d:l)-f;this.useExponentialNotation_&&(this.maximumIntegerDigits_=f+this.minimumIntegerDigits_,0==this.maximumFractionDigits_&&0==this.minimumIntegerDigits_&&(this.minimumIntegerDigits_=1));this.groupingArray_.push(Math.max(0,m));this.decimalSeparatorAlwaysShown_=0==d||d==l;c=b[0]-c;this.positiveSuffix_=ZF(this,a,b);b[0]this.negativePrefix_.length?d=!1:this.positivePrefix_.length=T)J+=T,m=!0;else if(E==u.charAt(0)){if(g||l)break;J+=".";g=!0}else if(E==z.charAt(0)&&("\xA0"!=z.charAt(0)||b[0]+1=c?0:aG(c)).divisorBase,d=bG(d,-f),cG(this,d),c=bG(c,-f),c=cG(this,c),f=pDa(this,f+aG(c.intValue));a=bG(a,-f.divisorBase);(c=0>a||0==a&&0>1/a)?f.negative_prefix?b.push(f.negative_prefix):(b.push(f.prefix),b.push(this.negativePrefix_)):(b.push(f.prefix),b.push(this.positivePrefix_)); if(isFinite(a)){if(a=a*(c?-1:1)*this.multiplier_,this.useExponentialNotation_){if(0==a)dG(this,a,this.minimumIntegerDigits_,b),qDa(this,0,b);else{d=Math.floor(Math.log(a)/Math.log(10)+2e-15);a=bG(a,-d);var g=this.minimumIntegerDigits_;1this.minimumIntegerDigits_?(g=d%this.maximumIntegerDigits_,0>g&&(g=this.maximumIntegerDigits_+g),a=bG(a,g),d-=g,g=1):1>this.minimumIntegerDigits_?(d++,a=bG(a,-1)):(d-=this.minimumIntegerDigits_-1,a=bG(a,this.minimumIntegerDigits_- 1));dG(this,a,g,b);qDa(this,d,b)}}else dG(this,a,this.minimumIntegerDigits_,b);}else b.push(WF(this).INFINITY);c?f.negative_suffix?b.push(f.negative_suffix):(b.push(f.suffix),b.push(this.negativeSuffix_)):(b.push(f.suffix),b.push(this.positiveSuffix_));return b.join("")}; var cG=function(a,b){var c=bG(b,a.maximumFractionDigits_);0a.maximumFractionDigits_)throw Error("Min value must be less than max value"); d||(d=[]);b=cG(a,b);var f=b.intValue,g=b.fracValue,l=0==f?0:aG(f)+1,m=0g.length&&(g="1"+Fc("0",a.maximumFractionDigits_-g.length)+g);for(a=g.length;"0"==g.charAt(a-1)&&a>b+1;)a--;for(f=1;fb?(b=-b,c.push(WF(a).MINUS_SIGN)):a.useSignForPositiveExponent_&&c.push(WF(a).PLUS_SIGN);b=""+b;for(var d=WF(a).ZERO_DIGIT,f=b.length;fb)return b-48;a=WF(a).ZERO_DIGIT.charCodeAt(0);return a<=b&&bb)return $F;b=Math.min(14,b);var c=a[bG(1,b)];for(--b;!c&&3<=b;)c=a[bG(1,b)],b--;if(!c)return $F;c=c.other;var d=a="",f=c.indexOf(";");0<=f&&(c=c.substring(0,f),f=c.substring(f+1))&&(d=/([^0]*)(0+)(.*)/.exec(f),a=d[1],d=d[3]);return c&&"0"!=c?(c=/([^0]*)(0+)(.*)/.exec(c))?{divisorBase:b+ 1-(c[2].length-1),negative_prefix:a,negative_suffix:d,prefix:c[1],suffix:c[3]}:$F:$F},aG=function(a){if(!isFinite(a))return 0=c)return 0;if(1<=c)return 1;for(var d=0,f=1,g=0,l=0;8>l;l++){g=fG(a,c);var m=(fG(a,c+1E-6)-g)/1E-6;if(1E-6>Math.abs(g-b))return c;if(1E-6>Math.abs(m))break;else gl;l++)g",null)}else d=Cc(b),d=pc("",null);se&&!xe?sc(c.documentElement,d):c.write(nc(d));a.ignoreResponse_||si(c.getElementById(b),"load",a.onIframeLoaded_,!1,a);d=cg("TEXTAREA",a.form_);for(var f=0,g=d.length;fNumber(Ee)){var a=this.iframe_;var b=Xb(Cb(Db("javascript:\"\"")));tc(a,b)}a=this.iframe_.style;a.visibility="hidden";a.width=a.height="10px";a.display="none";xe?a.marginTop=a.marginLeft="-10px":(a.position="absolute",a.top=a.left="-10px")}; var BDa=function(a){var b=a.iframe_;b&&(b.onreadystatechange=null,b.onload=null,b.onerror=null,a.iframesForDisposal_.push(b));a.iframeDisposalTimer_&&(Yi(a.iframeDisposalTimer_),a.iframeDisposalTimer_=null);we||se&&!xe?a.iframeDisposalTimer_=Xi(a.disposeIframes_,2E3,a):a.disposeIframes_();a.iframe_=null;a.iframeName_=null}; gG.prototype.disposeIframes_=function(){this.iframeDisposalTimer_&&(Yi(this.iframeDisposalTimer_),this.iframeDisposalTimer_=null);for(;0!=this.iframesForDisposal_.length;){var a=this.iframesForDisposal_.pop();tg(a)}}; var iG=function(a){a.form_&&a.form_==hG&&qg(a.form_)},lG=function(a){return a.iframe_?Bg(jG(a)):null},jG=function(a){return a.iframe_?te&&!Fe("11")?a.iframe_:Bg(a.iframe_).getElementById(a.iframeName_+"_inner"):null}; gG.prototype.testForFirefoxSilentError_=function(){if(this.active_){var a=lG(this);a&&!re(a,"documentUri")?(this.ignoreResponse_||vi(jG(this),"load",this.onIframeLoaded_,!1,this),navigator.onLine?this.handleError_(3):this.handleError_(9)):this.firefoxSilentErrorTimeout_=Xi(this.testForFirefoxSilentError_,250,this)}}; var DDa=function(a){hi.call(this,"incrementaldata");this.data=a}; v(DDa,hi);var mG=function(a){this.mechanism=a}; v(mG,zj);var EDa=function(a,b){var c=[];oj(b,function(d){try{var f=mG.prototype.getWrapper.call(this,d,!0)}catch(g){if("Storage: Invalid value was encountered"==g)return;throw g}void 0===f?c.push(d):qga(f)&&c.push(d)},a); return c},FDa=function(a,b){b=EDa(a,b); db(b,function(c){mG.prototype.remove.call(this,c)},a)};var nG=function(){this.front_=[];this.back_=[]},GDa=function(a){0==a.front_.length&&(a.front_=a.back_,a.front_.reverse(),a.back_=[])}; nG.prototype.enqueue=function(a){this.back_.push(a)}; nG.prototype.dequeue=function(){GDa(this);return this.front_.pop()}; var HDa=function(a){GDa(a);return bb(a.front_)}; e=nG.prototype;e.getCount=function(){return this.front_.length+this.back_.length}; e.isEmpty=function(){return 0==this.front_.length&&0==this.back_.length}; e.clear=function(){this.front_=[];this.back_=[]}; e.contains=function(a){return mb(this.front_,a)||mb(this.back_,a)}; e.remove=function(a){var b=this.front_;var c=Array.prototype.lastIndexOf.call(b,a,b.length-1);0<=c?(ob(b,c),b=!0):b=!1;return b||nb(this.back_,a)}; e.getValues=function(){for(var a=[],b=this.front_.length-1;0<=b;--b)a.push(this.front_[b]);var c=this.back_.length;for(b=0;b; Licensed under the MIT license */ var oG="hammer_"+(1E6*Math.random()|0),IDa=function(){var a=document||document;if(!a[oG]){var b=function(){(function(c,d,f,g){function l(H,Q,Z){return setTimeout(C(H,Z),Q)} function m(H,Q,Z){return Array.isArray(H)?(n(H,Z[Q],Z),!0):!1} function n(H,Q,Z){var na;if(H)if(H.forEach)H.forEach(Q,Z);else if(H.length!==g){var Oa=0;for(na=H.length;Oaqa(Oa,Ae)&&na.push(H[xb]);Oa[xb]=Ae}Z&&(na=Q?na.sort(function(Bo,Whb){return Bo[Q]>Whb[Q]}):na.sort()); return na} function yb(H,Q){for(var Z,na=Q[0].toUpperCase()+Q.slice(1),Oa=0,xb=FXa.length;OafH(Bo)?Ae:Bo,xb=Lc(xb,ec),Q.lastInterval=Z):(Ae=ec.velocity,na=ec.velocityX,Oa=ec.velocityY,xb=ec.direction);Z.velocity=Ae;Z.velocityX=na;Z.velocityY=Oa;Z.direction=xb;Q=H.element;a:{for(na=Z.srcEvent.target;na;){if(na==Q){na=!0;break a}na=na.parentNode}na=!1}na&&(Q=Z.srcEvent.target);Z.target=Q;H.emit("hammer.input",Z);H.recognize(Z);H.session.prevInput=Z} function pa(H){for(var Q=[],Z=0;Z=fH(Q)?0xb||(Q[xb]=H,this.callback(this.manager,na,{pointers:Q,changedPointers:[H],pointerType:Oa,srcEvent:H}),Z&&Q.splice(xb,1))}}); var gib={touchstart:1,touchmove:2,touchend:4,touchcancel:8};z(Ch,ma,{handler:function(H){var Q=gib[H.type];var Z=Array.prototype.slice.call(H.touches,0);var na=this.targetIds;if(Q&3&&1===Z.length)na[Z[0].identifier]=!0,na=[Z,Z];else{var Oa,xb=Array.prototype.slice.call(H.targetTouches,0),ec=Array.prototype.slice.call(H.changedTouches,0),Ae=[];if(1===Q)for(Z=0,Oa=xb.length;Zna&&Q(!0);Q();8<=na&&Q(!0)}, tryEmit:function(H){if(this.canEmit())return this.emit(H);this.state=32}, canEmit:function(){for(var H=0;Hxb?2:4,Z=xb!=this.pX,na=Math.abs(H.deltaX)):(Oa=0===ec?1:0>ec?8:16,Z=ec!=this.pY,na=Math.abs(H.deltaY)));H.direction=Oa;return Z&&na>Q.threshold&&Oa&Q.direction}, attrTest:function(H){return Kk.prototype.attrTest.call(this,H)&&(this.state&2||!(this.state&2)&&this.directionTest(H))}, emit:function(H){this.pX=H.deltaX;this.pY=H.deltaY;var Q=JXa(H.direction);Q&&this.manager.emit(this.options.event+Q,H);this._super.emit.call(this,H)}}); z(N$,Kk,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]}, attrTest:function(H){return this._super.attrTest.call(this,H)&&(Math.abs(H.scale-1)>this.options.threshold||this.state&2)}, emit:function(H){this._super.emit.call(this,H);1!==H.scale&&this.manager.emit(this.options.event+(1>H.scale?"in":"out"),H)}}); z(O$,Co,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return["auto"]}, process:function(H){var Q=this.options,Z=H.pointers.length===Q.pointers,na=H.distanceQ.time;this._input=H;if(!na||!Z||H.eventType&12&&!Oa)this.reset();else if(H.eventType&1)this.reset(),this._timer=l(function(){this.state=8;this.tryEmit()},Q.time,this);else if(H.eventType&4)return 8;return 32}, reset:function(){clearTimeout(this._timer)}, emit:function(H){8===this.state&&(H&&H.eventType&4?this.manager.emit(this.options.event+"up",H):(this._input.timeStamp=M$(),this.manager.emit(this.options.event,this._input)))}}); z(P$,Kk,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]}, attrTest:function(H){return this._super.attrTest.call(this,H)&&(Math.abs(H.rotation)>this.options.threshold||this.state&2)}}); z(Q$,Kk,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:30,pointers:1},getTouchAction:function(){return XT.prototype.getTouchAction.call(this)}, attrTest:function(H){var Q=this.options.direction;if(Q&30)var Z=H.velocity;else Q&6?Z=H.velocityX:Q&24&&(Z=H.velocityY);return this._super.attrTest.call(this,H)&&Q&H.direction&&fH(Z)>this.options.velocity&&H.eventType&4}, emit:function(H){var Q=JXa(H.direction);Q&&this.manager.emit(this.options.event+Q,H);this.manager.emit(this.options.event,H)}}); z(ZT,Co,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return["manipulation"]}, process:function(H){var Q=this.options,Z=H.pointers.length===Q.pointers,na=H.distancearguments.length?this[c]:f;this._valueToNodeAttribute(this,f,d||this.constructor.attributeNameForProperty(c));this.__serializing=!1}; b.prototype._valueToNodeAttribute=function(c,d,f){d=this._serializeValue(d);if("class"===f||"name"===f||"slot"===f)c=AG(c);void 0===d?c.removeAttribute(f):c.setAttribute(f,d)}; b.prototype._serializeValue=function(c){switch(typeof c){case"boolean":return c?"":void 0;default:return null!=c?c.toString():void 0;}}; b.prototype._deserializeValue=function(c,d){switch(d){case Boolean:return null!==c;case Number:return Number(c);default:return c;}}; return b});var CG=0,DG=[];function _regLog$$module$third_party$javascript$polymer$v2$polymer$lib$utils$telemetry(a){console.log("["+a.is+"]: registered")} function EG(a){DG.push(a)} ;var RDa=zG(function(a){function b(g){g=Object.getPrototypeOf(g);return g.prototype instanceof f?g:null} function c(g){if(!g.hasOwnProperty("__ownProperties")){var l=null;if(g.hasOwnProperty("properties")){var m=g.properties;if(m){l={};for(var n in m){var r=m[n];l[n]="function"===typeof r?{type:r}:r}}}g.__ownProperties=l}return g.__ownProperties} var d=BG(a),f=function(){return d.apply(this,arguments)||this}; p(f,d);f.finalize=function(){if(!this.hasOwnProperty("__finalized")){var g=b(this);g&&g.finalize();this.__finalized=!0;this._finalizeClass()}}; f._finalizeClass=function(){var g=c(this);g&&this.createProperties(g)}; f.typeForProperty=function(g){return(g=this._properties[g])&&g.type}; f.prototype._initializeProperties=function(){CG++;this.constructor.finalize();d.prototype._initializeProperties.call(this)}; f.prototype.connectedCallback=function(){d.prototype.connectedCallback&&d.prototype.connectedCallback.call(this);this._enableProperties()}; f.prototype.disconnectedCallback=function(){d.prototype.disconnectedCallback&&d.prototype.disconnectedCallback.call(this)}; h.Object.defineProperties(f,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){var g=this;if(!this.hasOwnProperty("__observedAttributes")){EG(this.prototype);var l=this._properties;this.__observedAttributes=l?Object.keys(l).map(function(m){return g.prototype._addPropertyToAttributeMap(m)}):[]}return this.__observedAttributes}}, _properties:{configurable:!0,enumerable:!0,get:function(){if(!this.hasOwnProperty("__properties")){var g=b(this);this.__properties=Object.assign({},g&&g._properties,c(this))}return this.__properties}}}); return f});var FG={},SDa=/-[a-z]/g,TDa=/([A-Z])/g;function GG(a){return FG[a]||(FG[a]=0>a.indexOf("-")?a:a.replace(SDa,function(b){return b[1].toUpperCase()}))} function HG(a){return FG[a]||(FG[a]=a.replace(TDa,"-$1").toLowerCase())} ;for(var UDa={},IG=HTMLElement.prototype;IG;){for(var VDa=Object.getOwnPropertyNames(IG),JG=0;JG>1,J=n.get(m[C].methodInfo)-n.get(l.methodInfo);if(0>J)r=C+1;else if(0z&&(z=u+1);m.splice(z,0,l)}}}; function mEa(a){var b=a.constructor.__orderedComputedDeps;if(!b){b=new Map;for(var c=a.__computeEffects,d=nEa(a),f=d.counts,g=d.ready,l=d.total;d=g.shift();)b.set(d,b.size),(d=c[d])&&d.forEach(function(m){m=m.info.methodInfo;--l;0===--f[m]&&g.push(m)}); 0!==l&&console.warn("Computed graph for "+a.localName+" incomplete; circular?");a.constructor.__orderedComputedDeps=b}return b} function nEa(a){var b=a.__computeInfo,c={};a=a.__computeEffects;var d=[],f=0,g;for(g in b){var l=b[g];f+=c[g]=l.args.filter(function(n){return!n.literal}).length+(l.dynamicFn?1:0)}for(var m in a)b[m]||d.push(m); return{counts:c,ready:d,total:f}} function oEa(a,b,c,d,f){b=pEa(a,b,c,d,f);if(b===UG)return!1;f=f.methodInfo;if(a.__dataHasAccessor&&a.__dataHasAccessor[f])return a._setPendingProperty(f,b,!0);a[f]=b;return!1} function qEa(a,b,c,d,f,g,l){c.bindings=c.bindings||[];d={kind:d,target:f,parts:g,literal:l,isCompound:1!==g.length};c.bindings.push(d);d.target&&"attribute"!=d.kind&&"text"!=d.kind&&!d.isCompound&&"{"===d.parts[0].mode&&(c=d.parts[0],g=c.negate,d.listenerEvent=c.event||HG(f)+"-changed",d.listenerNegate=g);f=b.nodeInfoList.length;for(c=0;cn.source.length&&"property"==m.kind&&!m.isCompound&&l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[m.target]?(c=c[b],b=PG(n.source,m.target,b),l._setPendingPropertyOrPath(b,c,!1,!0)&&a._enqueueClient(l)):(b=f.evaluator._evaluateBinding(a,n,b,c,d,g),b!==UG&&(m.isCompound&&(c=l.__dataCompoundStorage[m.target],c[n.compoundIndex]=b,b=c.join("")),"attribute"===m.kind||"textContent"!==m.target&&( "value"!==m.target||"input"!==l.localName&&"textarea"!==l.localName)||(b=void 0==b?"":b),n=b,Wc&&(n=Wc(n,m.target,m.kind,l)),"attribute"==m.kind?a._valueToNodeAttribute(l,n,m.target):(m=m.target,l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[m]?l.__readOnly&&l.__readOnly[m]||l._setPendingProperty(m,n)&&a._enqueueClient(l):a._setUnmanagedPropertyToNode(l,m,n))))} function tEa(a,b,c){if(c.listenerEvent){var d=c.parts[0];a.addEventListener(c.listenerEvent,function(f){var g=c.target,l=d.source,m=f.detail,n=m&&m.path;n?(l=PG(g,l,n),f=m&&m.value):f=f.currentTarget[g];b.__readOnly&&b.__readOnly[l]||!b._setPendingPropertyOrPath(l,d.negate?!f:f,!0,!!n)||m&&m.queueProperty||b._invalidateProperties()})}} function uEa(a,b,c,d,f,g){g=b.static||g&&("object"!==typeof g||g[b.methodName]);f={methodName:b.methodName,args:b.args,methodInfo:f,dynamicFn:g};for(var l=0,m=void 0;l=c&&(c="#");switch(c){case"'":case"\"":b.value=a.slice(1,-1);b.literal=!0;break;case"#":b.value=Number(a),b.literal=!0;}b.literal||(b.rootProperty=MG(a),b.structured=LG(a),b.structured&&(b.wildcard=".*"==a.slice(-2),b.wildcard&&(b.name=a.slice(0,-2))));return b} function AEa(a,b,c){a=SG(a,c);void 0===a&&(a=b[c]);return a} function BEa(a,b,c,d){d={indexSplices:d};cd&&!a._overrideLegacyUndefined&&(b.splices=d);a.notifyPath(c+".splices",d);a.notifyPath(c+".length",b.length);cd&&!a._overrideLegacyUndefined&&(d.indexSplices=[])} function WG(a,b,c,d,f,g){BEa(a,b,c,[{index:d,addedCount:f,removed:g,object:b,type:"splice"}])} var YG=zG(function(a){var b=aEa(KG(a));a=function(){var c=b.call(this)||this;c.__isPropertyEffectsClient=!0;return c}; p(a,b);a.prototype._initializeProperties=function(){b.prototype._initializeProperties.call(this);this._registerHost();this.__dataClientsReady=!1;this.__dataLinkedPaths=this.__dataToNotify=this.__dataPendingClients=null;this.__dataHasPaths=!1;this.__dataCompoundStorage=this.__dataCompoundStorage||null;this.__dataHost=this.__dataHost||null;this.__dataTemp={};this.__dataClientsInitialized=!1}; a.prototype._registerHost=function(){if(XG.length){var c=XG[XG.length-1];c._enqueueClient(this);this.__dataHost=c}}; a.prototype._initializeProtoProperties=function(c){this.__data=Object.create(c);this.__dataPending=Object.create(c);this.__dataOld={}}; a.prototype._initializeInstanceProperties=function(c){var d=this.__readOnly,f;for(f in c)d&&d[f]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[f]=this.__dataPending[f]=c[f])}; a.prototype._addPropertyEffect=function(c,d,f){this._createPropertyAccessor(c,"__readOnly"==d);var g=fEa(this,d,!0)[c];g||(g=this[d][c]=[]);g.push(f)}; a.prototype._removePropertyEffect=function(c,d,f){c=fEa(this,d,!0)[c];f=c.indexOf(f);0<=f&&c.splice(f,1)}; a.prototype._hasPropertyEffect=function(c,d){d=this[d];return!(!d||!d[c])}; a.prototype._hasReadOnlyEffect=function(c){return this._hasPropertyEffect(c,"__readOnly")}; a.prototype._hasNotifyEffect=function(c){return this._hasPropertyEffect(c,"__notifyEffects")}; a.prototype._hasReflectEffect=function(c){return this._hasPropertyEffect(c,"__reflectEffects")}; a.prototype._hasComputedEffect=function(c){return this._hasPropertyEffect(c,"__computeEffects")}; a.prototype._setPendingPropertyOrPath=function(c,d,f,g){if(g||MG(Array.isArray(c)?c[0]:c)!==c){if(!g&&(g=SG(this,c),c=cEa(this,c,d),!c||!b.prototype._shouldPropertyChange.call(this,c,d,g)))return!1;this.__dataHasPaths=!0;if(this._setPendingProperty(c,d,f)){if(f=this.__dataLinkedPaths)for(var l in f)g=f[l],OG(l,c)?(g=PG(l,g,c),this._setPendingPropertyOrPath(g,d,!0,!0)):OG(g,c)&&(g=PG(g,l,c),this._setPendingPropertyOrPath(g,d,!0,!0));return!0}}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[c])return this._setPendingProperty(c, d,f);this[c]=d}return!1}; a.prototype._setUnmanagedPropertyToNode=function(c,d,f){if(f!==c[d]||"object"==typeof f)"className"===d&&(c=AG(c)),c[d]=f}; a.prototype._setPendingProperty=function(c,d,f){var g=this.__dataHasPaths&&LG(c);if(this._shouldPropertyChange(c,d,(g?this.__dataTemp:this.__data)[c])){this.__dataPending||(this.__dataPending={},this.__dataOld={});c in this.__dataOld||(this.__dataOld[c]=this.__data[c]);g?this.__dataTemp[c]=d:this.__data[c]=d;this.__dataPending[c]=d;if(g||this.__notifyEffects&&this.__notifyEffects[c])this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[c]=f;return!0}return!1}; a.prototype._setProperty=function(c,d){this._setPendingProperty(c,d,!0)&&this._invalidateProperties()}; a.prototype._invalidateProperties=function(){this.__dataReady&&this._flushProperties()}; a.prototype._enqueueClient=function(c){this.__dataPendingClients=this.__dataPendingClients||[];c!==this&&this.__dataPendingClients.push(c)}; a.prototype._flushClients=function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}; a.prototype.__enableOrFlushClients=function(){var c=this.__dataPendingClients;if(c){this.__dataPendingClients=null;for(var d=0;dd?d=n.length-Math.floor(-d):d&&(d=Math.floor(d));var r=2===arguments.length?n.splice(d):n.splice.apply(n,[d,f].concat(fa(l)));(l.length||r.length)&&WG(this,n,m.path,d,l.length,r);return r}; a.prototype.shift=function(c){var d={path:""};c=SG(this,c,d);var f=!!c.length,g=c.shift();f&&WG(this,c,d.path,0,0,[g]);return g}; a.prototype.unshift=function(c,d){for(var f=[],g=1;gg&&f.push({literal:c.slice(g,l.index)});g=l[1][0];var m=!!l[2];l=l[3].trim();var n=!1,r="",u=-1;"{"==g&&0<(u=l.indexOf("::"))&&(r=l.substring(u+2),l=l.substring(0,u),n=!0);u=yEa(l);var z=[];if(u){var C=u,J=C.args;C=C.methodName;for(var E=0;Ec.indexOf(".")&&c==d&&this.__deselectChangedIdx(d))}; a.prototype.__applySplices=function(c){for(var d=this,f=this.__selectedMap,g={},l=0;l=u.$jscomp$loop$prop$s$2387.index+u.$jscomp$loop$prop$s$2387.removed.length?f.set(C,z+u.$jscomp$loop$prop$s$2387.addedCount-u.$jscomp$loop$prop$s$2387.removed.length):f.set(C,-1))}}(g)); for(var m=0;mu?(d.multi?d.splice("selected",r,1):d.selected=d.selectedItem=null,f.delete(z)):r++})}; a.prototype.__updateLinks=function(){var c=this;this.__dataLinkedPaths={};if(this.multi){var d=0;this.__selectedMap.forEach(function(f){0<=f&&c.linkPaths("items."+f,"selected."+d++)})}else this.__selectedMap.forEach(function(f){c.linkPaths("selected","items."+f); c.linkPaths("selectedItem","items."+f)})}; a.prototype.clearSelection=function(){this.__dataLinkedPaths={};this.__selectedMap=new Map;this.selected=this.multi?[]:null;this.selectedItem=null}; a.prototype.isSelected=function(c){return this.__selectedMap.has(c)}; a.prototype.isIndexSelected=function(c){return this.isSelected(this.items[c])}; a.prototype.__deselectChangedIdx=function(c){var d=this,f=this.__selectedIndexForItemIndex(c);if(0<=f){var g=0;this.__selectedMap.forEach(function(l,m){f==g++&&d.deselect(m)})}}; a.prototype.__selectedIndexForItemIndex=function(c){if(c=this.__dataLinkedPaths["items."+c])return parseInt(c.slice(9),10)}; a.prototype.deselect=function(c){var d=this.__selectedMap.get(c);if(0<=d){this.__selectedMap.delete(c);var f;this.multi&&(f=this.__selectedIndexForItemIndex(d));this.__updateLinks();this.multi?this.splice("selected",f,1):this.selected=this.selectedItem=null}}; a.prototype.deselectIndex=function(c){this.deselect(this.items[c])}; a.prototype.select=function(c){this.selectIndex(this.items.indexOf(c))}; a.prototype.selectIndex=function(c){var d=this.items[c];this.isSelected(d)?this.toggle&&this.deselectIndex(c):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(d,c),this.__updateLinks(),this.multi?this.push("selected",d):this.selected=this.selectedItem=d)}; h.Object.defineProperties(a,{properties:{configurable:!0,enumerable:!0,get:function(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}}, observers:{configurable:!0,enumerable:!0,get:function(){return["__updateSelection(multi, items.*)"]}}}); return a}),OEa=NEa(bH),cH=function(){return OEa.apply(this,arguments)||this}; p(cH,OEa);h.Object.defineProperties(cH,{is:{configurable:!0,enumerable:!0,get:function(){return"array-selector"}}, template:{configurable:!0,enumerable:!0,get:function(){return null}}}); customElements.define(cH.is,cH);var PEa=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,dH=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,QEa=/@media\s(.*)/;function REa(a,b){for(var c in b)null===c?a.style.removeProperty(c):a.style.setProperty(c,b[c])} function SEa(a,b){return(a=window.getComputedStyle(a).getPropertyValue(b))?a.trim():""} ;var TEa=null,UEa=window.HTMLImports&&window.HTMLImports.whenReady||null,VEa;function WEa(a){requestAnimationFrame(function(){UEa?UEa(a):(TEa||(TEa=new Promise(function(b){VEa=b}),"complete"===document.readyState?VEa():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&VEa()})),TEa.then(function(){a&&a()}))})} ;var eH=null,gH=null,hH=function(){this.customStyles=[];this.enqueued=!1;WEa(function(){window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})},XEa=function(a){!a.enqueued&&gH&&(a.enqueued=!0,WEa(gH))}; hH.prototype.addCustomStyle=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),XEa(this))}; hH.prototype.getStyleForCustomStyle=function(a){return a.__shadyCSSCachedStyle?a.__shadyCSSCachedStyle:a.getStyle?a.getStyle():a}; hH.prototype.processStyles=function(){for(var a=this.customStyles,b=0;b=b.left&&c<=b.right&&a>=b.top&&a<=b.bottom)}return!1} var mFa=null,tH=null,qFa=0,rFa=0,sFa=-1,tFa=!1;function uFa(a,b,c){a.movefn=b;a.upfn=c;document.addEventListener("mousemove",b);document.addEventListener("mouseup",c)} function uH(a){document.removeEventListener("mousemove",a.movefn);document.removeEventListener("mouseup",a.upfn);a.movefn=null;a.upfn=null} document.addEventListener("touchend",function(a){tH||oFa(!0);mFa=rH(a)[0];tH=oH(tH,wG.after(2500),function(){oFa();tH=mFa=null})},gFa?{passive:!0}:!1); var rH=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:function(a){return a.composedPath&&a.composedPath()||[]},vH={},wH=[]; function vFa(a,b){for(var c=document.elementFromPoint(a,b),d=c;d&&d.shadowRoot&&!window.ShadyDOM;){var f=d;d=d.shadowRoot.elementFromPoint(a,b);if(f===d)break;d&&(c=d)}return c} function _findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a){var b=rH(a);return 0f:"pan-y"===c&&(d=f>b));d?a.preventDefault(): xH("track")}} function yH(a,b,c){return vH[b]?(_add$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c),!0):!1} function wFa(a,b,c){return vH[b]?(_remove$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c),!0):!1} function _add$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c){var d=vH[b],f=d.deps,g=d.name,l=a.__polymerGestures;l||(a.__polymerGestures=l={});for(var m=0,n,r;m=d&&25>=f||pFa(b))||a.prevent||_fire$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(g,"tap",{x:b.clientX,y:b.clientY,sourceEvent:b,preventer:c})} ;var AFa=zG(function(a){var b=function(){return a.apply(this,arguments)||this}; p(b,a);b.prototype._addEventListenerToNode=function(c,d,f){yH(c,d,f)||a.prototype._addEventListenerToNode.call(this,c,d,f)}; b.prototype._removeEventListenerFromNode=function(c,d,f){wFa(c,d,f)||a.prototype._removeEventListenerFromNode.call(this,c,d,f)}; return b});function BFa(a,b,c,d,f){var g;f&&(g="object"===typeof c&&null!==c)&&(d=a.__dataTemp[b]);d=d!==c&&(d===d||c===c);g&&d&&(a.__dataTemp[b]=c);return d} var CH=zG(function(a){var b=function(){return a.apply(this,arguments)||this}; p(b,a);b.prototype._shouldPropertyChange=function(c,d,f){return BFa(this,c,d,f,!0)}; return b}),CFa=zG(function(a){var b=function(){return a.apply(this,arguments)||this}; p(b,a);b.prototype._shouldPropertyChange=function(c,d,f){return BFa(this,c,d,f,this.mutableData)}; h.Object.defineProperties(b,{properties:{configurable:!0,enumerable:!0,get:function(){return{mutableData:Boolean}}}}); return b}); CH._mutablePropertyChange=BFa;var DFa=!1;function EFa(){if($c&&!Rc){if(!DFa){DFa=!0;var a=document.createElement("style");a.textContent="dom-bind,dom-if,dom-repeat{display:none;}";document.head.appendChild(a)}return!0}return!1} ;var FFa=AFa(CFa(YG(HTMLElement))),DH=function(){var a=FFa.call(this)||this;if(Yc)throw Error("strictTemplatePolicy: dom-bind not allowed");a.root=null;a.$=null;a.__children=null;return a}; p(DH,FFa);e=DH.prototype;e.attributeChangedCallback=function(){this.mutableData=!0}; e.connectedCallback=function(){EFa()||(this.style.display="none");this.render()}; e.disconnectedCallback=function(){this.__removeChildren()}; e.__insertChildren=function(){AG(AG(this).parentNode).insertBefore(this.root,this)}; e.__removeChildren=function(){if(this.__children)for(var a=0;a child")}); c.observe(this,{childList:!0});return}this.root=this._stampTemplate(b);this.$=this.root.$;this.__children=[];for(var d=this.root.firstChild;d;d=d.nextSibling)this.__children[this.__children.length]=d;this._enableProperties()}this.__insertChildren();this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}; h.Object.defineProperties(DH,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return["mutable-data"]}}}); customElements.define("dom-bind",DH);var EH=function(){do{var a=window.ShadyDOM&&ShadyDOM.flush();window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush();var b=cFa()}while(a||b)};var GFa=null;function HFa(){return GFa} HFa.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:HFa,writable:!0}});var IFa=YG(HFa),JFa=CH(IFa);function KFa(a,b){GFa=a;Object.setPrototypeOf(a,b.prototype);new b;GFa=null} var LFa=YG(function(){}); function MFa(a,b){for(var c=0;c can only be templatized once");a.__templatizeOwner=b;var d=(b?b.constructor:FH)._parseTemplate(a),f=d.templatizeInstanceClass;f||(f=PFa(a,d,c),d.templatizeInstanceClass=f);var g=OFa(a);RFa(a,d,c,g);c=function(){return f.apply(this,arguments)||this}; p(c,f);c.prototype._methodHost=g;c.prototype.__dataHost=a;c.prototype.__templatizeOwner=b;c.prototype.__hostProps=d.hostProps;return c} function TFa(a,b,c){c=c.constructor._properties;a=a.propertyEffects;b=b.instanceProps;for(var d in a)if(!(c[d]||b&&b[d]))for(var f=a[d],g=0;g child")}); c.observe(this,{childList:!0});return!1}this.__template=b}return!0}; e.__ensureInstance=function(){var a=AG(this).parentNode;if(this.__hasInstance()){var b=this.__getInstanceNodes();if(b&&b.length&&AG(this).previousSibling!==b[b.length-1])for(var c=0,d=void 0;c child")}); c.observe(this,{childList:!0});return!1}var d={};d[this.as]=!0;d[this.indexAs]=!0;d[this.itemsIndexAs]=!0;this.__ctor=GH(b,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:d,forwardHostProp:function(f,g){for(var l=this.__instances,m=0,n=void 0;m=f;a--)this.__detachAndRemoveInstance(a)}; e.__detachInstance=function(a){a=this.__instances[a];for(var b=AG(a.root),c=0;cd?c:c.substring(0,d);if(a==parseInt(a,10)){c=0>d?"":c.substring(d+1);this.__handleObservedPaths(c);if(a=this.__instances[this.__itemsIdxToInstIdx[a]])a._setPendingPropertyOrPath(this.as+(c?"."+c:""),b,!1,!0),a._flushProperties();return!0}}; e.itemForElement=function(a){return(a=this.modelForElement(a))&&a[this.as]}; e.indexForElement=function(a){return(a=this.modelForElement(a))&&a[this.indexAs]}; e.modelForElement=function(a){return WFa(this.template,a)}; h.Object.defineProperties(JH,{is:{configurable:!0,enumerable:!0,get:function(){return"dom-repeat"}}, template:{configurable:!0,enumerable:!0,get:function(){return null}}, properties:{configurable:!0,enumerable:!0,get:function(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!gd,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number, computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}}, observers:{configurable:!0,enumerable:!0,get:function(){return["__itemsChanged(items.*)"]}}}); JH.prototype._setRenderedItemCount=function(){}; customElements.define(JH.is,JH);function KH(a){return"slot"===a.localName} var LH=function(a,b){var c=this;this._nativeChildrenObserver=this._shadyChildrenObserver=null;this._connected=!1;this._target=a;this.callback=b;this._effectiveNodes=[];this._observer=null;this._scheduled=!1;this._boundSchedule=function(){c._schedule()}; this.connect();this._schedule()}; LH.getFlattenedNodes=function(a){var b=AG(a);return KH(a)?b.assignedNodes({flatten:!0}):Array.from(b.childNodes).map(function(c){return KH(c)?AG(c).assignedNodes({flatten:!0}):[c]}).reduce(function(c,d){return c.concat(d)},[])}; e=LH.prototype;e.connect=function(){var a=this;KH(this._target)?this._listenSlots([this._target]):AG(this._target).children&&(this._listenSlots(AG(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,function(b){a._processMutations(b)}):(this._nativeChildrenObserver=new MutationObserver(function(b){a._processMutations(b)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))); this._connected=!0}; e.disconnect=function(){KH(this._target)?this._unlistenSlots([this._target]):AG(this._target).children&&(this._unlistenSlots(AG(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null));this._connected=!1}; e._schedule=function(){var a=this;this._scheduled||(this._scheduled=!0,yG.run(function(){return a.flush()}))}; e._processMutations=function(a){this._processSlotMutations(a);this.flush()}; e._processSlotMutations=function(a){if(a)for(var b=0;b *")}; var UGa=function(a,b,c){b=b.replace(PEa,function(d,f,g,l){return a._produceCssProperties(d,f,g,l,c)}); return a._consumeCssProperties(b,c)}; e=aI.prototype;e._getInitialValueForProperty=function(a){this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement));return window.getComputedStyle(this._measureElement).getPropertyValue(a)}; e._fallbacksFromPreviousRules=function(a){for(var b=this,c=a;c.parent;)c=c.parent;var d={},f=!1;ZH(c,function(g){(f=f||g===a)||g.selector===a.selector&&Object.assign(d,b._cssTextToMap(g.parsedCssText))}); return d}; e._consumeCssProperties=function(a,b){for(var c;c=dH.exec(a);){var d=c[0],f=c[1];c=c.index;var g=c+d.indexOf("@apply");g=a.slice(0,g);a=a.slice(c+d.length);d=b?this._fallbacksFromPreviousRules(b):{};Object.assign(d,this._cssTextToMap(g));f=this._atApplyToCssProperties(f,d);a=""+g+f+a;dH.lastIndex=c+f.length}return a}; e._atApplyToCssProperties=function(a,b){a=a.replace(QGa,"");var c=[],d=this._map.get(a);d||(this._map.set(a,{}),d=this._map.get(a));if(d){this._currentElement&&(d.dependants[this._currentElement]=!0);var f,g=d.properties;for(f in g){var l=b&&b[f];d=[f,": var(",a,"_-_",f];l&&d.push(",",l.replace(SGa,""));d.push(")");SGa.test(g[f])&&d.push(" !important");c.push(d.join(""))}}return c.join("; ")}; e._replaceInitialOrInherit=function(a,b){var c=RGa.exec(b);c&&(b=c[1]?this._getInitialValueForProperty(a):"apply-shim-inherit");return b}; e._cssTextToMap=function(a,b){b=void 0===b?!1:b;a=a.split(";");for(var c,d,f={},g=0;gf?yG.cancel(~f):wG.cancel(f)}; a.prototype.create=function(f,g){f=document.createElement(f);if(g)if(f.setProperties)f.setProperties(g);else for(var l in g)f[l]=g[l];return f}; a.prototype.elementMatches=function(f,g){return aGa(g||this,f)}; a.prototype.toggleAttribute=function(f,g){var l=this;3===arguments.length&&(l=arguments[2]);1==arguments.length&&(g=!l.hasAttribute(f));if(g)return AG(l).setAttribute(f,""),!0;AG(l).removeAttribute(f);return!1}; a.prototype.toggleClass=function(f,g,l){l=l||this;1==arguments.length&&(g=!l.classList.contains(f));g?l.classList.add(f):l.classList.remove(f)}; a.prototype.transform=function(f,g){g=g||this;g.style.webkitTransform=f;g.style.transform=f}; a.prototype.translate3d=function(f,g,l,m){this.transform("translate3d("+f+","+g+","+l+")",m||this)}; a.prototype.arrayDelete=function(f,g){if(Array.isArray(f)){if(g=f.indexOf(g),0<=g)return f.splice(g,1)}else if(g=SG(this,f).indexOf(g),0<=g)return this.splice(f,g,1);return null}; a.prototype._logger=function(f,g){Array.isArray(g)&&1===g.length&&Array.isArray(g[0])&&(g=g[0]);switch(f){case"log":case"warn":case"error":console[f].apply(console,fa(g));}}; a.prototype._log=function(f){for(var g=[],l=0;lb.indexOf(f)&&(!c||0>c.indexOf(f))&&b.unshift(f):console.warn("behavior is null, check for missing or 404 import")}return b} function eHa(a,b){for(var c in b){var d=a[c],f=b[c];a[c]=!("value"in f)&&d&&"value"in d?Object.assign({value:d.value},f):f}} var fHa=eI(HTMLElement);function gHa(a,b,c){var d={},f=function(){return b.apply(this,arguments)||this}; p(f,b);f._finalizeClass=function(){if(this.hasOwnProperty("generatedFrom")){if(l)for(var n=0,r;n\n \n\n
\n\n \n
\n \n
\n"], ["\n \n\n
\n\n \n
\n \n
\n"]); fI({_template:qG(mHa),is:"app-drawer",properties:{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},persistent:{type:Boolean,value:!1,reflectToAttribute:!0},transitionDuration:{type:Number,value:200},align:{type:String,value:"left"},position:{type:String,readOnly:!0,reflectToAttribute:!0},swipeOpen:{type:Boolean,value:!1,reflectToAttribute:!0},noFocusTrap:{type:Boolean,value:!1},disableSwipe:{type:Boolean,value:!1}},observers:["resetLayout(position, isAttached)","_resetPosition(align, isAttached)", "_styleTransitionDuration(transitionDuration)","_openedPersistentChanged(opened, persistent)"],_translateOffset:0,_trackDetails:null,_drawerState:0,_boundEscKeydownHandler:null,_firstTabStop:null,_lastTabStop:null,attached:function(){YH(this,function(){this._boundEscKeydownHandler=this._escKeydownHandler.bind(this);this.addEventListener("keydown",this._tabKeydownHandler.bind(this));this.listen(this,"track","_track");this.setScrollDirection("y")}); this.fire("app-reset-layout")}, detached:function(){document.removeEventListener("keydown",this._boundEscKeydownHandler)}, open:function(){this.opened=!0}, close:function(){this.opened=!1}, toggle:function(){this.opened=!this.opened}, getWidth:function(){return this._savedWidth||this.$.contentContainer.offsetWidth}, _isRTL:function(){return"rtl"===window.getComputedStyle(this).direction}, _resetPosition:function(){switch(this.align){case"start":this._setPosition(this._isRTL()?"right":"left");return;case"end":this._setPosition(this._isRTL()?"left":"right");return;}this._setPosition(this.align)}, _escKeydownHandler:function(a){27===a.keyCode&&(a.preventDefault(),this.close())}, _track:function(a){if(!this.persistent&&!this.disableSwipe)switch(a.preventDefault(),a.detail.state){case"start":this._trackStart(a);break;case"track":this._trackMove(a);break;case"end":this._trackEnd(a);}}, _trackStart:function(){this._drawerState=this._DRAWER_STATE.TRACKING;var a=this.$.contentContainer.getBoundingClientRect();this._savedWidth=a.width;this._translateOffset="left"===this.position?a.left:a.right-window.innerWidth;this._trackDetails=[];this._styleTransitionDuration(0);this.style.visibility="visible"}, _trackMove:function(a){this._trackDetails&&(this._translateDrawer(a.detail.dx+this._translateOffset),this._trackDetails.push({dx:a.detail.dx,timeStamp:Date.now()}))}, _trackEnd:function(a){if(this._trackDetails){var b=a.detail.dx+this._translateOffset,c=this.getWidth();b="left"===this.position?0<=b||b<=-c:0>=b||b>=c;if(!b){var d=this._trackDetails;this._trackDetails=null;this._flingDrawer(a,d);if(this._drawerState===this._DRAWER_STATE.FLINGING)return}c/=2;a.detail.dx<-c?this.opened="right"===this.position:a.detail.dx>c&&(this.opened="left"===this.position);b?this.debounce("_resetDrawerState",this._resetDrawerState):this.debounce("_resetDrawerState",this._resetDrawerState, this.transitionDuration);this._styleTransitionDuration(this.transitionDuration);this._resetDrawerTranslate();this.style.visibility=""}}, _calculateVelocity:function(a,b){for(var c=Date.now(),d=c-100,f,g=0,l=b.length-1;g<=l;){var m=g+l>>1,n=b[m];n.timeStamp>=d?(f=n,l=m-1):g=m+1}return f?(a.detail.dx-f.dx)/(c-f.timeStamp||1):0}, _flingDrawer:function(a,b){b=this._calculateVelocity(a,b);if(!(Math.abs(b)\n \n\n
\n \n\n
\n \n
\n
\n"], ["\n \n\n
\n \n\n
\n \n
\n
\n"]); fI({_template:qG(pHa),is:"app-header-layout",behaviors:[oHa],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return RH(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var a=this.header;if(this.isAttached&&a){this.$.wrapper.classList.remove("initializing");a.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var b=a.offsetHeight; this.hasScrollingRegion?(a.style.left="",a.style.right=""):requestAnimationFrame(function(){var d=this.getBoundingClientRect(),f=document.documentElement.clientWidth-d.right;a.style.left=d.left+"px";a.style.right=f+"px"}.bind(this)); var c=this.$.contentContainer.style;a.fixed&&!a.condenses&&this.hasScrollingRegion?(c.marginTop=b+"px",c.paddingTop=""):(c.paddingTop=b+"px",c.marginTop="")}}});var _scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers={},_scrollTimer$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers=null;var qHa={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}}, observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(a,b){this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null);b&&("document"===a?this.scrollTarget=this._doc:"string"===typeof a?this.scrollTarget=(b=this.domHost)&&b.$?b.$[a]:RH(this.ownerDocument).querySelector("#"+a):this._isValidScrollTarget()&&(this._oldScrollTarget=a,this._toggleScrollListener(this._shouldHaveListener,a)))}, _scrollHandler:function(){}, get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(a){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,a):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop= a)},set _scrollLeft(a){this.scrollTarget===this._doc?window.scrollTo(a,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=a)},scroll:function(a,b){if("object"===typeof a){var c=a.left;b=a.top}else c=a;c=c||0;b=b||0;this.scrollTarget===this._doc?window.scrollTo(c,b):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=c,this.scrollTarget.scrollTop=b)}, get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement}, _toggleScrollListener:function(a,b){b=b===this._doc?window:b;a?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),b.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(b.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)}, toggleScrollListener:function(a){this._shouldHaveListener=a;this._toggleScrollListener(a,this.scrollTarget)}};var rHa=[qHa,{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}}, disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(){}, isOnScreen:function(){return!1}, isContentBelow:function(){return!1}, _effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},attached:function(){this._scrollStateChanged()}, detached:function(){this._tearDownEffects()}, createEffect:function(a,b){var c=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers[a];if(!c)throw new ReferenceError(this._getUndefinedMsg(a));a=this._boundEffect(c,b||{});a.setUp();return a}, _effectsChanged:function(a,b,c){this._tearDownEffects();a&&c&&(a.split(" ").forEach(function(d){var f;""!==d&&((f=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers[d])?this._effects.push(this._boundEffect(f,b[d])):console.warn(this._getUndefinedMsg(d)))},this),this._setUpEffect())}, _layoutIfDirty:function(){return this.offsetWidth}, _boundEffect:function(a,b){b=b||{};var c=parseFloat(b.startsAt||0),d=parseFloat(b.endsAt||1),f=d-c,g=function(){}; d=0===c&&1===d?a.run:function(l,m){a.run.call(this,Math.max(0,(l-c)/f),m)}; return{setUp:a.setUp?a.setUp.bind(this,b):g,run:a.run?d.bind(this):g,tearDown:a.tearDown?a.tearDown.bind(this):g}}, _setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(a){!1!==a.setUp()&&this._effectsRunFn.push(a.run)},this))}, _tearDownEffects:function(){this._effects&&this._effects.forEach(function(a){a.tearDown()}); this._effectsRunFn=[];this._effects=[]}, _runEffects:function(a,b){this._effectsRunFn&&this._effectsRunFn.forEach(function(c){c(a,b)})}, _scrollHandler:function(){this._scrollStateChanged()}, _scrollStateChanged:function(){if(!this.disabled){var a=this._clampedScrollTop;this._updateScrollState(a);0=this.threshold)}}, _getDOMRef:function(a){console.warn("_getDOMRef","`"+a+"` is undefined")}, _getUndefinedMsg:function(a){return"Scroll effect `"+a+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+a+".html ?"}}];var sHa=ca(["\n \n
\n \n
\n"]); fI({_template:qG(sHa),is:"app-header",behaviors:[rHa,oHa],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+ 5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var a=RH(this.$.slot).getDistributedNodes(),b=0,c;c=a[b];b++)if(c.nodeType===Node.ELEMENT_NODE)if(c.hasAttribute("sticky")){this._stickyElRef=c;break}else this._stickyElRef||(this._stickyElRef=c);return this._stickyElRef},_configChanged:function(){this.resetLayout();this._notifyLayoutChanged()}, _updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var a=this._clampedScrollTop,b=0===this._height||0===a,c=this.disabled;this._height=this.offsetHeight;this._stickyElRef=null;this.disabled=!0;b||this._updateScrollState(0,!0);this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0;this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0;this._setUpEffect();b?this._updateScrollState(a,!0):(this._updateScrollState(this._lastScrollTop, !0),this._layoutIfDirty());this.disabled=c}}, _updateScrollState:function(a,b){if(0!==this._height){var c=0,d=this._top;var f=this._maxHeaderTop;var g=a-this._lastScrollTop,l=Math.abs(g),m=a>this._lastScrollTop,n=performance.now();this._mayMove()&&(c=this._clamp(this.reveals?d+g:a,0,f));a>=this._dHeight&&(c=this.condenses&&!this.fixed?Math.max(this._dHeight,c):c,this.style.transitionDuration="0ms");if(this.reveals&&!this.disabled&&100>l){if(300=f&&( 30=f?c=f:!m&&a>=this._dHeight&&(c=this.condenses&&!this.fixed?this._dHeight:0),this.style.transitionDuration=this._clamp((c-d)/(g/(n-this._lastTimestamp)),0,300)+"ms"):c=this._top)}f=0===this._dHeight?0=this._stickyElTop?Math.min(a,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)}, _clamp:function(a,b,c){return Math.min(c,Math.max(b,a))}, _ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),RH(this.root).insertBefore(this._bgContainer,this.$.contentContainer))}, _getDOMRef:function(a){switch(a){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return RH(this).querySelector("[main-title]");case"condensedTitle":return RH(this).querySelector("[condensed-title]");}return null}, getScrollState:function(){return{progress:this._progress,top:this._top}}});if(null!=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers["parallax-background"])throw Error("effect `parallax-background` is already registered."); _scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers["parallax-background"]={setUp:function(a){var b={};a=parseFloat(a.scalar);b.background=this._getDOMRef("background");b.backgroundFrontLayer=this._getDOMRef("backgroundFrontLayer");b.backgroundRearLayer=this._getDOMRef("backgroundRearLayer");b.deltaBg=b.backgroundFrontLayer.offsetHeight-b.background.offsetHeight;0===b.deltaBg?(isNaN(a)&&(a=.8),b.deltaBg=(this._dHeight||0)*a):(isNaN(a)&&(a=1),b.deltaBg*=a);this._fxParallaxBackground= b}, run:function(a){var b=this._fxParallaxBackground;this.transform("translate3d(0px, "+b.deltaBg*Math.min(1,a)+"px, 0px)",b.backgroundFrontLayer);b.backgroundRearLayer&&this.transform("translate3d(0px, "+b.deltaBg*Math.min(1,a)+"px, 0px)",b.backgroundRearLayer)}, tearDown:function(){delete this._fxParallaxBackground}};var tHa=ca(["\n \n\n \n"]); fI({_template:qG(tHa),is:"app-toolbar"});/* Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ if(!window.polymerSkipLoadingFontRoboto)for(var uHa=k(["https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic","https://fonts.googleapis.com/css?family=Roboto+Mono:400,700"]),vHa=uHa.next();!vHa.done;vHa=uHa.next()){var wHa=vHa.value,xHa=document.createElement("link");xHa.rel="stylesheet";xHa.href=wHa;document.head.appendChild(xHa)};var yHa=ca(["\n \n
[[_text]]
\n"]),jI=function(){}; jI=fI({_template:qG(yHa),is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){jI.instance||(jI.instance=this);document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))}, announce:function(a){this._text="";this.async(function(){this._text=a},this.timeout)}, _onIronAnnounce:function(a){a.detail&&a.detail.text&&this.announce(a.detail.text)}}); jI.instance=null;jI.requestAvailability=function(){jI.instance||(jI.instance=document.createElement("iron-a11y-announcer"));document.body?document.body.appendChild(jI.instance):document.addEventListener("load",function(){document.body.appendChild(jI.instance)})};Polymer.IronA11yAnnouncer=jI;var zHa={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},AHa={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},BHa={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},CHa=/[a-z0-9*]/,DHa=/U\+/,EHa=/^arrow/,FHa=/^space(bar)?/,GHa=/^escape$/; function HHa(a,b){var c="";if(a)if(a=a.toLowerCase()," "===a||FHa.test(a))c="space";else if(GHa.test(a))c="esc";else if(1==a.length){if(!b||CHa.test(a))c=a}else c=EHa.test(a)?a.replace("arrow",""):"multiply"==a?"*":a;return c} function kI(a,b){var c=a.hasModifiers;if(b.key)c=HHa(b.key,c);else if(b.detail&&b.detail.key)c=HHa(b.detail.key,c);else{c=b.keyIdentifier;var d="";c&&(c in zHa?d=zHa[c]:DHa.test(c)?(c=parseInt(c.replace("U+","0x"),16),d=String.fromCharCode(c).toLowerCase()):d=c.toLowerCase());(c=d)||(c=b.keyCode,d="",Number(c)&&(d=65<=c&&90>=c?String.fromCharCode(32+c):112<=c&&123>=c?"f"+(c-112+1):48<=c&&57>=c?String(c-48):96<=c&&105>=c?String(c-96):AHa[c]),c=d);c=c||""}return c===a.key&&(!a.hasModifiers||!!b.shiftKey=== !!a.shiftKey&&!!b.ctrlKey===!!a.ctrlKey&&!!b.altKey===!!a.altKey&&!!b.metaKey===!!a.metaKey)} function IHa(a){return 1===a.length?{combo:a,key:a,event:"keydown"}:a.split("+").reduce(function(b,c){var d=c.split(":");c=d[0];d=d[1];c in BHa?(b[BHa[c]]=!0,b.hasModifiers=!0):(b.key=c,b.event=d||"keydown");return b},{combo:a.split(":").shift()})} function lI(a){return a.trim().split(" ").map(function(b){return IHa(b)})} var mI={properties:{keyEventTarget:{type:Object,value:function(){return this}}, stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}}, _imperativeKeyBindings:{type:Object,value:function(){return{}}}}, observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()}, attached:function(){this._listenKeyEventListeners()}, detached:function(){this._unlistenKeyEventListeners()}, addOwnKeyBinding:function(a,b){this._imperativeKeyBindings[a]=b;this._prepKeyBindings();this._resetKeyEventListeners()}, removeOwnKeyBindings:function(){this._imperativeKeyBindings={};this._prepKeyBindings();this._resetKeyEventListeners()}, keyboardEventMatchesKeys:function(a,b){b=lI(b);for(var c=0;c\n \n\n \n \n
 
\n\n \n
\n \n
\n"]); fI({_template:qG(KHa),is:"iron-autogrow-textarea",behaviors:[qI,nI],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},autocapitalize:{type:String,value:"none"},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean}, minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(a){this.$.textarea.selectionStart=a},set selectionEnd(a){this.$.textarea.selectionEnd=a},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&!navigator.userAgent.match(/OS 1[3456789]/)&&(this.$.textarea.style.marginLeft= "-3px")}, validate:function(){var a=this.$.textarea.validity.valid;a&&(this.required&&""===this.value?a=!1:this.hasValidator()&&(a=qI.validate.call(this,this.value)));this.invalid=!a;this.fire("iron-input-validate");return a}, _bindValueChanged:function(a){this.value=a}, _valueChanged:function(a){var b=this.textarea;b&&(b.value!==a&&(b.value=a||0===a?a:""),this.bindValue=a,this.$.mirror.textContent=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))}, _onInput:function(a){var b=RH(a).path;this.value=b?b[0].value:a.target.value}, _constrain:function(a){var b;a=a||[""];for(b=0this.maxRows?a.slice(0,this.maxRows):a.slice(0);0\n \n\n \n"]); fI({_template:qG(NHa),is:"iron-collapse",behaviors:[iI],properties:{horizontal:{type:Boolean,value:!1,observer:"_horizontalChanged"},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},transitioning:{type:Boolean,notify:!0,readOnly:!0},noAnimation:{type:Boolean},_desiredSize:{type:String,value:""}},get dimension(){return this.horizontal?"width":"height"},get _dimensionMax(){return this.horizontal?"maxWidth":"maxHeight"},get _dimensionMaxCss(){return this.horizontal?"max-width":"max-height"}, hostAttributes:{role:"group","aria-hidden":"true"},listeners:{transitionend:"_onTransitionEnd"},toggle:function(){this.opened=!this.opened}, show:function(){this.opened=!0}, hide:function(){this.opened=!1}, updateSize:function(a,b){a="auto"===a?"":a;b=b&&!this.noAnimation&&this.isAttached&&this._desiredSize!==a;this._desiredSize=a;this._updateTransition(!1);b&&(b=this._calcSize(),""===a&&(this.style[this._dimensionMax]="",a=this._calcSize()),this.style[this._dimensionMax]=b,this.scrollTop=this.scrollTop,this._updateTransition(!0),b=a!==b);this.style[this._dimensionMax]=a;b||this._transitionEnd()}, enableTransition:function(a){gI._warn("`enableTransition()` is deprecated, use `noAnimation` instead.");this.noAnimation=!a}, _updateTransition:function(a){this.style.transitionDuration=a&&!this.noAnimation?"":"0s"}, _horizontalChanged:function(){this.style.transitionProperty=this._dimensionMaxCss;this.style["maxWidth"===this._dimensionMax?"maxHeight":"maxWidth"]="";this.updateSize(this.opened?"auto":"0px",!1)}, _openedChanged:function(){this.setAttribute("aria-hidden",!this.opened);this._setTransitioning(!0);this.toggleClass("iron-collapse-closed",!1);this.toggleClass("iron-collapse-opened",!1);this.updateSize(this.opened?"auto":"0px",!0);this.opened&&this.focus()}, _transitionEnd:function(){this.style[this._dimensionMax]=this._desiredSize;this.toggleClass("iron-collapse-closed",!this.opened);this.toggleClass("iron-collapse-opened",this.opened);this._updateTransition(!1);this.notifyResize();this._setTransitioning(!1)}, _onTransitionEnd:function(a){RH(a).rootTarget===this&&this._transitionEnd()}, _calcSize:function(){return this.getBoundingClientRect()[this.dimension]+"px"}});var OHa={properties:{sizingTarget:{type:Object,value:function(){return this}}, fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight: this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var a=RH(this).parentNode;a&&a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host);return a},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign}, get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},get _isRTL(){"undefined"===typeof this._memoizedIsRTL&&(this._memoizedIsRTL="rtl"==window.getComputedStyle(this).direction);return this._memoizedIsRTL},attached:function(){this.positionTarget=this.positionTarget||this._defaultPositionTarget;this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))}, detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)}, fit:function(){this.position();this.constrain();this.center()}, _discoverInfo:function(){if(!this._fitInfo){var a=window.getComputedStyle(this),b=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==a.top?"top":"auto"!==a.bottom?"bottom":null,horizontally:"auto"!==a.left? "left":"auto"!==a.right?"right":null},sizedBy:{height:"none"!==b.maxHeight,width:"none"!==b.maxWidth,minWidth:parseInt(b.minWidth,10)||0,minHeight:parseInt(b.minHeight,10)||0},margin:{top:parseInt(a.marginTop,10)||0,right:parseInt(a.marginRight,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0}}}}, resetFit:function(){var a=this._fitInfo||{},b;for(b in a.sizerInlineStyle)this.sizingTarget.style[b]=a.sizerInlineStyle[b];for(b in a.inlineStyle)this.style[b]=a.inlineStyle[b];this._fitInfo=null}, refit:function(){var a=this.sizingTarget.scrollLeft,b=this.sizingTarget.scrollTop;this.resetFit();this.fit();this.sizingTarget.scrollLeft=a;this.sizingTarget.scrollTop=b}, position:function(){if(this.__shouldPosition){this._discoverInfo();this.style.position="fixed";this.sizingTarget.style.boxSizing="border-box";this.style.left="0px";this.style.top="0px";var a=this.getBoundingClientRect(),b=this.__getNormalizedRect(this.positionTarget),c=this.__getNormalizedRect(this.fitInto),d=this._fitInfo.margin,f=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,{width:a.width+d.left+d.right,height:a.height+d.top+d.bottom},a,b,c);b=f.left+d.left;f=f.top+d.top;var g= Math.min(c.right-d.right,b+a.width),l=Math.min(c.bottom-d.bottom,f+a.height);b=Math.max(c.left+d.left,Math.min(b,g-this._fitInfo.sizedBy.minWidth));f=Math.max(c.top+d.top,Math.min(f,l-this._fitInfo.sizedBy.minHeight));this.sizingTarget.style.maxWidth=Math.max(g-b,this._fitInfo.sizedBy.minWidth)+"px";this.sizingTarget.style.maxHeight=Math.max(l-f,this._fitInfo.sizedBy.minHeight)+"px";this.style.left=b-a.left+"px";this.style.top=f-a.top+"px"}}, constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var a=this._fitInfo;a.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px");a.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px");this.sizingTarget.style.boxSizing="border-box";var b=this.getBoundingClientRect();a.sizedBy.height||this.__sizeDimension(b,a.positionedBy.vertically,"top","bottom","Height");a.sizedBy.width||this.__sizeDimension(b,a.positionedBy.horizontally,"left","right", "Width")}}, _sizeDimension:function(a,b,c,d,f){this.__sizeDimension(a,b,c,d,f)}, __sizeDimension:function(a,b,c,d,f){var g=this._fitInfo,l=this.__getNormalizedRect(this.fitInto);l="Width"===f?l.width:l.height;b=b===d;var m="offset"+f;this.sizingTarget.style["max"+f]=l-g.margin[b?c:d]-(b?l-a[d]:a[c])-(this[m]-this.sizingTarget[m])+"px"}, center:function(){if(!this.__shouldPosition){this._discoverInfo();var a=this._fitInfo.positionedBy;if(!a.vertically||!a.horizontally){this.style.position="fixed";a.vertically||(this.style.top="0px");a.horizontally||(this.style.left="0px");var b=this.getBoundingClientRect(),c=this.__getNormalizedRect(this.fitInto);a.vertically||(this.style.top=c.top-b.top+(c.height-b.height)/2+"px");a.horizontally||(this.style.left=c.left-b.left+(c.width-b.width)/2+"px")}}}, __getNormalizedRect:function(a){return a===document.documentElement||a===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:a.getBoundingClientRect()}, __getOffscreenArea:function(a,b,c){return Math.abs(Math.min(0,a.top)+Math.min(0,c.bottom-(a.top+b.height)))*b.width+Math.abs(Math.min(0,a.left)+Math.min(0,c.right-(a.left+b.width)))*b.height}, __getPosition:function(a,b,c,d,f,g){var l=[{verticalAlign:"top",horizontalAlign:"left",top:f.top+this.verticalOffset,left:f.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:f.top+this.verticalOffset,left:f.right-c.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:f.bottom-c.height-this.verticalOffset,left:f.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:f.bottom-c.height-this.verticalOffset,left:f.right-c.width- this.horizontalOffset}];if(this.noOverlap){for(var m=0,n=l.length;mr||0===r&&( f||n))z=d}}return z}};var uI=Element.prototype,vI=uI.matches||uI.matchesSelector||uI.mozMatchesSelector||uI.msMatchesSelector||uI.oMatchesSelector||uI.webkitMatchesSelector,PHa=function(){},wI=function(a,b){var c=[]; return a._collectTabbableNodes(b,c)?a._sortByTabIndex(c):c}; e=PHa.prototype;e.isFocusable=function(a){return vI.call(a,"input, select, textarea, button, object")?vI.call(a,":not([disabled])"):vI.call(a,"a[href], area[href], iframe, [tabindex], [contentEditable]")}; e.isTabbable=function(a){return this.isFocusable(a)&&vI.call(a,":not([tabindex=\"-1\"])")&&this._isVisible(a)}; e._normalizedTabIndex=function(a){return this.isFocusable(a)?(a=a.getAttribute("tabindex")||0,Number(a)):-1}; e._collectTabbableNodes=function(a,b){if(a.nodeType!==Node.ELEMENT_NODE||!this._isVisible(a))return!1;var c=this._normalizedTabIndex(a),d=0b)return a;var c=Math.ceil(b/2);b=this._sortByTabIndex(a.slice(0,c));a=this._sortByTabIndex(a.slice(c));return this._mergeSortByTabIndex(b,a)}; e._mergeSortByTabIndex=function(a,b){for(var c=[];0a:a>b}; var QHa=new PHa;var RHa=ca(["\n \n\n \n"]); fI({_template:qG(RHa),is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null}, attached:function(){this.opened&&this._openedChanged(this.opened)}, prepare:function(){this.opened&&!this.parentNode&&RH(document.body).appendChild(this)}, open:function(){this.opened=!0}, close:function(){this.opened=!1}, complete:function(){this.opened||this.parentNode!==document.body||RH(this.parentNode).removeChild(this)}, _onTransitionend:function(a){a&&a.target===this&&this.complete()}, _openedChanged:function(a){a?this.prepare():(a=window.getComputedStyle(this),"0s"!==a.transitionDuration&&0!=a.opacity||this.complete());this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null;this.toggleClass("opened",this.opened)}.bind(this)))}});var xI=function(){this._overlays=[];this._minimumZ=101;this._backdropElement=null;yH(document.documentElement,"tap",function(){}); document.addEventListener("tap",this._onCaptureClick.bind(this),!0);document.addEventListener("focus",this._onCaptureFocus.bind(this),!0);document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}; xI.prototype._bringOverlayAtIndexToFront=function(a){var b=this._overlays[a];if(b){var c=this._overlays.length-1,d=this._overlays[c];d&&this._shouldBeBehindOverlay(b,d)&&c--;if(!(a>=c)){d=Math.max(this._getZ(yI(this)),this._minimumZ);for(this._getZ(b)<=d&&this._applyOverlayZ(b,d);a=Math.abs(b),f=0;fc?0b?0\n \n\n
\n \n
\n"]); fI({_template:qG(bIa),is:"iron-dropdown",behaviors:[nI,mI,BI,aIa],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"], get containedElement(){for(var a=RH(this.$.content).getDistributedNodes(),b=0,c=a.length;b\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n \n\n"]), dIa=qG(cIa);dIa.setAttribute("style","display: none;");document.head.appendChild(dIa.content);Polymer.ResolveUrl={resolveCss:Pc,resolveUrl:Oc,pathFromUrl:Qc};Polymer.DomModule=tG;Polymer.Async={timeOut:wG,animationFrame:xG,idlePeriod:PDa,microTask:yG};Polymer.dedupingMixin=zG;Polymer.wrap=AG;Polymer.PropertiesChanged=BG;Polymer.telemetry={instanceCount:CG,incrementInstanceCount:function(){CG++}, registrations:DG,register:EG,dumpRegistrations:function(){DG.forEach(_regLog$$module$third_party$javascript$polymer$v2$polymer$lib$utils$telemetry)}};Polymer.PropertiesMixin=RDa;Polymer.CaseMap={dashToCamelCase:GG,camelToDashCase:HG};Polymer.PropertyAccessors=KG;Polymer.TemplateStamp=aEa;Polymer.Path={isPath:LG,root:MG,isAncestor:NG,isDescendant:OG,translate:PG,matches:QG,normalize:RG,split:bEa,get:SG,set:cEa,isDeep:LG};Polymer.Settings={useShadow:Rc,useNativeCSSProperties:Iba,useNativeCustomElements:Jba,get rootPath(){return Vc},setRootPath:function(a){Vc=a}, get sanitizeDOMValue(){return Wc},setSanitizeDOMValue:function(a){Wc=a}, get passiveTouchGestures(){return Xc},setPassiveTouchGestures:function(a){Xc=a}, get strictTemplatePolicy(){return Yc},setStrictTemplatePolicy:function(a){Yc=a}, get allowTemplateFromDomModule(){return Zc},setAllowTemplateFromDomModule:function(a){Zc=a}, get legacyOptimizations(){return $c},setLegacyOptimizations:function(a){$c=a}, get syncInitialRender(){return bd},setSyncInitialRender:function(a){bd=a}, get legacyUndefined(){return cd},setLegacyUndefined:function(a){cd=a}, get legacyWarnings(){return ad},setLegacyWarnings:function(a){ad=a}, get orderedComputed(){return dd},setOrderedComputed:function(a){dd=a}, get fastDomIf(){return fd},setFastDomIf:function(a){fd=a}, get removeNestedTemplates(){return ed},setRemoveNestedTemplates:function(a){ed=a}, get suppressTemplateNotifications(){return gd},setSuppressTemplateNotifications:gd};void 0!==Polymer.rootPath&&(Vc=Polymer.rootPath);void 0!==Polymer.sanitizeDOMValue&&(Wc=Polymer.sanitizeDOMValue);void 0!==Polymer.passiveTouchGestures&&(Xc=Polymer.passiveTouchGestures);void 0!==Polymer.strictTemplatePolicy&&(Yc=Polymer.strictTemplatePolicy);Zc=void 0!==Polymer.allowTemplateFromDomModule?Polymer.allowTemplateFromDomModule:!0;void 0!==Polymer.legacyOptimizations&&($c=Polymer.legacyOptimizations); void 0!==Polymer.syncInitialRender&&(bd=Polymer.syncInitialRender);void 0!==Polymer.legacyUndefined&&(cd=Polymer.legacyUndefined);void 0!==Polymer.legacyWarnings&&(ad=Polymer.legacyWarnings);void 0!==Polymer.orderedComputed&&(dd=Polymer.orderedComputed);void 0!==Polymer.fastDomIf&&(fd=Polymer.fastDomIf);void 0!==Polymer.removeNestedTemplates&&(ed=Polymer.removeNestedTemplates);void 0!==Polymer.suppressTemplateNotifications&&(gd=Polymer.suppressTemplateNotifications); Object.defineProperty(Polymer,"sanitizeDOMValue",{get:function(){return Wc}, set:function(a){Wc=a}});Polymer.PropertyEffects=YG;Polymer.StyleGather={stylesFromModules:DEa,stylesFromModule:EEa,stylesFromTemplate:ZG,stylesFromModuleImports:FEa,cssFromModules:GEa,cssFromModule:HEa,cssFromTemplate:IEa,cssFromModuleImports:function(a){return(a=tG.import(a))?_cssFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(a):""}};Polymer.ElementMixin=$G;Polymer.updateStyles=function(a){window.ShadyCSS&&window.ShadyCSS.styleDocument(a)}; Polymer.version="3.4.1";Polymer.ArraySplice={calculateSplices:MEa};Polymer.html=qG;Polymer.htmlLiteral=function(a,b){for(var c=[],d=1;d\n \n"]), gIa=new oI({type:"iconset"});fI({_template:qG(fIa),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String}},observers:["_updateIcon(isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(a){a=(a||"").split(":");this._iconName=a.pop();this._iconsetName=a.pop()||this._DEFAULT_ICONSET;this._updateIcon()}, _srcChanged:function(){this._updateIcon()}, _usesIconset:function(){return this.icon||!this.src}, _updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&RH(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&((this._iconset=gIa.byKey(this._iconsetName))?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"), this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,RH(this.root).appendChild(this._img))}});fI({is:"iron-iconset-svg",_template:null,properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new oI({type:"iconset",key:null,value:null})}, attached:function(){this.style.display="none"}, getIconNames:function(){this._icons=this._createIconMap();return Object.keys(this._icons).map(function(a){return this.name+":"+a},this)}, applyIcon:function(a,b){this.removeIcon(a);if(b=this._cloneIcon(b,this.rtlMirroring&&this._targetIsRTL(a))){var c=RH(a.root||a);c.insertBefore(b,c.childNodes[0]);return a._svgIcon=b}return null}, removeIcon:function(a){a._svgIcon&&(RH(a.root||a).removeChild(a._svgIcon),a._svgIcon=null)}, _targetIsRTL:function(a){null==this.__targetIsRTL&&(this.useGlobalRtlAttribute?this.__targetIsRTL="rtl"===(document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement).getAttribute("dir"):(a&&a.nodeType!==Node.ELEMENT_NODE&&(a=a.host),this.__targetIsRTL=a&&"rtl"===window.getComputedStyle(a).direction));return this.__targetIsRTL}, _nameChanged:function(){this._meta.value=null;this._meta.key=this.name;this._meta.value=this;this.async(function(){this.fire("iron-iconset-added",this,{node:window})})}, _createIconMap:function(){var a=Object.create(null);RH(this).querySelectorAll("[id]").forEach(function(b){a[b.id]=b}); return a}, _cloneIcon:function(a,b){this._icons=this._icons||this._createIconMap();return this._prepareSvgClone(this._icons[a],this.size,b)}, _prepareSvgClone:function(a,b,c){if(a){a=a.cloneNode(!0);var d=document.createElementNS("http://www.w3.org/2000/svg","svg");b=a.getAttribute("viewBox")||"0 0 "+b+" "+b;var f="pointer-events: none; display: block; width: 100%; height: 100%;";c&&a.hasAttribute("mirror-in-rtl")&&(f+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;");d.setAttribute("viewBox",b);d.setAttribute("preserveAspectRatio","xMidYMid meet");d.setAttribute("focusable","false");d.style.cssText=f;d.appendChild(a).removeAttribute("id"); return d}return null}});/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ var hIa=da(["\n \n\n \n
\n \n
\n"], ["\n \n\n \n
\n \n
\n"]); fI({_template:qG(hIa),is:"iron-image",properties:{src:{type:String,value:""},alt:{type:String,value:null},crossorigin:{type:String,value:null},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1}, error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)","_loadStateObserver(src, preventLoad)"],created:function(){this._resolvedSrc=""}, _imgOnLoad:function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))}, _imgOnError:function(){this.$.img.src===this._resolveSrc(this.src)&&(this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!0))}, _computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded}, _computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""}, _computeImgDivHidden:function(){return!this.sizing}, _computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0}, _computeImgDivARIALabel:function(){return null!==this.alt?this.alt:""===this.src?"":this._resolveSrc(this.src).replace(/[?|#].*/g,"").split("/").pop()}, _computeImgHidden:function(){return!!this.sizing}, _widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"}, _heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"}, _loadStateObserver:function(a,b){var c=this._resolveSrc(a);c!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===a||b?this._setLoading(!1):(this._resolvedSrc=c,this.$.img.src=this._resolvedSrc,this.$.sizedImgDiv.style.backgroundImage="url(\""+this._resolvedSrc+"\")",this._setLoading(!0)),this._setLoaded(!1),this._setError(!1))}, _placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?"url(\""+this.placeholder+"\")":""}, _transformChanged:function(){var a=this.$.sizedImgDiv.style,b=this.$.placeholder.style;a.backgroundSize=b.backgroundSize=this.sizing;a.backgroundPosition=b.backgroundPosition=this.sizing?this.position:"";a.backgroundRepeat=b.backgroundRepeat=this.sizing?"no-repeat":""}, _resolveSrc:function(a){a=Oc(a,this.$.baseURIAnchor.href);2<=a.length&&"/"===a[0]&&"/"!==a[1]&&(a=(location.origin||location.protocol+"//"+location.host)+a);return a}});var iIa=ca(["\n \n \n"]); fI({_template:qG(iIa),is:"iron-input",behaviors:[qI],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){jI.requestAvailability();this._previousValidInput="";this._patternAlreadyChecked=!1}, attached:function(){this._observer=RH(this).observeNodes(function(){this._initSlottedInput()}.bind(this))}, detached:function(){this._observer&&(RH(this).unobserveNodes(this._observer),this._observer=null)}, get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0];this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value);this.fire("iron-input-ready")}, get _patternRegExp(){if(this.allowedPattern)var a=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":a=/[0-9.,e-]/;}return a},_bindValueChanged:function(a,b){b&&(void 0===a?b.value=null:a!==b.value&&(this.inputElement.value=a),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:a}))}, _onInput:function(){!this.allowedPattern||this._patternAlreadyChecked||this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput);this.bindValue=this._previousValidInput=this.inputElement.value;this._patternAlreadyChecked=!1}, _isPrintable:function(a){var b=19==a.keyCode||20==a.keyCode||45==a.keyCode||46==a.keyCode||144==a.keyCode||145==a.keyCode||32a.keyCode||111a.keyCode;return!(8==a.keyCode||9==a.keyCode||13==a.keyCode||27==a.keyCode)&&!(0==a.charCode&&b)}, _onKeypress:function(a){if(this.allowedPattern||"number"===this.inputElement.type){var b=this._patternRegExp;if(b&&!(a.metaKey||a.ctrlKey||a.altKey)){this._patternAlreadyChecked=!0;var c=String.fromCharCode(a.charCode);this._isPrintable(a)&&!b.test(c)&&(a.preventDefault(),this._announceInvalidCharacter("Invalid character "+c+" not entered."))}}}, _checkPatternValidity:function(){var a=this._patternRegExp;if(!a)return!0;for(var b=0;b\n \n\n \n\n
\n \n
\n"]), kIa=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),lIa=kIa&&8<=kIa[1]; fI({_template:qG(jIa),is:"iron-list",properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_gridChanged"},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)", "_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[iHa,iI,qHa,ZGa],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedItem:null,_focusedVirtualIndex:-1,_focusedPhysicalIndex:-1,_offscreenFocusedItem:null, _focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return(this.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _itemsParent(){return RH(RH(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight- this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var a=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,a-this._physicalCount)},set _virtualStart(a){a=this._clamp(a,0,this._maxVirtualStart);this.grid&&(a-=a%this._itemsPerRow);this._virtualStartVal=a},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(a){a%=this._physicalCount;0>a&&(a=this._physicalCount+a);this.grid&&(a-=a%this._itemsPerRow);this._physicalStartVal=a},get _physicalStart(){return this._physicalStartVal|| 0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(a){this._physicalCountVal=a},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return 0===this._viewportHeight?Infinity:this._viewportHeight*this._maxPages},get _isVisible(){return!(!this.offsetWidth&&!this.offsetHeight)},get firstVisibleIndex(){var a=this._firstVisibleIndexVal;if(null==a){var b=this._physicalTop+this._scrollOffset;this._firstVisibleIndexVal= a=this._iterateItems(function(c,d){b+=this._getPhysicalSizeIncrement(c);if(b>this._scrollPosition)return this.grid?d-d%this._itemsPerRow:d;if(this.grid&&this._virtualCount-1===d)return d-d%this._itemsPerRow})||0}return a}, get lastVisibleIndex(){var a=this._lastVisibleIndexVal;if(null==a){if(this.grid)a=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var b=this._physicalTop+this._scrollOffset;this._iterateItems(function(c,d){bthis._physicalSize&&0=g||m<=c)break;if(a){if(f+b.length+1>=this._virtualCount)break;if(l+z>=n-this._scrollOffset)break;b.push(u); l+=z;u=(u+1)%g}else{if(0>=d-b.length)break;if(l+this._physicalSize-z<=r)break;b.push(u);l-=z;u=0===u?g-1:u-1}}return{indexes:b,physicalTop:l-this._scrollOffset}}, _update:function(a,b){if(!(a&&0===a.length||0===this._physicalCount)){this._manageFocus();this._assignModels(a);this._updateMetrics(a);if(b)for(;b.length;)a=b.pop(),this._physicalTop-=this._getPhysicalSizeIncrement(a);this._positionItems();this._updateScrollerSize()}}, _createPool:function(a){this._ensureTemplatized();var b,c=Array(a);for(b=0;b=this._scrollBottom&&this._physicalTop<=this._scrollPosition}, _increasePoolIfNeeded:function(a){a=this._clamp(this._physicalCount+a,3,this._virtualCount-this._virtualStart);a=this._convertIndexToCompleteRow(a);if(this.grid){var b=a%this._itemsPerRow;b&&a-b<=this._physicalCount&&(a+=this._itemsPerRow);a-=b}a-=this._physicalCount;b=Math.round(.5*this._physicalCount);if(!(0>a)){if(0this._physicalEnd&& this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)=this._virtualCount-1||0===b||(this._isClientFull()?this._physicalSizethis._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render, xG);else if("items.splices"===a.path){this._adjustVirtualIndex(a.value.indexSplices);this._virtualCount=this.items?this.items.length:0;if(a.value.indexSplices.some(function(c){return 0=this._virtualStart&&c.index<=this._virtualEnd},this); this._isClientFull()&&!a||this._debounce("_render",this._render,xG)}else"items.length"!==a.path&&this._forwardItemPath(a.path,a.value)}, _forwardItemPath:function(a,b){a=a.slice(6);var c=a.indexOf(".");-1===c&&(c=a.length);var d,f=this.modelForElement(this._offscreenFocusedItem),g=parseInt(a.substring(0,c),10);if(d=this._isIndexRendered(g)){var l=this._getPhysicalIndex(g);var m=this.modelForElement(this._physicalItems[l])}else f&&(m=f);m&&m[this.indexAs]===g&&(a=a.substring(c+1),a=this.as+(a?"."+a:""),m._setPendingPropertyOrPath(a,b,!1,!0),m._flushProperties&&m._flushProperties(),d&&(this._updateMetrics([l]),this._positionItems(), this._updateScrollerSize()))}, _adjustVirtualIndex:function(a){a.forEach(function(b){b.removed.forEach(this._removeItem,this);b.index=this._physicalStart?this._virtualStart+(a-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+a}, _assignModels:function(a){this._iterateItems(function(b,c){var d=this._physicalItems[b],f=this.items&&this.items[c];if(null!=f){var g=this.modelForElement(d);g.__key__=null;this._forwardProperty(g,this.as,f);this._forwardProperty(g,this.selectedAs,this.$.selector.isSelected(f));this._forwardProperty(g,this.indexAs,c);this._forwardProperty(g,"tabIndex",this._focusedVirtualIndex===c?0:-1);this._physicalIndexForKey[g.__key__]=b;g._flushProperties&&g._flushProperties(!0);d.removeAttribute("hidden")}else d.setAttribute("hidden", "")},a)}, _updateMetrics:function(a){EH();var b=0,c=0,d=this._physicalAverageCount,f=this._physicalAverage;this._iterateItems(function(g){c+=this._physicalSizes[g];this._physicalSizes[g]=this._physicalItems[g].offsetHeight;b+=this._physicalSizes[g];this._physicalAverageCount+=this._physicalSizes[g]?1:0},a); this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(c=1===this._itemsPerRow?c:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+b-c,this._itemsPerRow=1);this._physicalAverageCount!==d&&(this._physicalAverage=Math.round((f*d+b)/this._physicalAverageCount))}, _updateGridMetrics:function(){this._itemWidth=0=this._estScrollHeight-this._physicalSize)||this.grid&&this.$.items.style.height=this._viewportHeight)this.$.items.style.height=this._estScrollHeight+ "px",this._scrollHeight=this._estScrollHeight}, scrollToItem:function(a){return this.scrollToIndex(this.items.indexOf(a))}, scrollToIndex:function(a){if(!("number"!==typeof a||0>a||a>this.items.length-1)&&(EH(),0!==this._physicalCount)){a=this._clamp(a,0,this._virtualCount-1);if(!this._isIndexRendered(a)||a>=this._maxVirtualStart)this._virtualStart=this.grid?a-2*this._itemsPerRow:a-1;this._manageFocus();this._assignModels();this._updateMetrics();this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var b=this._physicalStart,c=this._virtualStart,d=0,f=this._hiddenContentSize;ca||a>=this._virtualCount)){!this.multiSelection&&this.selectedItem&&this.clearSelection();if(this._isIndexRendered(a)){var b=this.modelForElement(this._physicalItems[this._getPhysicalIndex(a)]);b&&(b[this.selectedAs]=!0);this.updateSizeForIndex(a)}this.$.selector.selectIndex(a)}}, deselectItem:function(a){return this.deselectIndex(this.items.indexOf(a))}, deselectIndex:function(a){0>a||a>=this._virtualCount||(this._isIndexRendered(a)&&(this.modelForElement(this._physicalItems[this._getPhysicalIndex(a)])[this.selectedAs]=!1,this.updateSizeForIndex(a)),this.$.selector.deselectIndex(a))}, toggleSelectionForItem:function(a){return this.toggleSelectionForIndex(this.items.indexOf(a))}, toggleSelectionForIndex:function(a){(this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(a):this.$.selector.isSelected(this.items[a]))?this.deselectIndex(a):this.selectIndex(a)}, clearSelection:function(){this._iterateItems(function(a){this.modelForElement(this._physicalItems[a])[this.selectedAs]=!1}); this.$.selector.clearSelection()}, _selectionEnabledChanged:function(a){(a?this.listen:this.unlisten).call(this,this,"tap","_selectionHandler")}, _selectionHandler:function(a){var b=this.modelForElement(a.target);if(b){var c=RH(a).path[0];a=this._getActiveElement();var d=this._physicalItems[this._getPhysicalIndex(b[this.indexAs])];if("input"!==c.localName&&"button"!==c.localName&&"select"!==c.localName){c=b.tabIndex;b.tabIndex=-100;var f=a?a.tabIndex:-1;b.tabIndex=c;a&&d!==a&&d.contains(a)&&-100!==f||this.toggleSelectionForItem(b[this.as])}}}, _multiSelectionChanged:function(a){this.clearSelection();this.$.selector.multi=a}, updateSizeForItem:function(a){return this.updateSizeForIndex(this.items.indexOf(a))}, updateSizeForIndex:function(a){if(!this._isIndexRendered(a))return null;this._updateMetrics([this._getPhysicalIndex(a)]);this._positionItems();return null}, _manageFocus:function(){var a=this._focusedVirtualIndex;0<=a&&a=this._virtualStart&&a<=this._virtualEnd}, _isIndexVisible:function(a){return a>=this.firstVisibleIndex&&a<=this.lastVisibleIndex}, _getPhysicalIndex:function(a){return(this._physicalStart+(a-this._virtualStart))%this._physicalCount}, focusItem:function(a){this._focusPhysicalItem(a)}, _focusPhysicalItem:function(a){if(!(0>a||a>=this._virtualCount)){this._restoreFocusedItem();this._isIndexRendered(a)||this.scrollToIndex(a);var b=this._physicalItems[this._getPhysicalIndex(a)],c=this.modelForElement(b),d;c.tabIndex=-100;-100===b.tabIndex&&(d=b);d||(d=RH(b).querySelector("[tabindex=\"-100\"]"));c.tabIndex=0;this._focusedVirtualIndex=a;d&&d.focus()}}, _removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem);this._focusedItem=this._focusBackfillItem=this._offscreenFocusedItem=null;this._focusedPhysicalIndex=this._focusedVirtualIndex=-1}, _createFocusBackfillItem:function(){var a=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||0>this._focusedVirtualIndex)){if(!this._focusBackfillItem){var b=this.stamp(null);this._focusBackfillItem=b.root.querySelector("*");this._itemsParent.appendChild(b.root)}this._offscreenFocusedItem=this._physicalItems[a];this.modelForElement(this._offscreenFocusedItem).tabIndex=0;this._physicalItems[a]=this._focusBackfillItem;this._focusedPhysicalIndex=a;this.translate3d(0,"-10000px",0,this._offscreenFocusedItem)}}, _restoreFocusedItem:function(){if(this._offscreenFocusedItem&&!(0>this._focusedVirtualIndex)){this._assignModels();var a=this._focusedPhysicalIndex=this._getPhysicalIndex(this._focusedVirtualIndex),b=this._physicalItems[a];if(b){var c=this.modelForElement(b),d=this.modelForElement(this._offscreenFocusedItem);c[this.as]===d[this.as]?(this._focusBackfillItem=b,c.tabIndex=-1,this._physicalItems[a]=this._offscreenFocusedItem,this.translate3d(0,"-10000px",0,this._focusBackfillItem)):(this._removeFocusedItem(), this._focusBackfillItem=null);this._offscreenFocusedItem=null}}}, _didFocus:function(a){a=this.modelForElement(a.target);var b=this.modelForElement(this._focusedItem),c=null!==this._offscreenFocusedItem,d=this._focusedVirtualIndex;a&&(b===a?this._isIndexVisible(d)||this.scrollToIndex(d):(this._restoreFocusedItem(),b&&(b.tabIndex=-1),a.tabIndex=0,this._focusedVirtualIndex=d=a[this.indexAs],this._focusedPhysicalIndex=this._getPhysicalIndex(d),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],c&&!this._offscreenFocusedItem&&this._update()))}, _keydownHandler:function(a){switch(a.keyCode){case 40:this._focusedVirtualIndexa.indexOf(b))&&this.setItemSelected(b,!1)},this)}; e.isSelected=function(a){return 0<=this.selection.indexOf(a)}; e.setItemSelected=function(a,b){if(null!=a&&b!==this.isSelected(a)){if(b)this.selection.push(a);else{var c=this.selection.indexOf(a);0<=c&&this.selection.splice(c,1)}this.selectCallback&&this.selectCallback(a,b)}}; e.select=function(a){this.multi?this.toggle(a):this.get()!==a&&(this.setItemSelected(this.get(),!1),this.setItemSelected(a,!0))}; e.toggle=function(a){this.setItemSelected(a,!this.isSelected(a))};var CI={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}, _excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}}, observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this);this._selection=new mIa(this._applySelection.bind(this))}, attached:function(){this._observer=this._observeItems(this);this._addListener(this.activateEvent)}, detached:function(){this._observer&&RH(this).unobserveNodes(this._observer);this._removeListener(this.activateEvent)}, indexOf:function(a){return this.items?this.items.indexOf(a):-1}, select:function(a){this.selected=a}, selectPrevious:function(){var a=this.items.length,b=a-1;void 0!==this.selected&&(b=(Number(this._valueToIndex(this.selected))-1+a)%a);this.selected=this._indexToValue(b)}, selectNext:function(){var a=0;void 0!==this.selected&&(a=(Number(this._valueToIndex(this.selected))+1)%this.items.length);this.selected=this._indexToValue(a)}, selectIndex:function(a){this.select(this._indexToValue(a))}, forceSynchronousItemUpdate:function(){this._observer&&"function"===typeof this._observer.flush?this._observer.flush():this._updateItems()}, get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._updateSelected()}, _addListener:function(a){this.listen(this,a,"_activateHandler")}, _removeListener:function(a){this.unlisten(this,a,"_activateHandler")}, _activateEventChanged:function(a,b){this._removeListener(b);this._addListener(a)}, _updateItems:function(){var a=RH(this).queryDistributedElements(this.selectable||"*");a=Array.prototype.filter.call(a,this._bindFilterItem);this._setItems(a)}, _updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))}, _updateSelected:function(){this._selectSelected(this.selected)}, _selectSelected:function(){if(this.items){var a=this._valueToItem(this.selected);a?this._selection.select(a):this._selection.clear();this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)}}, _filterItem:function(a){return!this._excludedLocalNames[a.localName]}, _valueToItem:function(a){return null==a?null:this.items[this._valueToIndex(a)]}, _valueToIndex:function(a){if(this.attrForSelected)for(var b=0,c;c=this.items[b];b++){if(this._valueForItem(c)==a)return b}else return Number(a)}, _indexToValue:function(a){if(this.attrForSelected){if(a=this.items[a])return this._valueForItem(a)}else return a}, _valueForItem:function(a){if(!a)return null;if(!this.attrForSelected)return a=this.indexOf(a),-1===a?null:a;var b=a[GG(this.attrForSelected)];return void 0!=b?b:a.getAttribute(this.attrForSelected)}, _applySelection:function(a,b){this.selectedClass&&this.toggleClass(this.selectedClass,b,a);this.selectedAttribute&&this.toggleAttribute.call(a,this.selectedAttribute,b);this._selectionChange();this.fire("iron-"+(b?"select":"deselect"),{item:a})}, _selectionChange:function(){this._setSelectedItem(this._selection.get())}, _observeItems:function(a){return RH(a).observeNodes(function(b){this._updateItems();this._updateSelected();this.fire("iron-items-changed",b,{bubbles:!1,cancelable:!1})})}, _activateHandler:function(a){a=a.target;for(var b=this.items;a&&a!=this;){var c=b.indexOf(a);if(0<=c){b=this._indexToValue(c);this._itemActivate(b,a);break}a=a.parentNode}}, _itemActivate:function(a,b){this.fire("iron-activate",{selected:a,item:b},{cancelable:!0}).defaultPrevented||this.select(a)}};var nIa={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}, selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}}, observers:["_updateSelected(selectedValues.splices)"],select:function(a){this.multi?this._toggleSelected(a):this.selected=a}, multiChanged:function(a){this._selection.multi=a;this._updateSelected()}, get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&0b?this.push("selectedValues",a):this.splice("selectedValues",b,1)}, _valuesToItems:function(a){return null==a?null:a.map(function(b){return this._valueToItem(b)},this)}},oIa=[CI, nIa];var DI={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:"Alt AltGraph CapsLock Control Fn FnLock Hyper Meta NumLock OS ScrollLock Shift Super Symbol SymbolLock".split(" "),_SEARCH_RESET_TIMEOUT_MS:1E3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"}, keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()}, select:function(a){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var b=this._valueToItem(a);b&&b.hasAttribute("disabled")||(this._setFocusedItem(b),nIa.select.apply(this,arguments))}, _resetTabindices:function(){var a=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(b){b.setAttribute("tabindex",b===a?"0":"-1");b.setAttribute("aria-selected",this._selection.isSelected(b))},this)}, _updateMultiselectable:function(a){a?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")}, _focusWithKeyboardEvent:function(a){if(-1===this._MODIFIER_KEYS.indexOf(a.key)){this.cancelDebouncer("_clearSearchText");var b=this._searchText||"";b+=(a.key&&1==a.key.length?a.key:String.fromCharCode(a.keyCode)).toLocaleLowerCase();a=b.length;for(var c=0,d;d=this.items[c];c++)if(!d.hasAttribute("disabled")){var f=this.attrForItemTitle||"textContent";f=(d[f]||d.getAttribute(f)||"").trim();if(!(f.length\n \n\n \n"]);fI({_template:qG(sIa),is:"iron-pages",behaviors:[iI,CI],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(){this.async(this.notifyResize)}});var tIa={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(a){return(this._clampValue(a)-this.min)/(this.max-this.min)}, _clampValue:function(a){return Math.min(this.max,Math.max(this.min,this._calcStep(a)))}, _calcStep:function(a){a=parseFloat(a);if(!this.step)return a;a=Math.round((a-this.min)/this.step);return 1>this.step?a/(1/this.step)+this.min:a*this.step+this.min}, _validateValue:function(){var a=this._clampValue(this.value);this.value=this.oldValue=isNaN(a)?this.oldValue:a;return this.value!==a}, _update:function(){this._validateValue();this._setRatio(100*this._calcRatio(this.value))}};Polymer.IronResizableBehavior=iI;fI({is:"iron-selector",_template:null,behaviors:[oIa]});var EI={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}}, isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")}, timingFromConfig:function(a){if(a.timing)for(var b in a.timing)this.animationTiming[b]=a.timing[b];return this.animationTiming}, setPrefixedProperty:function(a,b,c){for(var d={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]}[b],f,g=0;f=d[g];g++)a.style[f]=c;a.style[b]=c}, complete:function(){}};fI({is:"fade-in-animation",_template:null,behaviors:[EI],configure:function(a){return this._effect=new KeyframeEffect(a.node,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(a))}});fI({is:"fade-out-animation",_template:null,behaviors:[EI],configure:function(a){return this._effect=new KeyframeEffect(a.node,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(a))}});/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ var uIa=ca(["\n \n\n
\n
\n"]), FI=function(a,b,c,d){a-=c;b-=d;return Math.sqrt(a*a+b*b)},GI=window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now; function vIa(a){this.element=a;this.width=this.boundingRect.width;this.height=this.boundingRect.height;this.size=Math.max(this.width,this.height)} vIa.prototype={get boundingRect(){return this.element.getBoundingClientRect()}};function wIa(a){this.element=a;this.color=window.getComputedStyle(a).color;this.wave=document.createElement("div");this.waveContainer=document.createElement("div");this.wave.style.backgroundColor=this.color;this.wave.classList.add("wave");this.waveContainer.classList.add("wave-container");RH(this.waveContainer).appendChild(this.wave);xIa(this)} var xIa=function(a){a.maxRadius=0;a.mouseDownStart=0;a.mouseUpStart=0;a.xStart=0;a.yStart=0;a.xEnd=0;a.yEnd=0;a.slideDistance=0;a.containerMetrics=new vIa(a.element)}; wIa.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){if(!this.mouseDownStart)return 0;var a=GI()-this.mouseDownStart;this.mouseUpStart&&(a-=this.mouseUpElapsed);return a},get mouseUpElapsed(){return this.mouseUpStart?GI()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1E3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1E3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+ this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var a=1.1*Math.min(Math.sqrt(this.containerMetrics.width*this.containerMetrics.width+this.containerMetrics.height*this.containerMetrics.height),300)+5;return Math.abs(a*(1-Math.pow(80,-(this.mouseInteractionSeconds/(1.1-a/300*.2)))))},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity): this.initialOpacity},get outerOpacity(){return Math.max(0,Math.min(.3*this.mouseUpElapsedSeconds,this.opacity))},get isOpacityFullyDecayed(){return .01>this.opacity&&this.radius>=Math.min(this.maxRadius,300)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,300)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size* 2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},draw:function(){this.wave.style.opacity=this.opacity;var a=this.radius/(this.containerMetrics.size/2);var b=this.xNow-this.containerMetrics.width/2;var c=this.yNow-this.containerMetrics.height/2;this.waveContainer.style.webkitTransform= "translate("+b+"px, "+c+"px)";this.waveContainer.style.transform="translate3d("+b+"px, "+c+"px, 0)";this.wave.style.webkitTransform="scale("+a+","+a+")";this.wave.style.transform="scale3d("+a+","+a+",1)"}, downAction:function(a){var b=this.containerMetrics.width/2,c=this.containerMetrics.height/2;xIa(this);this.mouseDownStart=GI();this.center?(this.xStart=b,this.yStart=c,this.slideDistance=FI(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=a?a.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=a?a.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2);this.recenters&&(this.xEnd=b,this.yEnd=c,this.slideDistance=FI(this.xStart, this.yStart,this.xEnd,this.yEnd));a=this.containerMetrics;b=this.xStart;c=this.yStart;this.maxRadius=Math.max(FI(b,c,0,0),FI(b,c,a.width,0),FI(b,c,0,a.height),FI(b,c,a.width,a.height));this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px";this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px";this.waveContainer.style.width=this.containerMetrics.size+"px";this.waveContainer.style.height=this.containerMetrics.size+"px"}, upAction:function(){this.isMouseDown&&(this.mouseUpStart=GI())}, remove:function(){RH(RH(this.waveContainer).parentNode).removeChild(this.waveContainer)}}; fI({_template:qG(uIa),is:"paper-ripple",behaviors:[mI],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}}, animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}}, get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==RH(this).parentNode.nodeType?this.keyEventTarget=RH(this).getOwnerRoot().host:this.keyEventTarget=RH(this).parentNode;var a=this.keyEventTarget;this.listen(a,"up","uiUpAction");this.listen(a,"down","uiDownAction")}, detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction");this.unlisten(this.keyEventTarget,"down","uiDownAction");this.keyEventTarget=null}, get shouldKeepAnimating(){for(var a=0;ab||(this.ripples.splice(b,1),a.remove(),this.ripples.length||this._setAnimating(!1))}, animate:function(){if(this._animating){var a;for(a=0;athis.getRipple().ripples.length&&this._ripple.uiDownAction()}, _spaceKeyUpHandler:function(a){rI._spaceKeyUpHandler.call(this,a);this.hasRipple()&&this._ripple.uiUpAction()}},zIa=[sI, nI,HI,yIa];var AIa={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(a){a&&this.ensureRipple();this.hasRipple()&&(this._ripple.holdDown=a)}, _createRipple:function(){var a=HI._createRipple();a.id="ink";a.setAttribute("center","");a.classList.add("circle");return a}},BIa=[sI, nI,HI,AIa];var CIa=[BIa,MHa,{_checkedChanged:function(){LHa._checkedChanged.call(this);this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))}, _buttonStateChanged:function(){HI._buttonStateChanged.call(this);!this.disabled&&this.isAttached&&(this.checked=this.active)}}];Polymer.PaperRippleBehavior=HI;var DIa=document.createElement("template");DIa.setAttribute("style","display: none;");DIa.innerHTML=""; document.head.appendChild(DIa.content);var EIa=document.createElement("template");EIa.setAttribute("style","display: none;");EIa.innerHTML="\n \n"; document.head.appendChild(EIa.content);var FIa=ca(["\n \n\n "]); fI({_template:qG(FIa),is:"paper-button",behaviors:[zIa],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?yIa._calculateElevation.apply(this):this._setElevation(0)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var GIa=document.createElement("template");GIa.setAttribute("style","display: none;");GIa.innerHTML=""; document.head.appendChild(GIa.content);var HIa=document.createElement("template");HIa.setAttribute("style","display: none;");HIa.innerHTML=""; document.head.appendChild(HIa.content);var IIa=ca(["\n \n\n
\n \n
[[heading]]
\n
\n\n \n"]); fI({_template:qG(IIa),is:"paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(a){return a?"false": "true"}, _headingChanged:function(a){var b=this.getAttribute("heading"),c=this.getAttribute("aria-label");"string"===typeof c&&c!==b||this.setAttribute("aria-label",a)}, _computeHeadingClass:function(a){return a?" over-image":""}, _computeAnimated:function(a){return a}});var JIa=da(["\n\n
\n
\n
\n
\n
\n\n
"], ["\n\n
\n
\n
\n
\n
\n\n
"]); fI({_template:qG(JIa),is:"paper-checkbox",behaviors:[CIa],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){YH(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var a=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),b="px",c=a.match(/[A-Za-z]+$/);null!==c&&(b=c[0]);a=parseFloat(a);c=8/3*a;"px"===b&&(c=Math.floor(c),c%2!==a%2&& c++);this.updateStyles({"--paper-checkbox-ink-size":c+b})}})}, _computeCheckboxClass:function(a,b){var c="";a&&(c+="checked ");b&&(c+="invalid");return c}, _computeCheckmarkClass:function(a){return a?"":"hidden"}, _createRipple:function(){this._rippleContainer=this.$.checkboxContainer;return AIa._createRipple.call(this)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var KIa={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick;this.__prevNoCancelOnEscKey=this.noCancelOnEscKey;this.__prevWithBackdrop=this.withBackdrop;this.__readied=!0}, _modalChanged:function(a,b){b&&(a?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.withBackdrop=this.noCancelOnEscKey=this.noCancelOnOutsideClick=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))}, _updateClosingReasonConfirmed:function(a){this.closingReason=this.closingReason||{};this.closingReason.confirmed=a}, _onDialogClick:function(a){for(var b=RH(a).path,c=0,d=b.indexOf(this);c\n \n"; document.head.appendChild(NIa.content);var OIa=ca(["\n \n\n
\n \n
\n"]); fI({_template:qG(OIa),is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget();this.classList.add("no-padding")}, attached:function(){this._ensureTarget();requestAnimationFrame(this.updateScrollState.bind(this))}, updateScrollState:function(){this.toggleClass("is-scrolled",0=this.scrollTarget.scrollHeight)}, _ensureTarget:function(){(this.dialogElement=this.dialogElement||this.parentElement)&&this.dialogElement.behaviors&&0<=this.dialogElement.behaviors.indexOf(KIa)?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});var PIa=ca(["\n \n \n"]);fI({_template:qG(PIa),is:"paper-dialog",behaviors:[LIa,aIa],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation();this.playAnimation("entry")}, _renderClosed:function(){this.cancelAnimation();this.playAnimation("exit")}, _onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});var QIa=document.createElement("template");QIa.setAttribute("style","display: none;");QIa.innerHTML="\n\n\n\n";document.head.appendChild(QIa.content);var RIa=document.createElement("template");RIa.setAttribute("style","display: none;");RIa.innerHTML="\n \n"; document.head.appendChild(RIa.content);fI({is:"paper-menu-grow-height-animation",_template:null,behaviors:[EI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().height;return this._effect=new KeyframeEffect(b,[{height:c/2+"px"},{height:c+"px"}],this.timingFromConfig(a))}}); fI({is:"paper-menu-grow-width-animation",_template:null,behaviors:[EI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().width;return this._effect=new KeyframeEffect(b,[{width:c/2+"px"},{width:c+"px"}],this.timingFromConfig(a))}}); fI({is:"paper-menu-shrink-width-animation",_template:null,behaviors:[EI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().width;return this._effect=new KeyframeEffect(b,[{width:c+"px"},{width:c-c/20+"px"}],this.timingFromConfig(a))}}); fI({is:"paper-menu-shrink-height-animation",_template:null,behaviors:[EI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().height;this.setPrefixedProperty(b,"transformOrigin","0 0");return this._effect=new KeyframeEffect(b,[{height:c+"px",transform:"translateY(0)"},{height:c/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(a))}});var SIa=ca(["\n \n\n
\n \n
\n\n \n
\n \n
\n
\n"]), II={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},JI=function(){}; e=JI.prototype;e.registered=function(){this._prepKeyBindings()}; e.addOwnKeyBinding=function(a,b){this._imperativeKeyBindings[a]=b;this._prepKeyBindings();this._resetKeyEventListeners()}; e.removeOwnKeyBindings=function(){this._imperativeKeyBindings={};this._prepKeyBindings();this._resetKeyEventListeners()}; e.keyboardEventMatchesKeys=function(a,b){b=lI(b);for(var c=0;c\n \n\n \n \n
\n \n
 
\n \n [[errorMessage]]\n
\n \n
\n"]), UIa=eI(HTMLElement); fI({_template:qG(TIa),is:"paper-dropdown-menu-light",behaviors:[sI,nI,HI,tI,qI],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0,observer:"_valueChanged"},label:{type:String},placeholder:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1}, noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,hasContent:{type:Boolean,readOnly:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom:function(a){var b=AG(this);b.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:a});b.shadowRoot.appendChild(a);return UIa.prototype._attachDom.call(this,a)}, focus:function(){this.$["dropdown-trigger"].focus()}, attached:function(){var a=this.contentElement;a&&a.selectedItem&&this._setSelectedItem(a.selectedItem)}, get contentElement(){for(var a=RH(this.$.content).getDistributedNodes(),b=0,c=a.length;b\n \n\n [[_charCounterStr]]\n"]); fI({_template:qG($Ia),is:"paper-input-char-counter",behaviors:[ZIa],properties:{_charCounterStr:{type:String,value:"0"}},update:function(a){if(a.inputElement){a.value=a.value||"";var b=a.value.toString().length.toString();a.inputElement.hasAttribute("maxlength")&&(b+="/"+a.inputElement.getAttribute("maxlength"));this._charCounterStr=b}}});var aJa=ca(["\n\n"]), bJa=ca(["\n \n\n \n\n
\n \n\n
\n \n \n
\n\n \n
\n\n
\n
\n
\n
\n\n
\n \n
\n"]), cJa=qG(aJa);cJa.setAttribute("style","display: none;");document.head.appendChild(cJa.content); fI({_template:qG(bJa),is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},noUnfloatedLabelError:{type:Boolean,value:!1},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"}, _boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}}, _boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}}, _boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}}, _boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}}, listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return GG(this.attrForValue)},get _inputElement(){return RH(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0;this._addons||(this._addons=[]);this.addEventListener("focus",this._boundOnFocus, !0);this.addEventListener("blur",this._boundOnBlur,!0)}, attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput);this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)}, _onAddonAttached:function(a){this._addons||(this._addons=[]);a=a.target;-1===this._addons.indexOf(a)&&(this._addons.push(a),this.isAttached&&this._handleValue(this._inputElement))}, _onFocus:function(){this._setFocused(!0)}, _onBlur:function(){this._setFocused(!1);this._handleValueAndAutoValidate(this._inputElement)}, _onInput:function(a){this._handleValueAndAutoValidate(a.target)}, _onValueChanged:function(a){var b=a.target;if(this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,void 0===b.value||""===b.value))return;this._handleValueAndAutoValidate(a.target)}, _handleValue:function(a){var b=this._inputElementValue;b||0===b||"number"===a.type&&!a.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1;this.updateAddons({inputElement:a,value:b,invalid:this.invalid})}, _handleValueAndAutoValidate:function(a){this.autoValidate&&a&&(this.invalid=!(a.validate?a.validate(this._inputElementValue):a.checkValidity()));this._handleValue(a)}, _onIronInputValidate:function(){this.invalid=this._inputElement.invalid}, _invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})}, updateAddons:function(a){for(var b,c=0;b=this._addons[c];c++)b.update(a)}, _computeInputContentClass:function(a,b,c,d,f){var g="input-content";a?(f&&(g+=" label-is-hidden"),d&&!this.noUnfloatedLabelError&&(g+=" is-invalid")):(a=this.querySelector("label"),b||f?(g+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",d?g+=" is-invalid":c&&(g+=" label-is-highlighted")):(a&&(this.$.labelAndInputContainer.style.position="relative"),d&&!this.noUnfloatedLabelError&&(g+=" is-invalid")));c&&(g+=" focused");return g}, _computeUnderlineClass:function(a,b){var c="underline";b?c+=" is-invalid":a&&(c+=" is-highlighted");return c}, _computeAddOnContentClass:function(a,b){var c="add-on-content";b?c+=" is-invalid":a&&(c+=" is-highlighted");return c}});var dJa=da(["\n \n\n \n
\n \n
\n"], ["\n \n\n \n
\n \n
\n"]); fI({_template:qG(dJa),is:"paper-input-error",behaviors:[ZIa],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(a){this._setInvalid(a.invalid)}});var eJa=ca(["\n \n\n \n\n \n\n \n\n \n \n \n \n\n \n\n \n\n \n\n \n "]); fI({is:"paper-input",_template:qG(eJa),behaviors:[YIa,tI],properties:{value:{type:String},noUnfloatedLabelError:{type:Boolean,value:!1},inputRole:{type:String,value:void 0},inputAriaHaspopup:{type:String,value:void 0}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input"));this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&( this.alwaysFloatLabel=!0);this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});var fJa=ca(["\n \n\n \n \n
\n \n \n \n \n \n \n
\n \n
\n"]), gJa=eI(HTMLElement); fI({_template:qG(fJa),is:"paper-dropdown-menu",behaviors:[sI,nI,tI,qI],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean, value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom:function(a){var b=AG(this);b.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:a});b.shadowRoot.appendChild(a);return gJa.prototype._attachDom.call(this,a)}, focus:function(){this.$.input._focusableElement.focus()}, attached:function(){var a=this.contentElement;a&&a.selectedItem&&this._setSelectedItem(a.selectedItem)}, get contentElement(){for(var a=RH(this.$.content).getDistributedNodes(),b=0,c=a.length;b\n \n\n \n "], ["\n \n\n \n "]); fI({is:"paper-icon-button",_template:qG(hJa),hostAttributes:{role:"button",tabindex:"0"},behaviors:[BIa],properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(a,b){var c=this.getAttribute("aria-label");c&&b!=c||this.setAttribute("aria-label",a)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var iJa=ca(["\n \n\n \n\n \n\n \n\n \n\n \n\n \n"]); fI({_template:qG(iJa),is:"paper-textarea",behaviors:[YIa,tI],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0},noUnfloatedLabelError:{type:Boolean,value:!1}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(a){this.$.input.textarea.selectionStart=a},get selectionEnd(){return this.$.input.textarea.selectionEnd}, set selectionEnd(a){this.$.input.textarea.selectionEnd=a},_ariaLabelledByChanged:function(a){this._focusableElement.setAttribute("aria-labelledby",a)}, _ariaDescribedByChanged:function(a){this._focusableElement.setAttribute("aria-describedby",a)}, get _focusableElement(){return this.inputElement.textarea}});var jJa={hostAttributes:{role:"option",tabindex:"0"}},kJa=[sI,nI,jJa];var lJa=document.createElement("template");lJa.setAttribute("style","display: none;");lJa.innerHTML="\n \n"; document.head.appendChild(lJa.content);var mJa=ca(["\n \n \n\n
\n \n
\n \n"]); fI({_template:qG(mJa),is:"paper-icon-item",behaviors:[kJa]});Polymer.PaperItemBehavior=kJa;Polymer.PaperItemBehaviorImpl=jJa;var nJa=ca(["\n \n\n \n"]); fI({_template:qG(nJa),is:"paper-item-body"});var oJa,pJa=function(){if(void 0!==oJa)return oJa;var a=document.createElement("template");a.innerHTML=""; return oJa=a};var qJa=ca(["\n \n \n"]);fI({_template:qG(qJa),is:"paper-item",behaviors:[kJa]});var rJa=ca(["\n \n\n \n"]);fI({_template:qG(rJa),is:"paper-listbox",behaviors:[pIa],hostAttributes:{role:"listbox"}});var sJa=document.createElement("template");sJa.setAttribute("style","display: none;");sJa.innerHTML="\n \n"; document.head.appendChild(sJa.content);var tJa=ca(["\n \n \n\n \n"]);fI({_template:qG(tJa),is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});Polymer.PaperMenuButton=JI;var uJa=ca(["\n \n\n
\n
\n
\n
\n"]); fI({_template:qG(uJa),is:"paper-progress",behaviors:[tIa],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max, indeterminate)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(a){this.toggleClass("indeterminate",a,this.$.primaryProgress)}, _transformProgress:function(a,b){a.style.transform=a.style.webkitTransform="scaleX("+b/100+")"}, _mainRatioChanged:function(a){this._transformProgress(this.$.primaryProgress,a)}, _progressChanged:function(a,b,c,d,f){a=this._clampValue(a);b=this._clampValue(b);var g=100*this._calcRatio(a),l=100*this._calcRatio(b);this._setSecondaryRatio(g);this._transformProgress(this.$.secondaryProgress,g);this._transformProgress(this.$.primaryProgress,l);this.secondaryProgress=a;f?this.removeAttribute("aria-valuenow"):this.setAttribute("aria-valuenow",b);this.setAttribute("aria-valuemin",c);this.setAttribute("aria-valuemax",d)}, _disabledChanged:function(a){this.setAttribute("aria-disabled",a?"true":"false")}, _hideSecondaryProgress:function(a){return 0===a}});var vJa=da(["\n \n\n
\n
\n
\n
\n\n
\n "], ["\n \n\n
\n
\n
\n
\n\n
\n "]); fI({is:"paper-radio-button",_template:qG(vJa),behaviors:[CIa],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer}, attached:function(){YH(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var a=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),b=Math.floor(3*a);b%2!==a%2&&b++;this.updateStyles({"--paper-radio-button-ink-size":b+"px"})}})}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var wJa=ca(["\n \n\n \n"]); fI({_template:qG(wJa),is:"paper-radio-group",behaviors:[rIa],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(a){var b=this._valueToItem(a);if(!b||!b.hasAttribute("disabled")){if(this.selected){b=this._valueToItem(this.selected);if(this.selected==a)if(this.allowEmptySelection)a="";else{b&&(b.checked= !0);return}b&&(b.checked=!1)}CI.select.apply(this,[a]);this.fire("paper-radio-group-changed")}}, _activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)}, _onUpKey:function(a){this._focusPrevious();a.preventDefault();this._activateFocusedItem()}, _onDownKey:function(a){this._focusNext();a.preventDefault();this._activateFocusedItem()}, _onLeftKey:function(a){qIa._onLeftKey.apply(this,arguments);this._activateFocusedItem()}, _onRightKey:function(a){qIa._onRightKey.apply(this,arguments);this._activateFocusedItem()}});var xJa=ca(["\n \n\n
\n
\n \n \n
\n\n \n\n
\n
\n
\n
\n\n \n"]); fI({_template:qG(xJa),is:"paper-slider",behaviors:[mI,tI,BIa,tIa],properties:{value:{type:Number,value:0},snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},ignoreBarTouch:{type:Boolean,value:!1},dragging:{type:Boolean, value:!1,readOnly:!0,notify:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:function(){return[]}}}, observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{left:"_leftKey",right:"_rightKey","down pagedown home":"_decrementKey","up pageup end":"_incrementKey"},ready:function(){this.ignoreBarTouch&&zH(this.$.sliderBar,"auto")}, increment:function(){this.value=this._clampValue(this.value+this.step)}, decrement:function(){this.value=this._clampValue(this.value-this.step)}, _updateKnob:function(a,b,c){this.setAttribute("aria-valuemin",b);this.setAttribute("aria-valuemax",c);this.setAttribute("aria-valuenow",a);this._positionKnob(100*this._calcRatio(a))}, _valueChanged:function(){this.fire("value-change",{composed:!0})}, _immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change",{composed:!0}):this.value=this.immediateValue}, _secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)}, _expandKnob:function(){this._setExpand(!0)}, _resetKnob:function(){this.cancelDebouncer("expandKnob");this._setExpand(!1)}, _positionKnob:function(a){this._setImmediateValue(this._calcStep(this._calcKnobPosition(a)));this._setRatio(100*this._calcRatio(this.immediateValue));this.$.sliderKnob.style.left=this.ratio+"%";this.dragging&&(this._knobstartx=this.ratio*this._w/100,this.translate3d(0,0,0,this.$.sliderKnob))}, _calcKnobPosition:function(a){return(this.max-this.min)*a/100+this.min}, _onTrack:function(a){a.stopPropagation();switch(a.detail.state){case"start":this._trackStart(a);break;case"track":this._trackX(a);break;case"end":this._trackEnd();}}, _trackStart:function(){this._setTransiting(!1);this._w=this.$.sliderBar.offsetWidth;this._knobstartx=this._startx=this._x=this.ratio*this._w/100;this._minx=-this._startx;this._maxx=this._w-this._startx;this.$.sliderKnob.classList.add("dragging");this._setDragging(!0)}, _trackX:function(a){this.dragging||this._trackStart(a);this._x=this._startx+Math.min(this._maxx,Math.max(this._minx,a.detail.dx*(this._isRTL?-1:1)));a=this._calcStep(this._calcKnobPosition(this._x/this._w*100));this._setImmediateValue(a);a=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(a+"px",0,0,this.$.sliderKnob)}, _trackEnd:function(){var a=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging");this._setDragging(!1);this._resetKnob();this.value=this.immediateValue;a.transform=a.webkitTransform="";this.fire("change",{composed:!0})}, _knobdown:function(a){this._expandKnob();a.preventDefault();this.focus()}, _bartrack:function(a){this._allowBarEvent(a)&&this._onTrack(a)}, _barclick:function(a){this._w=this.$.sliderBar.offsetWidth;var b=this.$.sliderBar.getBoundingClientRect();b=(a.detail.x-b.left)/this._w*100;this._isRTL&&(b=100-b);var c=this.ratio;this._setTransiting(!0);this._positionKnob(b);c===this.ratio&&this._setTransiting(!1);this.async(function(){this.fire("change",{composed:!0})}); a.preventDefault();this.focus()}, _bardown:function(a){this._allowBarEvent(a)&&(this.debounce("expandKnob",this._expandKnob,60),this._barclick(a))}, _knobTransitionEnd:function(a){a.target===this.$.sliderKnob&&this._setTransiting(!1)}, _updateMarkers:function(a,b,c,d){d||this._setMarkers([]);b=Math.round((c-b)/this.step);b>a&&(b=a);if(0>b||!isFinite(b))b=0;this._setMarkers(Array(b))}, _mergeClasses:function(a){return Object.keys(a).filter(function(b){return a[b]}).join(" ")}, _getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})}, _allowBarEvent:function(a){return!this.ignoreBarTouch||a.detail.sourceEvent instanceof MouseEvent}, get _isRTL(){void 0===this.__isRTL&&(this.__isRTL="rtl"===window.getComputedStyle(this).direction);return this.__isRTL},_leftKey:function(a){this._isRTL?this._incrementKey(a):this._decrementKey(a)}, _rightKey:function(a){this._isRTL?this._decrementKey(a):this._incrementKey(a)}, _incrementKey:function(a){this.disabled||("end"===a.detail.key?this.value=this.max:this.increment(),this.fire("change"),a.preventDefault())}, _decrementKey:function(a){this.disabled||("home"===a.detail.key?this.value=this.min:this.decrement(),this.fire("change"),a.preventDefault())}, _changeValue:function(a){this.value=a.target.value;this.fire("change",{composed:!0})}, _inputKeyDown:function(a){a.stopPropagation()}, _createRipple:function(){this._rippleContainer=this.$.sliderKnob;return AIa._createRipple.call(this)}, _focusedChanged:function(a){a&&this.ensureRipple();this.hasRipple()&&(this._ripple.style.display=a?"":"none",this._ripple.holdDown=a)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var yJa={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(a,b){return[a||b?"active":"",b?"cooldown":""].join(" ")}, __activeChanged:function(a,b){this.__setAriaHidden(!a);this.__coolingDown=!a&&b}, __altChanged:function(a){"loading"===a?this.alt=this.getAttribute("aria-label")||a:(this.__setAriaHidden(""===a),this.setAttribute("aria-label",a))}, __setAriaHidden:function(a){a?this.setAttribute("aria-hidden","true"):this.removeAttribute("aria-hidden")}, __reset:function(){this.__coolingDown=this.active=!1}};var zJa=document.createElement("template");zJa.setAttribute("style","display: none;");zJa.innerHTML="\n \n"; document.head.appendChild(zJa.content);var AJa=ca(["\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "]); fI({_template:qG(AJa),is:"paper-spinner-lite",behaviors:[yJa],registered:function(){this._template.setAttribute("strip-whitespace","")}});var BJa=ca(["\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "]); fI({_template:qG(BJa),is:"paper-spinner",behaviors:[yJa],registered:function(){this._template.setAttribute("strip-whitespace","")}});var CJa=ca(["\n \n\n
\n \n
\n"]); fI({_template:qG(CJa),is:"paper-tab",behaviors:[nI,sI,HI],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()}, get _parentNoink(){var a=RH(this).parentNode;return!!a&&!!a.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink}, _onTap:function(a){if(this.link){var b=this.queryEffectiveChildren("a");b&&a.target!==b&&b.click()}}});var DJa=ca(["\n\n\n\n\n"]),EJa=qG(DJa);document.head.appendChild(EJa.content);var FJa=da(["\n \n\n \n\n
\n
\n
\n \n
\n
\n\n \n"], ["\n \n\n \n\n
\n
\n
\n \n
\n
\n\n \n"]); fI({_template:qG(FJa),is:"paper-tabs",behaviors:[iI,rIa],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},altNext:{type:String, value:""},altPrevious:{type:String,value:""},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null;this._pendingActivationTimeout= this._pendingActivationItem=void 0;this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this);this.addEventListener("blur",this._onBlurCapture.bind(this),!0)}, ready:function(){this.setScrollDirection("y",this.$.tabsContainer)}, detached:function(){this._cancelPendingActivation()}, _noinkChanged:function(a){RH(this).querySelectorAll("paper-tab").forEach(a?this._setNoinkAttribute:this._removeNoinkAttribute)}, _setNoinkAttribute:function(a){a.setAttribute("noink","")}, _removeNoinkAttribute:function(a){a.removeAttribute("noink")}, _computeScrollButtonClass:function(a,b,c){return!b||c?"hidden":a?"not-visible":""}, _computeTabsContentClass:function(a,b){return a?"scrollable"+(b?" fit-container":""):" fit-container"}, _computeSelectionBarClass:function(a,b){return a?"hidden":b?"align-bottom":""}, _onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll();this._tabChanged(this.selectedItem)},10)}, _makeString:function(a){return""+a}, _onIronSelect:function(a){this._tabChanged(a.detail.item,this._previousTab);this._previousTab=a.detail.item;this.cancelDebouncer("tab-changed")}, _onIronDeselect:function(){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab);this._previousTab=null},1)}, _activateHandler:function(){this._cancelPendingActivation();DI._activateHandler.apply(this,arguments)}, _scheduleActivation:function(a,b){this._pendingActivationItem=a;this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,b)}, _delayedActivationHandler:function(){var a=this._pendingActivationItem;this._pendingActivationTimeout=this._pendingActivationItem=void 0;a.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})}, _cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationTimeout=this._pendingActivationItem=void 0)}, _onArrowKeyup:function(){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)}, _onBlurCapture:function(a){a.target===this._pendingActivationItem&&this._cancelPendingActivation()}, get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(a,b){this.scrollable&&this._affectScroll(b&&-b.ddx||0)}, _down:function(){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)}, _affectScroll:function(a){this.$.tabsContainer.scrollLeft+=a;a=this.$.tabsContainer.scrollLeft;this._leftHidden=0===a;this._rightHidden=a===this._tabContainerScrollSize}, _onLeftScrollButtonDown:function(){this._scrollToLeft();this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)}, _onRightScrollButtonDown:function(){this._scrollToRight();this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)}, _onScrollButtonUp:function(){clearInterval(this._holdJob);this._holdJob=null}, _scrollToLeft:function(){this._affectScroll(-this._step)}, _scrollToRight:function(){this._affectScroll(this._step)}, _tabChanged:function(a,b){if(a){var c=this.$.tabsContent.getBoundingClientRect(),d=c.width,f=a.getBoundingClientRect();c=f.left-c.left;this._pos={width:this._calcPercent(f.width,d),left:this._calcPercent(c,d)};if(this.noSlide||null==b)this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(this._pos.width,this._pos.left);else{var g=b.getBoundingClientRect();b=this.items.indexOf(b);a=this.items.indexOf(a);this.$.selectionBar.classList.add("expand"); a=bb?this.$.tabsContainer.scrollLeft+=b:(b+=a-this.$.tabsContainer.offsetWidth,0\n \n\n {{text}}\n \n"]), KI=null; fI({_template:qG(GJa),is:"paper-toast",behaviors:[BI],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3E3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0},noIronAnnounce:{type:Boolean,value:!1}},listeners:{transitionend:"__onTransitionEnd"},get visible(){gI._warn("`visible` is deprecated, use `opened` instead");return this.opened}, get _canAutoClose(){return 0\n \n\n
\n
\n
\n
\n\n
\n "]); fI({is:"paper-toggle-button",_template:qG(HJa),behaviors:[CIa],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},__calculateIsRtl:function(){return"rtl"===window.getComputedStyle(this).direction}, attached:function(){this.__calculateIsRtl()&&this.setAttribute("dir","rtl");YH(this,function(){zH(this,"pan-y")})}, _ontrack:function(a){a=a.detail;"start"===a.state?this._trackStart(a):"track"===a.state?this._trackMove(a):"end"===a.state&&this._trackEnd(a)}, _trackStart:function(){this._isRtl=this.__calculateIsRtl();this._width=this.$.toggleBar.offsetWidth/2;this._trackChecked=this.checked;this.$.toggleButton.classList.add("dragging")}, _trackMove:function(a){a=a.dx;this._x=this._isRtl?Math.max(-this._width,Math.min(0,this._trackChecked?-this._width+a:a)):Math.min(this._width,Math.max(0,this._trackChecked?this._width+a:a));this.translate3d(this._x+"px",0,0,this.$.toggleButton);this._isRtl?this._userActivate(this._x<-this._width/2):this._userActivate(this._x>this._width/2)}, _trackEnd:function(){this.$.toggleButton.classList.remove("dragging");this.transform("",this.$.toggleButton)}, _createRipple:function(){this._rippleContainer=this.$.toggleButton;var a=HI._createRipple();a.id="ink";a.setAttribute("recenters","");a.classList.add("circle","toggle-ink");return a}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var IJa=ca(["\n \n\n
\n \n
\n"]); fI({_template:qG(IJa),is:"paper-tooltip",hostAttributes:{role:"tooltip",tabindex:-1},properties:{for:{type:String,observer:"_findTarget"},manualMode:{type:Boolean,value:!1,observer:"_manualModeChanged"},position:{type:String,value:"bottom"},fitToVisibleBounds:{type:Boolean,value:!1},offset:{type:Number,value:14},marginTop:{type:Number,value:14},animationDelay:{type:Number,value:500,observer:"_delayChange"},animationEntry:{type:String,value:""},animationExit:{type:String,value:""},animationConfig:{type:Object, value:function(){return{entry:[{name:"fade-in-animation",node:this,timing:{delay:0}}],exit:[{name:"fade-out-animation",node:this}]}}}, _showing:{type:Boolean,value:!1}},listeners:{webkitAnimationEnd:"_onAnimationEnd"},get target(){var a=RH(this).parentNode,b=RH(this).getOwnerRoot();return this.for?RH(b).querySelector("#"+this.for):a.nodeType==Node.DOCUMENT_FRAGMENT_NODE?b.host:a},attached:function(){this._findTarget()}, detached:function(){this.manualMode||this._removeListeners()}, playAnimation:function(a){"entry"===a?this.show():"exit"===a&&this.hide()}, cancelAnimation:function(){this.$.tooltip.classList.add("cancel-animation")}, show:function(){if(!this._showing){if(""===RH(this).textContent.trim()){for(var a=!0,b=RH(this).getEffectiveChildNodes(),c=0;cwindow.innerWidth?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,n)+"px",this.style.right="auto"),b.top+r+d.height>window.innerHeight?(this.style.bottom=b.height+"px",this.style.top="auto"):(this.style.top=Math.max(-b.top,r)+"px",this.style.bottom="auto")):(this.style.left=n+"px",this.style.top=r+"px")}}, _addListeners:function(){this._target&&(this.listen(this._target,"mouseenter","show"),this.listen(this._target,"focus","show"),this.listen(this._target,"mouseleave","hide"),this.listen(this._target,"blur","hide"),this.listen(this._target,"tap","hide"));this.listen(this.$.tooltip,"animationend","_onAnimationEnd");this.listen(this,"mouseenter","hide")}, _findTarget:function(){this.manualMode||this._removeListeners();this._target=this.target;this.manualMode||this._addListeners()}, _delayChange:function(a){500!==a&&this.updateStyles({"--paper-tooltip-delay-in":a+"ms"})}, _manualModeChanged:function(){this.manualMode?this._removeListeners():this._addListeners()}, _cancelAnimation:function(){this.$.tooltip.classList.remove(this._getAnimationType("entry"));this.$.tooltip.classList.remove(this._getAnimationType("exit"));this.$.tooltip.classList.remove("cancel-animation");this.$.tooltip.classList.add("hidden")}, _onAnimationFinish:function(){this._showing&&(this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add(this._getAnimationType("exit")))}, _onAnimationEnd:function(){this._animationPlaying=!1;this._showing||(this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.add("hidden"))}, _getAnimationType:function(a){if("entry"===a&&""!==this.animationEntry)return this.animationEntry;if("exit"===a&&""!==this.animationExit)return this.animationExit;if(this.animationConfig[a]&&"string"===typeof this.animationConfig[a][0].name){if(this.animationConfig[a][0].timing&&this.animationConfig[a][0].timing.delay&&0!==this.animationConfig[a][0].timing.delay){var b=this.animationConfig[a][0].timing.delay;"entry"===a?this.updateStyles({"--paper-tooltip-delay-in":b+"ms"}):"exit"===a&&this.updateStyles({"--paper-tooltip-delay-out":b+ "ms"})}return this.animationConfig[a][0].name}}, _removeListeners:function(){this._target&&(this.unlisten(this._target,"mouseenter","show"),this.unlisten(this._target,"focus","show"),this.unlisten(this._target,"mouseleave","hide"),this.unlisten(this._target,"blur","hide"),this.unlisten(this._target,"tap","hide"));this.unlisten(this.$.tooltip,"animationend","_onAnimationEnd");this.unlisten(this,"mouseenter","hide")}});/* Math.uuid.js (v1.4) http://www.broofa.com mailto:robert@broofa.com Copyright (c) 2010 Robert Kieffer Dual licensed under the MIT and GPL licenses. */ var JJa="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),LI=function(){for(var a=Array(36),b=0,c,d=0;36>d;d++)8==d||13==d||18==d||23==d?a[d]="-":14==d?a[d]="4":(2>=b&&(b=33554432+16777216*Math.random()|0),c=b&15,b>>=4,a[d]=JJa[19==d?c&3|8:c]);return a.join("")};/* The MIT License (MIT) Copyright (c) 2015-present Dan Abramov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var MI=function(){return function(a){function b(d){if(c[d])return c[d].exports;var f=c[d]={exports:{},id:d,loaded:!1};return a[d].call(f.exports,f,f.exports,b),f.loaded=!0,f.exports} var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(n){return n&&n.__esModule?n:{"default":n}} b.__esModule=!0;b.compose=b.applyMiddleware=b.bindActionCreators=b.combineReducers=b.createStore=void 0;a=c(2);a=d(a);var f=c(7);f=d(f);var g=c(6);g=d(g);var l=c(5);l=d(l);var m=c(1);m=d(m);c=c(3);d(c);b.createStore=a["default"];b.combineReducers=f["default"];b.bindActionCreators=g["default"];b.applyMiddleware=l["default"];b.compose=m["default"]}, function(a,b){b.__esModule=!0;b["default"]=function(){for(var c=arguments.length,d=Array(c),f=0;c>f;f++)d[f]=arguments[f];if(0===d.length)return function(g){return g}; c=function(){var g=d[d.length-1],l=d.slice(0,-1);return{v:function(){return l.reduceRight(function(m,n){return n(m)},g.apply(void 0,arguments))}}}(); return"object"==typeof c?c.v:void 0}}, function(a,b,c){function d(m,n,r){function u(Ia){if("function"!=typeof Ia)throw Error("Expected listener to be a function.");var yb=!0;la===T&&(la=T.slice());return la.push(Ia),function(){if(yb){yb=!1;la===T&&(la=T.slice());var ma=la.indexOf(Ia);la.splice(ma,1)}}} function z(Ia){if(!(0,f["default"])(Ia))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===Ia.type)throw Error("Actions may not have an undefined \"type\" property. Have you misspelled a constant?");if(qa)throw Error("Reducers may not dispatch actions.");try{qa=!0,E=J(E,Ia)}finally{qa=!1}for(var yb=T=la,ma=0;yb.length>ma;ma++)yb[ma]();return Ia} var C;if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(d)(m,n)}if("function"!=typeof m)throw Error("Expected the reducer to be a function.");var J=m,E=n,T=[],la=T,qa=!1;return z({type:l.INIT}),C={dispatch:z,subscribe:u,getState:function(){return E}, replaceReducer:function(Ia){if("function"!=typeof Ia)throw Error("Expected the nextReducer to be a function.");J=Ia;z({type:l.INIT})}},C[g["default"]]=function(){var Ia; return Ia={subscribe:function(yb){function ma(){yb.next&&yb.next(E)} if("object"!=typeof yb)throw new TypeError("Expected the observer to be an object.");ma();return{unsubscribe:u(ma)}}},Ia[g["default"]]=function(){return this},Ia},C} b.__esModule=!0;b.ActionTypes=void 0;b["default"]=d;var f=(a=c(4))&&a.__esModule?a:{"default":a},g=(c=c(11))&&c.__esModule?c:{"default":c},l=b.ActionTypes={INIT:"@@redux/INIT"}}, function(a,b){b.__esModule=!0;b["default"]=function(c){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(c);try{throw Error(c)}catch(d){}}}, function(a,b,c){var d=c(8),f=c(9),g=c(10);b=Object.prototype;var l=Function.prototype.toString,m=b.hasOwnProperty,n=l.call(Object),r=b.toString;a.exports=function(u){if(!g(u)||"[object Object]"!=r.call(u)||f(u))return!1;u=d(u);if(null===u)return!0;u=m.call(u,"constructor")&&u.constructor;return"function"==typeof u&&u instanceof u&&l.call(u)==n}}, function(a,b,c){b.__esModule=!0;var d=Object.assign||function(g){for(var l=1;arguments.length>l;l++){var m=arguments[l],n;for(n in m)Object.prototype.hasOwnProperty.call(m,n)&&(g[n]=m[n])}return g}; b["default"]=function(){for(var g=arguments.length,l=Array(g),m=0;g>m;m++)l[m]=arguments[m];return function(n){return function(r,u,z){r=n(r,u,z);var C=r.dispatch;u=[];var J={getState:r.getState,dispatch:function(E){return C(E)}}; return u=l.map(function(E){return E(J)}),C=f["default"].apply(void 0,u)(r.dispatch),d({},r,{dispatch:C})}}}; var f=function(g){return g&&g.__esModule?g:{"default":g}}(c(1))}, function(a,b){function c(d,f){return function(){return f(d.apply(void 0,arguments))}} b.__esModule=!0;b["default"]=function(d,f){if("function"==typeof d)return c(d,f);if("object"!=typeof d||null===d)throw Error("bindActionCreators expected an object or a function, instead received "+(null===d?"null":typeof d)+". Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");for(var g=Object.keys(d),l={},m=0;g.length>m;m++){var n=g[m],r=d[n];"function"==typeof r&&(l[n]=c(r,f))}return l}}, function(a,b,c){function d(g){Object.keys(g).forEach(function(l){var m=g[l];if(void 0===m(void 0,{type:f.ActionTypes.INIT}))throw Error("Reducer \""+l+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.");var n="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if(void 0===m(void 0,{type:n}))throw Error("Reducer \""+l+"\" returned undefined when probed with a random type. Don't try to handle "+( f.ActionTypes.INIT+" or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined."))})} b.__esModule=!0;b["default"]=function(g){for(var l=Object.keys(g),m={},n=0;l.length>n;n++){var r=l[n];"function"==typeof g[r]&&(m[r]=g[r])}var u=Object.keys(m);try{d(m)}catch(C){var z=C}return function(){var C=0la;la++){var qa=u[la],Ia=C[qa],yb=(0,m[qa])(Ia,J);if(void 0===yb)throw C=J&&J.type,Error("Given action "+(C&&"\""+C+"\""||"an action")+", reducer \""+qa+"\" returned undefined. To ignore an action, you must explicitly return the previous state."); T[qa]=yb;E=E||yb!==Ia}return E?T:C}}; var f=c(2);c(4);c(3)}, function(a){var b=Object.getPrototypeOf;a.exports=function(c){return b(Object(c))}}, function(a){a.exports=function(b){var c=!1;if(null!=b&&"function"!=typeof b.toString)try{c=!!(b+"")}catch(d){}return c}}, function(a){a.exports=function(b){return!!b&&"object"==typeof b}}, function(a,b,c){(function(d){a.exports=c(12)(d||window||this)}).call(b,function(){return this}())}, function(a){a.exports=function(b){var c;b=b.Symbol;return"function"==typeof b?b.observable?c=b.observable:(c="function"==typeof b["for"]?b["for"]("observable"):b("observable"),b.observable=c):c="@@observable",c}}])}; "object"==typeof exports&&"object"==typeof module?module.exports=MI():"function"==typeof define&&define.amd?define([],MI):"object"==typeof exports?exports.Redux=MI():this.Redux=MI();!0;var NI=function(a){this.name_=a;this.files_=[];this.directories_=[];this.directoryMap_={}}; NI.prototype.getDirectory=function(a){return this.directoryMap_[a]}; NI.prototype.getName=function(){return this.name_};var PI=function(a,b){this.callback_=b;this.hasError_=!1;this.unscannedDirectories_=[];this.maxConcurrentScans_=5;this.fileOps_=this.directoryOps_=0;this.rootDirectory_=new NI("");KJa(this,a,this.rootDirectory_);OI(this)},KJa=function(a,b,c){for(var d=0;da.maxAttempts_)return!1;0==c?b():a.delayCallId_=Xi(function(){a.delayCallId_=null;b()},UJa(a),a); a.attempt_=c;return!0}; TJa.prototype.reset=function(){this.delayCallId_&&Yi(this.delayCallId_);this.attempt_=-1}; var UJa=function(a){var b=a.initialDelay_*Math.pow(a.backoffMultiplier_,a.attempt_);0<=a.maxDelayMs_&&(b=Math.min(b,a.maxDelayMs_));return b};var WJa=["Content-Length","Content-Type","Content-Encoding","Transfer-Encoding"];function XI(a,b){for(var c in a)if(c.toLowerCase()===b.toLowerCase())return a[c]} function XJa(a,b){for(var c in a)if(c.toLowerCase()===b.toLowerCase()){delete a[c];break}} function YJa(a){a=y.clone(a);for(var b=0;b=a?$I(this,"Server returned invalid headers."):( this.chunkSize_=Math.floor(this.maxChunkSize_/a)*a,this.transferHandle_=new QJa(c,a),this.dispatchEvent(new UI("o")),this.state_="Upload",this.retryIterator_.reset(),ZI(this))}else ZI(this)}; e.upload_=function(){var a=this.transferHandle_.getUploadUrl(),b=this.blob_.size;if(bCa()){var c=this.chunkSize_;var d=this.offset_+c>=b;b=oE(this.blob_,this.offset_,d?b:this.offset_+c)}else this.offset_=0,b=this.blob_,d=!0;this.request_=new WI;this.request_.withCredentials_=this.withCredentials_;this.eventHandler_.removeAll();this.eventHandler_.listen(this.request_,"progress",this.onUploadProgress_);c=Ta(this.onUploadComplete_,this,this.offset_+b.size,d);this.eventHandler_.listen(this.request_,"complete", c);this.lastCommand_="upload";this.lastCommandResponseCode_=null;this.dispatchEvent(new VI("p"));d=Object.assign({},this.headers_||{},{"X-Goog-Upload-Command":"upload"+(d?", finalize":""),"X-Goog-Upload-Offset":this.offset_});this.request_.send(a,"POST",b,d)}; e.onUploadProgress_=function(a){this.bytesTransferred_=this.offset_+a.loaded;this.dispatchEvent(new UI("j"))}; e.onUploadComplete_=function(a,b,c){var d=this,f,g;return za(function(l){switch(l.nextAddress){case 1:f=c.target;d.lastCommandResponseCode_=f.getStatus();d.dispatchEvent(new VI("q"));if(d.retryOnHttpClientErrorEnabled_?dKa(f)||404==f.getStatus():aKa(f))return d.bytesTransferred_=a,bKa(d,f),l.return();if(cKa(f)){l.jumpTo(2);break}if(!(g=d.detectCorruptedBlobEnabled_)){l.jumpTo(3);break}return q(l,eKa(d),4);case 4:g=l.yieldResult;case 3:if(g)return $I(d,"Blob has been modified or corrupted."),l.return(); d.requireUploadRequestModification_=400==f.getStatus();d.state_="Query";ZI(d);return l.return();case 2:if(b)return $I(d,"Got a non-final success response after issuing a finalize command."),l.return();d.bytesTransferred_=a;d.offset_=a;d.retryIterator_.reset();ZI(d);return l.return();}})}; e.onQueryComplete_=function(a){var b=a.target;this.lastCommandResponseCode_=b.getStatus();this.dispatchEvent(new VI("q"));aKa(b)?(200===b.getStatus()&&(this.bytesTransferred_=this.blob_.size),bKa(this,b)):cKa(b)?(a=qE(a.target.getAllResponseHeaders()),a=parseInt(XI(a,"X-Goog-Upload-Size-Received"),10),isNaN(a)?$I(this,"Server did not respond with current offset."):aa},eKa=function(a){var b; return za(function(c){if(1==c.nextAddress){if(!a.blob_||0>=a.originalBlobSize_)return c.return(!1);if(a.blob_.size!==a.originalBlobSize_)return c.return(!0);sa(c,2);if(b=oE(a.blob_,0,1)){var d=new xF,f=yF(d);d.readAsBinaryString(b);c=q(c,f,4)}else c=c.return(!0);return c}if(2!=c.nextAddress)return c.return(a.blob_.size!==a.originalBlobSize_);ua(c);return c.return(!0)})};var aJ=function(a,b,c,d,f,g){yi.call(this);this.payload_=d;this.url_=a;this.method_=b;this.headers_=c;this.metadata_=f;this.metadataOverhead_=0;this.encoding_=g||"binary";a=new RA;this.boundary_="scotty-"+Hc()+"-"+a.toIsoString();this.transferRequest_=null;this.bytesTransferred_=0;this.responseText_=this.responseHeaders_=this.responseCode_=null;this.state_="Ready";this.errorDescription_=null;this.eventHandler_=new Kq(this);Tg(this,this.eventHandler_)}; p(aJ,TI);e=aJ.prototype; e.run=function(){var a=y.clone(this.headers_);null!=this.payload_.length&&(a["Content-Length"]=this.payload_.length);a=YJa(a);a["X-Goog-Upload-Protocol"]="multipart";a["Content-Type"]="multipart/related; boundary="+this.boundary_;this.state_="Transferring";this.transferRequest_=new WI;this.eventHandler_.removeAll();this.eventHandler_.listen(this.transferRequest_,"progress",this.onTransferProgress_);this.eventHandler_.listen(this.transferRequest_,"complete",this.onTransferComplete_);var b=this.transferRequest_, c=b.send,d=this.url_,f=this.method_,g="--"+this.boundary_+"\r\nContent-Disposition: form-data; name=\"metadata\"\r\n\r\n"+(this.metadata_+"\r\n--")+this.boundary_+"\r\nContent-Disposition: form-data; name=\"Filedata\"\r\nContent-Transfer-Encoding: "+(this.encoding_+"\r\n\r\n")+this.payload_+"\r\n--"+this.boundary_+"--\r\n";this.metadataOverhead_=g.length-this.payload_.length;c.call(b,d,f,g,a)}; e.getBytesTransferred=function(){return this.bytesTransferred_}; e.getIntermediateResponseHeaders=function(){return null}; e.getResponseCode=function(){return this.responseCode_}; e.getResponseHeaders=function(){return this.responseHeaders_}; e.getResponseText=function(){return this.responseText_}; e.getErrorDescription=function(){return this.errorDescription_}; e.getTransferHandle=function(){return null}; e.isCancelSupported=function(){return!0}; e.cancel=function(){"Complete"!=this.state_&&"Error"!=this.state_&&(this.eventHandler_.removeAll(),this.transferRequest_&&this.transferRequest_.abort(),this.state_="Cancel",this.dispatchEvent(new UI("n")))}; e.isPauseSupported=function(){return!1}; e.pause=function(){}; e.unpause=function(){}; e.getLastSentCommand=function(){return null}; e.getLastCommandResponseCode=function(){return null}; e.onTransferProgress_=function(a){this.bytesTransferred_=Math.max(0,a.loaded-this.metadataOverhead_);this.dispatchEvent(new UI("j"))}; e.onTransferComplete_=function(a){var b=a.target.getStatus();void 0===b||-1===b?(this.errorDescription_="Connection broken before response was received.",this.state_="Error",this.dispatchEvent(new UI("m"))):(this.responseCode_=b,a=a.target,b=qE(a.getAllResponseHeaders()),this.responseHeaders_=ZJa(b),this.responseText_=a.getResponseText(),this.state_="Complete",this.dispatchEvent(new UI("k")))}; e.createXhrRequest=function(){return new WI};var bJ=function(){},fKa=function(a,b,c){var d=void 0===d?!1:d; if(c instanceof RI)return new SJa(a,"POST",b,c.getInputElement(),"");if("string"===typeof c||c instanceof String)return new aJ(a,"POST",b,c,"");var f=new YI(void 0);f.url_=a;f.method_="POST";f.headers_=b;f.blob_=c;f.originalBlobSize_=c.size;f.metadata_="";d&&(f.withCredentials_=d);f.state_="Start";return f}; bJ.prototype.resumeTransfer=function(a,b,c){c=new YI(c);c.blob_=a;c.originalBlobSize_=a.size;c.transferHandle_=b;a=b.chunkGranularity_;c.chunkSize_=Math.floor(c.maxChunkSize_/a)*a;c.state_="Query";return c}; bJ.prototype.newTransferFromBase64String=function(a,b,c,d,f){return new aJ(a,b,c,d,f,"base64")}; bJ.prototype.isFileOrBlob_=function(a){return a instanceof Blob||"[object File]"===a.toString()||"[object Blob]"===a.toString()};var cJ=function(a,b,c){a.timeOfStartCall=new Date().getTime();var d=c||t,f=d.document,g=a.nonce||Ha(d);g&&!a.nonce&&(a.nonce=g);if("help"==a.flow){var l=Ja("document.location.href",d);!a.helpCenterContext&&l&&(a.helpCenterContext=l.substring(0,1200));l=!0;if(b&&JSON&&JSON.stringify){var m=JSON.stringify(b);(l=1200>=m.length)&&(a.psdJson=m)}l||(b={invalidPsd:!0})}b=[a,b,c];d.GOOGLE_FEEDBACK_START_ARGUMENTS=b;c=a.serverUri||"//www.google.com/tools/feedback";if(l=d.GOOGLE_FEEDBACK_START)l.apply(d,b);else {d=c+"/load.js?";for(var n in a)b=a[n],null==b||Pa(b)||(d+=encodeURIComponent(n)+"="+encodeURIComponent(b)+"&");a=ag(f).createElement("SCRIPT");g&&a.setAttribute("nonce",g);xc(a,mh(d));f.body.appendChild(a)}}; Fa("userfeedback.api.startFeedback",cJ,void 0);var dJ=function(a){G(this,a,0,-1,gKa,null)}; v(dJ,F);var eJ=function(a){G(this,a,0,-1,null,null)}; v(eJ,F);var gKa=[1];dJ.prototype.toObject=function(a){var b={linkStateList:hf(Lf(this,eJ,1),hKa,a)};a&&(b.$jspbMessageInstance=this);return b}; dJ.prototype.serializeBinary=function(){var a=new B;var b=Lf(this,eJ,1);0f&&(b=a.substring(f,d),b=b.replace(sKa,""),b=b.replace(tKa,""),b=b.replace("debug-",""),b=b.replace("tracing-",""))}return b} ;var lJ=function(){this.loading=!1;this.vm_=null}; lJ.prototype.initialize=function(a,b,c,d,f,g){var l=this;g=void 0===g?!1:g;b?(this.loading=!0,kJ(b,function(){l.loading=!1;var m=0<=b.indexOf("/th/");(m?window.trayride:window.botguard)?wKa(l,c,d,g,m):(m=uKa(b),spf.script.unload(m),vm(new Pl("Unable to load Botguard","from "+b)))})):a&&(f=og("SCRIPT"),f.textContent=a,f.nonce=Ha(),document.head.appendChild(f),document.head.removeChild(f),((a=a.includes("trayride"))?window.trayride:window.botguard)?wKa(this,c,d,g,a):vm(Error("Unable to load Botguard from JS")))}; lJ.prototype.isInitialized=function(){return!!this.vm_}; var wKa=function(a,b,c,d,f){f=f?window.trayride.ad:window.botguard.bg;if(d)try{a.vm_=new f(b,c?function(){return c(b)}:Ka)}catch(g){vm(g)}else{try{a.vm_=new f(b)}catch(g){vm(g)}c&&c(b)}}; lJ.prototype.invoke=function(a){a=void 0===a?{}:a;return this.vm_?this.vm_.hot?this.vm_.hot(void 0,void 0,a):this.vm_.invoke(void 0,void 0,a):null}; var xKa=function(a,b){var c=ek("botguard_async_snapshot_timeout_ms",3E3);b=void 0===b?{}:b;c=void 0===c?3E3:c;return a.vm_?Promise.race([new Promise(function(d,f){setTimeout(function(){setTimeout(function(){setTimeout(function(){f(Error("Timed out waiting for snapshot"))},0)},0)},c)}), new Promise(function(d){return a.vm_.hot?a.vm_.hot(d,!0,b):a.vm_.invoke(d,!0,b)})]):Promise.resolve(null)}; lJ.prototype.dispose=function(){this.vm_=null};function mJ(){return vl("CONSENT","").startsWith("YES+")} ;var yKa=[],zKa=!1;function AKa(){if(!N("disable_ad_status_on_html5_clients")&&(!N("condition_ad_status_fetch_on_consent_cookie_html5_clients")||mJ())&&"1"!=y.getValueByKeys(A("PLAYER_CONFIG",{}),"args","privembed")){var a=function(){zKa=!0;"google_ad_status"in window?qd("DCLKSTAT",1):qd("DCLKSTAT",2)}; try{kJ("//static.doubleclick.net/instream/ad_status.js",a)}catch(b){}yKa.push(yk(Bk,function(){if(!(zKa||"google_ad_status"in window)){try{vKa("//static.doubleclick.net/instream/ad_status.js",a)}catch(b){}zKa=!0;qd("DCLKSTAT",3)}},5E3))}} function BKa(){return parseInt(A("DCLKSTAT",0),10)} ;var CKa=new lJ;function DKa(){return CKa.isInitialized()} function EKa(a){a=void 0===a?{}:a;return CKa.invoke(a)} ;function FKa(){var a=y.clone(GKa),b;return Ti(new Ki(function(c,d){a.onSuccess=function(f){Dha(f)?c(f):d(new nJ("Request failed, status="+ol(f),"net.badstatus",f))}; a.onError=function(f){d(new nJ("Unknown request error","net.unknown",f))}; a.onTimeout=function(f){d(new nJ("Request timed out","net.timeout",f))}; b=ql("//googleads.g.doubleclick.net/pagead/id",a)}),function(c){c instanceof Ui&&b.abort(); return Ni(c)})} var nJ=function(a,b,c){$a.call(this,a+", errorCode="+b);this.errorCode=b;this.xhr=c;this.name="PromiseAjaxError"}; p(nJ,$a);var oJ=function(a){this.wrappedPromise_=void 0===a?null:a;this.state_=0;this.value_=null}; oJ.prototype.then=function(a,b,c){return this.wrappedPromise_?this.wrappedPromise_.then(a,b,c):1===this.state_&&a?(a=a.call(c,this.value_),Ji(a)?a:HKa(a)):2===this.state_&&b?(a=b.call(c,this.value_),Ji(a)?a:IKa(a)):this}; oJ.prototype.getValue=function(){return this.value_}; oJ.prototype.isRejected=function(){return 2==this.state_}; Ii(oJ);var IKa=function(a){var b=new oJ;a=void 0===a?null:a;b.state_=2;b.value_=void 0===a?null:a;return b},HKa=function(a){var b=new oJ; a=void 0===a?null:a;b.state_=1;b.value_=void 0===a?null:a;return b};var JKa=function(a){$a.call(this,a.message||a.description||a.name);this.isMissing=a instanceof pJ;this.isTimeout=a instanceof nJ&&"net.timeout"==a.errorCode;this.isCanceled=a instanceof Ui}; p(JKa,$a);JKa.prototype.name="BiscottiError";var pJ=function(){$a.call(this,"Biscotti ID is missing from server")}; p(pJ,$a);pJ.prototype.name="BiscottiMissingError";var GKa={format:"RAW",method:"GET",timeout:5E3,withCredentials:!0},qJ=null; function tha(){if(N("disable_biscotti_fetch_on_html5_clients"))return Ni(Error("Fetching biscotti ID is disabled."));if(N("condition_biscotti_fetch_on_consent_cookie_html5_clients")&&!mJ())return Ni(Error("User has not consented - not fetching biscotti id."));if("1"===y.getValueByKeys(A("PLAYER_CONFIG",{}),"args","privembed"))return Ni(Error("Biscotti ID is not available in private embed mode"));qJ||(qJ=Ti(FKa().then(KKa),function(a){return LKa(2,a)})); return qJ} function KKa(a){a=a.responseText;if(!Mb(a,")]}'"))throw new pJ;a=JSON.parse(a.substr(4));if(1<(a.type||1))throw new pJ;a=a.id;uha(a);qJ=HKa(a);MKa(18E5,2);return a} function LKa(a,b){b=new JKa(b);uha("");qJ=IKa(b);0a.byteLength||65496!==a.getUint16(0))a=-2;else{for(var b=2,c=a.byteLength;b>8)break;else b+=f+2}a=-1}switch(a){case 8:this.angle_=270; break;case 3:this.angle_=180;break;case 6:this.angle_=90;break;default:this.angle_=0;}null!=this.dataUrl_&&$Ka(this)}; AJ.prototype.readError_=function(){this.reject_()}; var $Ka=function(a){ri(a.image_,ZKa,a.completeTransform_,!1,a);vc(a.image_,Yb(a.dataUrl_)||Zb);"about:invalid#zClosurez"!=a.image_.src&&"data:image/"===a.image_.src.substr(0,11)||a.reject_()}; AJ.prototype.completeTransform_=function(){if("about:invalid#zClosurez"!=this.image_.src){var a=Yb(this.dataUrl_)||Zb,b=this.image_.naturalHeight?this.image_.naturalWidth/this.image_.naturalHeight:null;this.invalidAspectRatio=b>this.maxAspectRatio_||b<1/this.maxAspectRatio_;if("image/gif"!==this.mime_||this.disableAnimation_){var c=this.image_.naturalWidth,d=this.image_.naturalHeight,f=b=0,g=this.image_.naturalHeight?this.image_.naturalWidth/this.image_.naturalHeight:null;g>this.maxAspectRatio_?(c= this.maxAspectRatio_*d,b=(c-this.image_.naturalWidth)/2,this.cropped=!0):g<1/this.maxAspectRatio_?(d=this.maxAspectRatio_*c,f=(d-this.image_.naturalHeight)/2,this.cropped=!0):"image/gif"===this.mime_&&this.disableAnimation_&&(this.cropped=!0);if(90==this.angle_||270==this.angle_)g=c,c=d,d=g,g=b,b=f,f=g;switch(this.angle_){case 90:f-=c;break;case 180:b-=c;f-=d;break;case 270:b-=d;}this.cropped||0!==this.angle_%360?(a=document.createElement("canvas"),a.width=c||1,a.height=d||1,this.image_.naturalWidth&& this.image_.naturalHeight&&(c=a.getContext("2d"),c.rotate(Math.PI/180*this.angle_),c.drawImage(this.image_,b,f,this.image_.naturalWidth,this.image_.naturalHeight)),b=a.toDataURL(this.mime_),this.transformedData=Yb(b)||Zb):this.transformedData=a}else this.transformedData=a;this.resolve_(this)}};var BJ=function(a,b){hi.call(this,a);this.value=b}; p(BJ,hi); var CJ=function(a,b,c,d,f,g,l){l=void 0===l?!1:l;yi.call(this);var m=this;this.url_=a;this.channelId_=b;this.maxFileSizeMb_=c;this.maxAspectRatio_=d;this.dropZoneEl_=f;this.rejectInvalidAspectRatio_=l;this.selectButtonEl_=g;this.reject_=this.resolve_=this.uploadPromise_=null;this.dropZoneOverlay_=new QI(this.dropZoneEl_);this.selectOverlay_=new SI(this.selectButtonEl_);"INPUT"==this.selectButtonEl_.nextSibling.tagName&&this.selectButtonEl_.nextSibling.setAttribute("accept","image/*");this.uploader_=new bJ; this.image_=this.transfer_=null;this.handler_=new Kq(this);Tg(this,this.handler_);this.handler_.listen(this.dropZoneOverlay_,"g",this.onChange_).listen(this.dropZoneEl_,"dragover",this.onHover_).listen(this.dropZoneEl_,"dragleave",this.onHover_).listen(g,"click",function(){m.selectOverlay_.click()}).listen(this.selectOverlay_,"i",this.onChange_)}; p(CJ,yi);CJ.prototype.disposeInternal=function(){for(var a=this.selectButtonEl_.nextSibling;a&&a.parentNode&&"INPUT"==a.tagName;)a.parentNode.removeChild(a),a=this.selectButtonEl_.nextSibling;this.cancel();yi.prototype.disposeInternal.call(this)}; CJ.prototype.hasImage=function(){return null!=this.image_}; CJ.prototype.uploadPromise=function(){if(!this.hasImage())return null;this.uploadPromise_||this.upload_();return this.uploadPromise_}; CJ.prototype.cancel=function(){aLa(this);this.image_=null}; var aLa=function(a){a.transfer_&&a.transfer_.cancel();a.transfer_=null;a.uploadPromise_=null;a.resolve_=null;a.reject_=null}; e=CJ.prototype;e.upload_=function(){var a=this;aLa(this);this.transfer_=fKa(this.url_,{"X-YouTube-ChannelId":this.channelId_},this.image_);this.handler_.listenOnce(this.transfer_,"k",this.onUploadComplete_);this.handler_.listenOnce(this.transfer_,"m",this.onUploadError_);this.transfer_.run();this.uploadPromise_=new Promise(function(b,c){a.resolve_=b;a.reject_=c})}; e.onChange_=function(a){a.files.length&&(this.image_=a.files[0],this.image_.size>1048576*this.maxFileSizeMb_?(this.image_=null,this.dispatchEvent(new BJ("yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT"))):(this.upload_(),new AJ(this.maxAspectRatio_).transform(this.image_).then(Ta(this.onPreview_,this),Ta(this.onPreviewError_,this))))}; e.onPreview_=function(a){if(a.invalidAspectRatio&&(this.rejectInvalidAspectRatio_&&(this.image_=null),this.dispatchEvent(new BJ("yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT")),this.rejectInvalidAspectRatio_))return;a.cropped&&this.dispatchEvent(new BJ("yt.comments.ImageUploadOverlay.CROPPED_EVENT"));this.dispatchEvent(new BJ("yt.comments.ImageUploadOverlay.CHANGE_EVENT",a.transformedData))}; e.onPreviewError_=function(){this.image_=null;this.dispatchEvent(new BJ("yt.comments.ImageUploadOverlay.INVALID_EVENT"))}; e.onHover_=function(a){a.stopPropagation();a.preventDefault();if("dragover"===a.type)a=!0;else if("dragleave"===a.type)a=!1;else return;this.dispatchEvent(new BJ("yt.comments.ImageUploadOverlay.HOVER_EVENT",a))}; e.onUploadComplete_=function(){var a=sj(this.transfer_.getResponseText());this.resolve_(a.encryptedBlobId)}; e.onUploadError_=function(){this.reject_();aLa(this)};var bLa={"consent.google.com":!0,"consent.youtube.com":!0,"consent-daily-0.sandbox.youtube.com":!0,"consent-daily-1.sandbox.youtube.com":!0,"consent-daily-2.sandbox.youtube.com":!0,"consent-daily-3.sandbox.youtube.com":!0,"consent-daily-4.sandbox.youtube.com":!0,"consent-daily-5.sandbox.youtube.com":!0,"consent-daily-6.sandbox.youtube.com":!0,"consent-autopush.sandbox.youtube.com":!0,"daily-0.consent.corp.youtube.com":!0,"daily-1.consent.corp.youtube.com":!0,"daily-2.consent.corp.youtube.com":!0, "daily-3.consent.corp.youtube.com":!0,"daily-4.consent.corp.youtube.com":!0,"daily-5.consent.corp.youtube.com":!0,"daily-6.consent.corp.youtube.com":!0,"autopush.consent.corp.youtube.com":!0,"dev.consent.corp.youtube.com":!0,"consent-daily-0.sandbox.google.com":!0,"consent-daily-1.sandbox.google.com":!0,"consent-daily-2.sandbox.google.com":!0,"consent-daily-3.sandbox.google.com":!0,"consent-daily-4.sandbox.google.com":!0,"consent-daily-5.sandbox.google.com":!0,"consent-daily-6.sandbox.google.com":!0, "consent-autopush.sandbox.google.com":!0,"daily-0.consent.corp.google.com":!0,"daily-1.consent.corp.google.com":!0,"daily-2.consent.corp.google.com":!0,"daily-3.consent.corp.google.com":!0,"daily-4.consent.corp.google.com":!0,"daily-5.consent.corp.google.com":!0,"daily-6.consent.corp.google.com":!0,"autopush.consent.corp.google.com":!0,"dev.consent.corp.google.com":!0};var cLa=window,DJ=cLa.YT_I18N_FORMATTING_GOOG_LOCALE||"en",dLa=cLa.YT_I18N_FORMATTING_DATE_TIME_SYMBOLS||NA;OF=hDa=!0;OF=!1; KF({id:"America/Los_Angeles",names:["PST","PST","PDT","PDT"],std_offset:-480,transitions:[2770,60,7137,0,11506,60,16041,0,20410,60,24777,0,29146,60,33513,0,35194,60,42249,0,45106,60,50985,0,55354,60,59889,0,64090,60,68625,0,72994,60,77361,0,81730,60,86097,0,90466,60,94833,0,99202,60,103569,0,107938,60,112473,0,116674,60,121209,0,125578,60,129945,0,134314,60,138681,0,143050,60,147417,0,151282,60,156153,0,160018,60,165057,0,168754,60,173793,0,177490,60,182529,0,186394,60,191265,0,195130,60,200001,0, 203866,60,208905,0,212602,60,217641,0,221338,60,226377,0,230242,60,235113,0,238978,60,243849,0,247714,60,252585,0,256450,60,261489,0,265186,60,270225,0,273922,60,278961,0,282826,60,287697,0,291562,60,296433,0,300298,60,305337,0,309034,60,314073,0,317770,60,322809,0,326002,60,331713,0,334738,60,340449,0,343474,60,349185,0,352378,60,358089,0,361114,60,366825,0,369850,60,375561,0,378586,60,384297,0,387322,60,393033,0,396058,60,401769,0,404962,60,410673,0,413698,60,419409,0,422434,60,428145,0,431170, 60,436881,0,439906,60,445617,0,448810,60,454521,0,457546,60,463257,0,466282,60,471993,0,475018,60,480729,0,483754,60,489465,0,492490,60,498201,0,501394,60,507105,0,510130,60,515841,0,518866,60,524577,0,527602,60,533313,0,536338,60,542049,0,545242,60,550953,0,553978,60,559689,0,562714,60,568425,0,571450,60,577161,0,580186,60,585897,0,588922,60,594633,0]}); function eLa(a){a=fLa(a,2);return"ru"!==DJ&&"es_419"!==DJ&&"es-419"!==DJ&&"es"!==DJ&&"es_US"!==DJ&&"es-US"!==DJ&&"fr"!==DJ&&"pl"!==DJ&&"it"!==DJ&&"nl"!==DJ&&"uk"!==DJ&&"fr_CA"!==DJ&&"fr-CA"!==DJ||""===a?a:a[0].toLocaleUpperCase()+a.substring(1)} var hLa=gLa(function(){return{dateFormat:3,timeFormat:7,joinerStyle:3,capitalize:function(a){return a}}}); function gLa(a){return function(b){var c=a(),d=fLa(b,c.dateFormat);b=fLa(b,c.timeFormat);var f=c.capitalize,g=dLa.DATETIMEFORMATS[c.joinerStyle];g=g.replace(/'(?!')/g,"");g=g.replace("{0}",b);g=g.replace("{1}",d);return f.call(c,g)}} function iLa(a){return a?"string"===typeof a.seconds&&(void 0===a.nanos||"number"===typeof a.nanos):!1} function jLa(a){return new Date(1E3*Number(a.seconds)+1E-6*(a.nanos||0))} function fLa(a,b){if("function"===typeof a.getTime)a={date:a};else if(iLa(a))a={date:jLa(a)};else if(typeof iLa(a.timestamp)&&"number"===typeof a.i18nInternalSecondsEastOfUtc)a={date:jLa(a.timestamp),timeZone:KF(-a.i18nInternalSecondsEastOfUtc/60)};else throw Error("Ill-formed LocalTime or Timestamp "+JSON.stringify(a));var c=a;a=c.date;c=c.timeZone;b=kLa(b).format(a,c);if("my"===DJ&&b.includes("B")){var d=c?Number(kLa("H").format(a,c)):a.getHours();a=c?Number(kLa("m").format(a,c)):a.getMinutes(); b=12>d?b.replace("B","\u1014\u1036\u1014\u1000\u103A"):12===d&&0===a?b.replace("B","\u1019\u103D\u1014\u103A\u1038\u1010\u100A\u1037\u103A"):16>d?b.replace("B","\u1014\u1031\u1037\u101C\u101A\u103A"):19>d?b.replace("B","\u100A\u1014\u1031"):b.replace("B","\u100A")}return b} var lLa=new Map;function kLa(a){if(lLa.has(a))return lLa.get(a);var b=mLa(a);b=nLa(b);b=new MF(b,dLa);lLa.set(a,b);return b} function mLa(a){return new MF(a,dLa).patternParts_.map(function(b){return 0===b.type?"'"+b.text+"'":b.text}).join("")} function nLa(a){return"en"===DJ||"es_US"===DJ||"es-US"===DJ?a:a.replace(/(?:a\s?)?([hK]+)([:.]mm)(?:\s?a)?/g,function(b,c,d){return"H".repeat(c.length)+d})} ;function EJ(a,b){if(!a.includes("DATE_PLACEHOLDER"))return a;var c=new Date(0);c.setUTCSeconds(b);return a.replace("DATE_PLACEHOLDER",hLa(c))} ;function oLa(a){var b;ik(["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],document)?FJ()==a&&(b=document):b=a;if(b&&(a=ik(["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],b))){a.call(b)instanceof Promise||Promise.resolve();return}Promise.resolve()} function pLa(){var a=document;return kb(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(b){return"on"+b.toLowerCase()in a})} function FJ(){var a=void 0===a?!1:a;var b=ik(["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],document);if(a)for(;b&&b.shadowRoot;)b=b.shadowRoot.fullscreenElement;return b?b:null} ;function qLa(a,b){b=void 0===b?!0:b;a.addEventListener("wheel",rLa);a.overscrollConfig={cooldown:b}} function sLa(a){a.overscrollConfig=void 0;a.removeEventListener("wheel",rLa)} function rLa(a){var b=a.deltaY,c=a.target,d=null;if(window.Polymer&&window.Polymer.Element){if(c=a.path||a.composedPath&&a.composedPath()){c=k(c);for(var f=c.next();!f.done&&(f=f.value,!tLa(f,b));f=c.next())if(f.overscrollConfig){d=f;break}}}else for(;c&&!tLa(c,b);){if(c.overscrollConfig){d=c;break}c=c.parentElement}d&&(b=d.overscrollConfig,b.cooldown?(d=a.deltaY,c=b.lastDeltaY||0,b.lastDeltaY=d,f=b.lastStopped||0,c&&f&&0=Math.abs(d)?(d=f+1200,c=!1):(d=f+600,c=!0):(d=Wa()+600, c=!0),d>Wa()&&(a.preventDefault(),c&&(b.lastStopped=Wa()))):a.preventDefault())} function tLa(a,b){return 0>b&&0=c.version.compare(a.currentVersion_))){var d=c.payload;d=d?JSON.parse(d):void 0;a.invalidationCallback_(b.name,d);c.version&&(a.currentVersion_=c.version)}},function(c){return Um(c)})},function(){},this)}; e.unregister=function(){var a=this;this.initializationPromise_.then(function(){null!=a.subscription_&&(a.subscription_.unsubscribe(),a.subscription_=null)},function(){},this)}; e.waitForInitialized=function(){return this.initializationPromise_};var cNa=function(a){Bl.call(this,1,arguments);this.csn=a}; p(cNa,Bl);var $ha=new Cl("screen-created",cNa),JJ=[],eNa=dNa,fNa=0;function gNa(a,b,c,d,f,g){var l=eNa();g={csn:l,pageVe:new Hn({veType:b,youtubeData:g}).getAsJson()};c&&c.visualElement?g.implicitGesture={parentCsn:c.clientScreenNonce,gesturedVe:c.visualElement.getAsJson()}:c&&vm(new Pl("newScreen() parent element does not have a VE - rootVe",b));d&&(g.cloneCsn=d);b={cttAuthInfo:f,sequenceGroup:l};a?fl("screenCreated",g,a,b):wm("screenCreated",g,b);Fl($ha,new cNa(l));return l} function KJ(a,b,c,d){c={csn:b,parentVe:c.getAsJson(),childVes:fb(d,function(g){return g.getAsJson()})}; d=k(d);for(var f=d.next();!f.done;f=d.next())f=f.value.getAsJson(),(y.isEmpty(f)||!f.trackingParams&&!f.veType)&&vm(Error("Child VE logged with no data"));d={cttAuthInfo:Pn(b),sequenceGroup:b};"UNDEFINED_CSN"==b?LJ("visualElementAttached",c,d):a?fl("visualElementAttached",c,a,d):wm("visualElementAttached",c,d)} function hNa(a,b,c,d){c={csn:b,ve:c.getAsJson(),eventType:1};d&&(c.clientData=d);d={cttAuthInfo:Pn(b),sequenceGroup:b};"UNDEFINED_CSN"==b?LJ("visualElementShown",c,d):a?fl("visualElementShown",c,a,d):wm("visualElementShown",c,d)} function iNa(a,b,c,d){c={csn:b,ve:c.getAsJson(),eventType:4};d&&(c.clientData=d);d={cttAuthInfo:Pn(b),sequenceGroup:b};"UNDEFINED_CSN"==b?LJ("visualElementShown",c,d):a?fl("visualElementShown",c,a,d):wm("visualElementShown",c,d)} function jNa(a,b,c,d,f){var g=(d=void 0===d?!1:d)?16:8;c={csn:b,ve:c.getAsJson(),eventType:g};f&&(c.clientData=f);d={cttAuthInfo:Pn(b),sequenceGroup:b,endOfSequence:d};"UNDEFINED_CSN"==b?LJ("visualElementHidden",c,d):a?fl("visualElementHidden",c,a,d):wm("visualElementHidden",c,d)} function MJ(a,b,c,d,f){d=d||"INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK";c={csn:b,ve:c.getAsJson(),gestureType:d};f&&(c.clientData=f);f={cttAuthInfo:Pn(b),sequenceGroup:b};"UNDEFINED_CSN"==b?LJ("visualElementGestured",c,f):a?fl("visualElementGestured",c,a,f):wm("visualElementGestured",c,f)} function kNa(a,b,c,d){c={csn:b,ve:c.getAsJson(),clientData:d};d={cttAuthInfo:Pn(b),sequenceGroup:b};"UNDEFINED_CSN"==b?LJ("visualElementStateChanged",c,d):a?fl("visualElementStateChanged",c,a,d):wm("visualElementStateChanged",c,d)} function dNa(){for(var a=Math.random()+"",b=[],c=0,d=0;d>=8);b[c++]=f}return Me(b,3)} function LJ(a,b,c){JJ.push({payloadName:a,payload:b,options:c});fNa||(fNa=Yha())} function Zha(a){if(JJ){for(var b=k(JJ),c=b.next();!c.done;c=b.next())c=c.value,c.payload&&(c.payload.csn=a.csn,fl(c.payloadName,c.payload,null,c.options));JJ.length=0}fNa=0} ;function NJ(a,b,c){KJ(N("use_default_events_client")?void 0:Mm,a,b,[c])} function OJ(a,b){hNa(N("use_default_events_client")?void 0:Mm,a,b,void 0)} function PJ(a,b){var c=N("use_default_events_client")?void 0:Mm;db(b,function(d){iNa(c,a,d,void 0)})} function lNa(a,b,c){var d=N("use_default_events_client")?void 0:Mm;db(b,function(f){jNa(d,a,f,c,void 0)})} function QJ(a,b,c){MJ(N("use_default_events_client")?void 0:Mm,a,b,void 0,c)} function mNa(a,b,c,d){MJ(N("use_default_events_client")?void 0:Mm,a,b,c,d)} function nNa(a,b,c){kNa(N("use_default_events_client")?void 0:Mm,a,b,c)} ;var RJ=function(){this.shownElements_=new Set;this.hiddenElements_=new Set;this.visibleState_=new Map;this.csn_=null;this.client_=Mm}; RJ.prototype.setClient=function(a){this.client_=a}; var oNa=function(){var a=RJ.getInstance();a.clear();a.csn_=On()}; RJ.prototype.clear=function(){this.shownElements_.clear();this.hiddenElements_.clear();this.visibleState_.clear();this.csn_=null}; var qNa=function(a,b,c){var d=SJ(0,b),f=b;N("enable_ve_tracker_key")&&(f=b.visualElement?b.visualElement:d);var g=a.shownElements_.has(f),l=a.visibleState_.get(f);a.shownElements_.add(f);a.visibleState_.set(f,!0);b.impressionLog&&!g&&b.impressionLog();if(d||b.visualElement)if(c=pNa(a,b,c))if(f=!(!b.data||!b.data.loggingDirectives),TJ(b)||f){d=b.visualElement?b.visualElement:In(d);var m=b.interactionLoggingClientData;f||g?TJ(b)&4?l||iNa(a.client_,c,d,m):TJ(b)&1&&!g&&hNa(a.client_,c,d,m):hNa(a.client_, c,d,m)}},UJ=function(a,b,c){var d=SJ(0,b),f=b; N("enable_ve_tracker_key")&&(f=b.visualElement?b.visualElement:d);var g=a.hiddenElements_.has(f),l=a.visibleState_.get(f);a.hiddenElements_.add(f);a.visibleState_.set(f,!1);if(!1===l)return!0;if(!d&&!b.visualElement)return!1;c=pNa(a,b,c);if(!c||!TJ(b)&&b.data&&b.data.loggingDirectives)return!1;d=b.visualElement?b.visualElement:In(d);TJ(b)&8?jNa(a.client_,c,d):TJ(b)&2&&!g&&(a=a.client_,b={csn:c,ve:d.getAsJson(),eventType:2},g={cttAuthInfo:Pn(c),sequenceGroup:c},"UNDEFINED_CSN"==c?LJ("visualElementHidden", b,g):a?fl("visualElementHidden",b,a,g):wm("visualElementHidden",b,g));return!0},rNa=function(a,b,c){var d=Array.from(b.children); b.shadowRoot&&(d=d.concat(b.shadowRoot.children));if(d&&d.length){b=d.length;for(var f=0;fg||m<=g||(l=a.getScreenLayer?a.getScreenLayer():void 0,l=On(l)||"",m=SJ(RJ.getInstance(),a),mNa(l,a.visualElement?a.visualElement:In(m),"INTERACTION_LOGGING_GESTURE_TYPE_HOVER",{hoverData:{durationHoveredMs:g}}));sNa(a)},function(){WJ&&(WJ(),WJ=null); d&&(tNa(a),sNa(a))}); return f} function vNa(a){var b;return Ti(new Ki(function(c,d){WJ=function(){d(Error("mouse did not stop"))}; b=Bk.debounce(sd(function(){wi(f);c()}),1,ek("min_mouse_still_duration",100)); var f=si(a,"mousemove",b)}),function(){var c=Bk,d=c.cancelDebouncedJobMap_.get(b); d&&c.cancelJob(d)})} function xNa(a){var b;return Ti(new Ki(function(c,d){WJ=function(){d(Error("mouse did not leave"))}; b=ri(a,"mouseleave",sd(function(){c()}))}),function(){wi(b)})} function wNa(a,b){return ri(a,"mouseleave",sd(b))} ;var yNa={CAPTIONS_MANAGER_PAGE:29434,CHANNEL_PAGE_VIEW:3611,HOME_PAGE:3854,MANGO_NOTIFICATION_SOCIAL_MESSAGES:42993,SEARCH_PAGE:4724,TRENDING_PAGE:96370,ABANDONED_WATCH_NOTIFICATION:27686,ACCESSIBILITY_SETTINGS_SCREEN:85013,ACCOUNT_PAGE:23462,ADD_BY_EMAIL_PAGE:42016,ADD_BY_LINK_PAGE:62407,ADD_CONTACTS_PAGE:26926,ADDME_SHARE_PANEL_PAGE:43781,ADMIN_REVIEW_PAGE:51236,ADMIN_REVUE_PAGE:79148,ADMIN_TOOLBOX_PAGE:50160,ADMIN_YURT_PAGE:77504,ANALYTICS_CATALYST_FEEDBACK_SCREEN:87907,ANALYTICS_MAIN_SCREEN:18630, APP_PROMO_AD_ENGAGEMENT_PANEL_SCREEN:54445,AR_CAMERA_ENGAGEMENT_PANEL_SCREEN:80935,BACKGROUND_PLAYBACK_NOTIFICATION_SCREEN:105675,BACKSTAGE_FULLSCREEN_IMAGE_VIEWER_SCREEN:37521,BACKSTAGE_POST_DIALOG_SCREEN:47786,BEDTIME_REMINDER_DIALOG_PAGE:98349,BROWSE_PAGE:6827,CHANNEL_BROWSE_PAGE:7282,COMMENT_REPLIES_ENGAGEMENT_PANEL_SCREEN:32276,COMMENTS_ENGAGEMENT_PANEL_SCREEN:76278,CONFIRMATION_FORMFILL_AD_ENGAGEMENT_PANEL_SCREEN:93911,CONSENT_BUMP_PAGE:106531,CONTACTS_PERMISSION_DENIED_FOREVER_PAGE:27259,CONTACTS_PERMISSION_PRE_PROMPT_PAGE:27262, CONTACTS_PERMISSION_SYSTEM_DIALOG_PAGE:27263,CONVERSATION_PAGE:21759,CONVERSATION_PARTICIPANTS_PAGE:27107,CONVERSATION_VIDEO_PICKER_PAGE:62936,COWATCH_WATCH_PAGE:49568,CREATOR_STUDIO_ANALYTICS_SCREEN:38408,CREATOR_STUDIO_ARTIST_ANALYTICS_SCREEN:80637,CREATOR_STUDIO_ARTIST_CONCERTS_PAGE:68727,CREATOR_STUDIO_ARTIST_PRESS_KIT_PAGE:68728,CREATOR_STUDIO_ASSET_ANALYTICS_SCREEN:80353,CREATOR_STUDIO_ASSET_METADATA_SCREEN:80356,CREATOR_STUDIO_CHANNEL_COMMENTS_SCREEN:74610,CREATOR_STUDIO_CHANNEL_COPYRIGHT:45707, CREATOR_STUDIO_CHANNEL_COPYRIGHT_INTERSTITIAL_PAGE:83962,CREATOR_STUDIO_CHANNEL_COPYRIGHT_STRIKES_MODAL_PAGE:83970,CREATOR_STUDIO_CHANNEL_DASHBOARD_PAGE:46713,CREATOR_STUDIO_CHANNEL_EDITING_PAGE:89711,CREATOR_STUDIO_CHANNEL_MONETIZATION_SCREEN:74612,CREATOR_STUDIO_CHANNEL_SPONSORSHIPS_SCREEN:93265,CREATOR_STUDIO_CHANNEL_TRANSLATIONS_SCREEN:74611,CREATOR_STUDIO_CMS_ASSET_CLAIMED_VIDEOS_SCREEN:113533,CREATOR_STUDIO_CMS_ASSET_COMPOSITION_SCREEN:93252,CREATOR_STUDIO_CMS_ASSET_EMBEDDED_IN_SCREEN:99357, CREATOR_STUDIO_CMS_ASSET_GROUP_ASSETS_SCREEN:94521,CREATOR_STUDIO_CMS_ASSET_GROUP_CAMPAIGNS_SCREEN:114252,CREATOR_STUDIO_CMS_ASSET_GROUP_CLAIMED_VIDEOS_SCREEN:113532,CREATOR_STUDIO_CMS_ASSET_GROUP_METADATA_SCREEN:94522,CREATOR_STUDIO_CMS_ASSET_GROUPS_SCREEN:94583,CREATOR_STUDIO_CMS_ASSET_ISSUE_SCREEN:88E3,CREATOR_STUDIO_CMS_ASSET_METADATA_SCREEN:93253,CREATOR_STUDIO_CMS_ASSET_OWNERSHIP_POLICY_SCREEN:93254,CREATOR_STUDIO_CMS_ASSET_OWNERSHIP_SCREEN:94387,CREATOR_STUDIO_CMS_ASSET_POLICY_SCREEN:94388, CREATOR_STUDIO_CMS_ASSET_REFERENCE_SCREEN:93255,CREATOR_STUDIO_CMS_ASSET_SOUND_RECORDINGS_SCREEN:97424,CREATOR_STUDIO_CMS_ASSETS_LIST_SCREEN:72502,CREATOR_STUDIO_CMS_CAMPAIGNS_PAGE:110111,CREATOR_STUDIO_CMS_CHANNELS_PAGE:76019,CREATOR_STUDIO_CMS_CLAIMED_VIDEO_DETAIL_SCREEN:117092,CREATOR_STUDIO_CMS_CLAIMED_VIDEO_POLICY_SCREEN:117093,CREATOR_STUDIO_CMS_CLAIMED_VIDEOS_LIST_SCREEN:89431,CREATOR_STUDIO_CMS_CONTENT_DELIVERY_SCREEN:110466,CREATOR_STUDIO_CMS_DASHBOARD_PAGE:77240,CREATOR_STUDIO_CMS_ISSUES_LIST_SCREEN:60508, CREATOR_STUDIO_CMS_LICENSING_SCREEN:105350,CREATOR_STUDIO_CMS_MANUAL_CLAIMING_VIDEO_SEARCH_SCREEN:73393,CREATOR_STUDIO_CMS_POLICIES_SCREEN:113534,CREATOR_STUDIO_CMS_REPORTS_SCREEN:92098,CREATOR_STUDIO_CMS_VIDEO_DETAIL_SCREEN:84517,CREATOR_STUDIO_CMS_VIDEO_LIST_SCREEN:83759,CREATOR_STUDIO_CONTENT_OWNER_ANALYTICS_SCREEN:80357,CREATOR_STUDIO_GROUP_ANALYTICS_SCREEN:86113,CREATOR_STUDIO_LIVE_CHAT_MONETIZATION:72598,CREATOR_STUDIO_LIVE_STREAMING_PAGE:72733,CREATOR_STUDIO_MENTION_LIST_SCREEN:107349,CREATOR_STUDIO_MOBILE_NOTIFICATIONS_SCREEN:117429, CREATOR_STUDIO_MOBILE_NOTIFICATIONS_SETTINGS_SCREEN:117430,CREATOR_STUDIO_MOBILE_PLAYLIST_EDITOR_SCREEN:117432,CREATOR_STUDIO_MOBILE_SETTINGS_SCREEN:117259,CREATOR_STUDIO_MUSIC_SCREEN:97615,CREATOR_STUDIO_MY_VIDEOS_SCREEN:31402,CREATOR_STUDIO_PITCH_MUSIC_SCREEN:84774,CREATOR_STUDIO_PLAYLISTS_PAGE:95117,CREATOR_STUDIO_POST_COMMENTS_SCREEN:98930,CREATOR_STUDIO_POST_DETAILS_SCREEN:98931,CREATOR_STUDIO_POST_LIST_SCREEN:98932,CREATOR_STUDIO_SCREEN:43347,CREATOR_STUDIO_TAKEDOWN_WEBFORM_PAGE:45474,CREATOR_STUDIO_TOU_PAGE:100352, CREATOR_STUDIO_TOU_STRIKES_DIALOG_PAGE:84758,CREATOR_STUDIO_TOU_STRIKES_INTERSTITIAL_PAGE:98443,CREATOR_STUDIO_UNIFIED_TAKEDOWN_FORM_PAGE:117985,CREATOR_STUDIO_VIDEO_ANALYTICS_SCREEN:74613,CREATOR_STUDIO_VIDEO_COMMENTS_SCREEN:74614,CREATOR_STUDIO_VIDEO_COPYRIGHT_DIALOG:64502,CREATOR_STUDIO_VIDEO_DETAILS_SCREEN:74615,CREATOR_STUDIO_VIDEO_EDITOR_SCREEN:74616,CREATOR_STUDIO_VIDEO_MONETIZATION_SCREEN:74617,CREATOR_STUDIO_VIDEO_RIGHTS_MANAGEMENT_SCREEN:77820,CREATOR_STUDIO_VIDEO_TRANSLATIONS_SCREEN:74618, CREATOR_STUDIO_YPP_SIGNUP_INELIGIBLE:93278,CREATOR_STUDIO_YPP_SIGNUP_MAIN:93274,CREATOR_STUDIO_YPP_SIGNUP_OVERVIEW:93275,CREATOR_STUDIO_YPP_SIGNUP_REJECTED:93276,CROWDSOURCING_CONTRIBUTOR_QUEUE_PAGE:22110,CROWDSOURCING_EDITOR_PAGE:29433,DIRECT_SIGN_IN_AUTHZEN_CHALLENGE_PAGE:82047,DIRECT_SIGN_IN_DEVICE_PROMPT_CHALLENGE_PAGE:113550,DIRECT_SIGN_IN_IDENTIFIER_ENTRY_PAGE:75836,DIRECT_SIGN_IN_PASSWORD_ENTRY_PAGE:75837,DOWNLOADS_PAGE:42352,EDIT_CREATOR_COMPLIANCE_PAGE:84512,EDIT_INK_OVERLAY:76065,EDIT_VOLUME_SHEET_PANEL:75989, EMBED_PAGE:16623,EMBED_PREVIEW_PAGE:32594,EMBED_WATCH_PAGE:27240,ENGAGEMENT_PANEL_SCREEN:32633,EXPLORE_PAGE:74858,FEED_PAGE:3945,FEEDBACK_PAGE:16989,FINE_LOCATION_PERMISSION_SYSTEM_DIALOG_PAGE:45520,FIRST_TIME_SIGN_IN_COUNTERFACTUAL_PAGE:25488,FIRST_TIME_SIGN_IN_VARIANT1_PAGE:25492,FIRST_TIME_SIGN_IN_VARIANT2_PAGE:25494,FORMFILL_AD_ENGAGEMENT_PANEL_SCREEN:55760,FULL_SCREEN_WATCH_PAGE:14057,GAME_PAGE:18451,GAMING_ACCOUNT_LINK_CONFIRM_DIALOG:57204,GAMING_ACCOUNT_LINK_SETTING_DIALOG:57203,GAMING_LEFT_RAIL:17897, GAMING_MULTIPLE_ACCOUNT_LINK_DIALOG:57205,GAMING_ONBOARDING_PAGE:18198,GAMING_RIGHT_RAIL:17898,GAMING_WARM_WELCOME_PAGE:17909,GAMING_WATCH_NEXT_CONTAINER_SCREEN:43980,GENERIC_UPSELL_DIALOG_PAGE:46220,GUIDE_PAGE:11721,HELP_PAGE:49954,HISTORY_PAGE:96369,IMMERSIVE_AD_ENGAGEMENT_PANEL_SCREEN:56251,INLINE_SIGN_IN_PAGE:25624,INTERSTITIAL_PAGE:16906,INTERSTITIAL_PRODUCT_SHELF_ENGAGEMENT_PANEL_SCREEN:99999,INVITATION_FORMFILL_AD_ENGAGEMENT_PANEL_SCREEN:68172,INVITE_MORE_PANEL_PAGE:27068,JOIN_GROUP_PAGE:47973, KIDS_ACTION_PAGE:72773,KIDS_ALL_USER_CONSENT_FLOW_ACTIVITY_PAGE:26970,KIDS_ALL_USER_SIGN_IN_ACTIVITY_PAGE:26971,KIDS_ANNOUNCEMENT_DIALOG_PAGE:96805,KIDS_APP_REVIEW_FLOW_PAGE:17752,KIDS_EDIT_CORPUS_PREFERENCES_FLOW_PAGE:73233,KIDS_IMPRESSUM_NOTICE_FLOW_PAGE:109512,KIDS_NO_RED_ACCOUNT_CONSENT_FLOW_PAGE:22256,KIDS_ONBOARDING_FLOW_PAGE:14115,KIDS_ONBOARDING_FOR_EXISTING_USER_FLOW_PAGE:22696,KIDS_PARENT_PROFILE_SETTINGS_PAGE:89278,KIDS_PARENT_SETTINGS_PAGE:89277,KIDS_PRIVACY_NOTICE_FLOW_PAGE:109513,KIDS_PROFILE_CREATION_FLOW_PAGE:43278, KIDS_PROFILE_PIN_CREATION_PAGE:43459,KIDS_PROFILE_PIN_GATE:43464,KIDS_PROFILE_SETTINGS_PAGE:89279,KIDS_PROFILE_SWITCHER_PAGE:43717,KIDS_PROMO_EVENT_PAGE_VIEW:55764,KIDS_RED_ACCOUNT_CONSENT_FLOW_PAGE:22255,KIDS_SECRET_CODE_PAGE:89281,KIDS_SHOW_BROWSE_PAGE:40963,KIDS_SIGN_IN_FLOW_PAGE:43277,KIDS_UNICORN_ONBOARDING_FLOW_PAGE:43442,LABS_PAGE:91824,LIBRARY_PAGE:96367,LIGHTWEIGHT_CAMERA_PAGE:36850,LIGHTWEIGHT_CREATION_PAGE:72694,LIGHTWEIGHT_PLAYER_PAGE:37414,LIGHTWEIGHT_VIDEO_EDITING_PAGE:36851,LIVE_CHAT_ENGAGEMENT_PANEL_SCREEN:73491, LIVE_CHAT_PAGE:54473,LIVE_DASHBOARD_PAGE:43375,LIVE_STUDIO_PAGE:46674,MAIN_AUTO_OFFLINE_NOTIFICATIONS_PAGE:32473,MANGO_ACCOUNT_ERROR_PAGE:72901,MANGO_ACCOUNT_LOADING_PAGE:72906,MANGO_CHANNEL_DESCRIPTION_PAGE:50947,MANGO_CHANNEL_LIST_PAGE:50612,MANGO_CHANNEL_PREVIEW_PAGE:50613,MANGO_CHANNEL_VIDEOS_PAGE:50942,MANGO_DIALOG_YTB_EDUCATION:84938,MANGO_DIALOG_YTB_INVALID_FILE_ERROR:84943,MANGO_DIALOG_YTB_PERMISSION:84939,MANGO_DIALOG_YTB_PERMISSION_DEEP_LINK:84941,MANGO_DIALOG_YTB_PERMISSION_ERROR:84944, MANGO_DIALOG_YTB_PERMISSION_SETTINGS:84940,MANGO_DIALOG_YTB_PERMISSION_SETTINGS_DEEP_LINK:84942,MANGO_DISCO_SEND_PAGE:35585,MANGO_EXPLORATION_PAGE:51926,MANGO_GUEST_DOWNLOAD_TAB_PAGE:79983,MANGO_HOME_HOUSEWARMING_CARD_PAGE:63238,MANGO_HOME_PAGE:18921,MANGO_HOME_TOPICK_PICKER_PAGE:63241,MANGO_HOME_VIDEO_REPORTING_PAGE:57893,MANGO_LOW_APKVERSION_PAGE:41182,MANGO_MAIN_PAGE:33424,MANGO_NOTIFICATION_DAILY_VIDEOS_AVAILABLE_PAGE:22207,MANGO_NOTIFICATION_UPGRADE_AVAILABLE_PAGE:36229,MANGO_NOTIFICATION_VIDEO_TRANSFER_COMPLETED_PAGE:22206, MANGO_NOTIFICATION_VIDEO_TRANSFER_IN_PROGRESS_PAGE:22205,MANGO_ONBOARDING_ACCOUNT_CREATION_PAGE:18993,MANGO_ONBOARDING_COMPLETE_PAGE:19001,MANGO_ONBOARDING_LANGUAGE_SELECTION_PAGE:18990,MANGO_ONBOARDING_PHONE_NUMBER_SELECTION_PAGE:18991,MANGO_ONBOARDING_PHONE_VERIFICATION_PAGE:18997,MANGO_ONBOARDING_SCREEN:18725,MANGO_ONBOARDING_SLIDE_SHOW_PAGE:19003,MANGO_ONBOARDING_VIDEO_PREVIEW_PAGE:36874,MANGO_PROFILE_PAGE:44763,MANGO_SAVED_PAGE:33427,MANGO_SETTINGS_MANAGE_HISTORY_PAGE:67793,MANGO_SETTINGS_PAGE:22182, MANGO_SPLASH_PAGE:37091,MANGO_STORAGE_MANAGEMENT_PAGE:34650,MANGO_SUBSCRIPTIONS_FEED_PAGE:50617,MANGO_UNFORK_MIGRATION_ERROR_PAGE:47261,MANGO_UPDATE_APK_PAGE:22287,MANGO_VIDEO_FORMAT_SELECTION_PAGE:25144,MANUAL_SYNC_DOWNLOADED_PLAYLIST_DIALOG_PAGE:97917,MDX_ASSISTED_TV_SIGN_IN_DIALOG_PAGE:62397,MDX_FIJI_DRAWER:36961,MDX_LOCAL_NETWORK_PERMISSIONS_REQUEST_PAGE:108035,MDX_REMOTE_WATCH_DIALOG:27426,MDX_SMART_PAIRING_DELETE_TV_CODES_PAGE:27857,MDX_SMART_PAIRING_PAIR_WITH_TV_PAGE:27846,MDX_SMART_PAIRING_USE_TV_CODE_PAGE:27854, MDX_SMART_REMOTE_PERMISSION_REQUEST_PAGE:69692,MDX_SMART_REMOTE_SCREEN:61411,MDX_SYSTEM_NOTIFICATION_COUNTERFACTUAL_PAGE:39299,MDX_SYSTEM_NOTIFICATION_PAGE:38696,MDX_TOAST_PAGE:62520,MDX_TV_SIGN_IN_ACCOUNT_CHOOSER_PAGE:36382,MDX_TV_SIGN_IN_PASSIVE_ACCOUNT_CHOOSER_PAGE:108701,MDX_TV_SIGN_IN_PASSIVE_WAITING_PAGE:50663,MDX_TV_SIGN_IN_PERMISSIONS_PAGE:36387,MDX_WATCH_PAGE:14908,MEALBAR_PROMO_PAGE:37533,MEDIA_ACTIONS_BROWSE_PAGE:105443,MEDIA_BROWSER_ANDROID_AUTO_PAGE:61635,MEDIA_BROWSER_ANDROID_CLOCK_PAGE:62274, MEDIA_BROWSER_CAR_PLAY_ERROR_PAGE:65702,MEDIA_BROWSER_CAR_PLAY_LOADING_PAGE:65703,MEDIA_BROWSER_CAR_PLAY_SCREEN:65701,MEDIA_BROWSER_WAZE_PAGE:76256,MESSAGES_EXTENSION_CONVERSATION_PAGE:37671,METADATA_EDITOR_PAGE:49953,MOBILE_CREATION_PAGE:36216,MOBILE_LIVE_ADVANCED_SETTINGS_PAGE:28237,MOBILE_LIVE_LOCATION_SEARCH_PAGE:39553,MOBILE_LIVE_PERMISSION_REQUEST_PAGE:29222,MOBILE_LIVE_PREFERENCES_PAGE:26107,MOBILE_LIVE_SCHEDULED_BROADCASTS_PAGE:38050,MOBILE_LIVE_STATS_PAGE:26108,MOBILE_LIVE_STREAMING_PAGE:26109, MOBILE_LIVE_THUMBNAIL_PAGE:26110,MOBILE_SCREENCAST_THUMBNAIL_PAGE:66881,MOBILE_THUMBNAIL_EDITOR_PAGE:28236,MODAL_ACCOUNT_SWITCHER_PAGE:14586,MULTI_REEL_DISMISSAL_PAGE:57929,MUSIC_ADD_TO_PLAYLIST_POPUP:74723,MUSIC_ALBUM_PAGE:44098,MUSIC_ARTIST_PAGE:44099,MUSIC_AUDIO_CAST_UPSELL_PROMO:23528,MUSIC_AUDIO_PREVIEW_PAGE:61699,MUSIC_DEEP_LINK_PAGE:59149,MUSIC_IOSSDKSCREEN:101951,MUSIC_LIBRARY_ARTIST_PAGE:97346,MUSIC_LISTENING_REVIEW_PAGE:118051,MUSIC_LYRICS_PAGE:95102,MUSIC_NAVIGATION_ERROR_PAGE:64882,MUSIC_PERSISTED_WATCH_PAGE:63595, MUSIC_PLAYLIST_PAGE:63349,MUSIC_RELATED_PAGE:95101,MUSIC_REMOVE_DOWNLOADS_AFTER_REMOVING_FROM_LIBRARY_DIALOG_PAGE:75240,MUSIC_RESUME_PLAYBACK_MINIPLAYER_PAGE:27039,MUSIC_SHORTCUTS_SYSTEM_DIALOG_PAGE:68823,MUSIC_SIGN_IN_PAGE:21537,MUSIC_SIRI_MEDIA_INTENT_PAGE:83464,MUSIC_SONG_DETAIL_PAGE:75707,MUSIC_USER_CHANNEL_PAGE:83113,MUSIC_WATCH_APP_SCREEN:101952,MUSIC_WATCH_APP_UPGRADE_SCREEN:101953,MUSIC_WIDGET_WATCH_PAGE:79610,NEW_VERSION_AVAILABLE_FORCE_PAGE:24402,NEW_VERSION_AVAILABLE_NAG_PAGE:24400,NEW_VERSION_AVAILABLE_TIMER_PAGE:32925, NOTIFICATION_SETTINGS_PAGE:57173,OFFLINE_MUSIC_ALBUM_PAGE:64423,OFFLINE_MUSIC_PLAYLIST_PAGE:64424,OFFLINE_PROMO_RENDERER_PAGE:33986,OFFLINE_SEARCH_PAGE:100828,OFFLINE_VIDEO_PAGE:21409,PARENTAL_CONTROL_PAGE:11070,PARENTAL_CONTROL_TIMER_EXPIRED_PAGE:11074,PARENTAL_CONTROL_TIMER_PAGE:17880,PAUSE_AND_BUFFER_NOTIFICATIONS_PAGE:14001,PHONE_VERIFICATION_CODE_ENTRY_PAGE:30709,PHONE_VERIFICATION_INTRO_PAGE:30707,PHONE_VERIFICATION_RESULT_ERROR_PAGE:30711,PHONE_VERIFICATION_RESULT_SUCCESS_PAGE:30710,PHONE_VERIFICATION_TELEPHONE_NUMBER_ENTRY_PAGE:30708, PHONEBOOK_PAGE:26984,PIN_CONFIGURATION_SCREEN:63648,PIN_LOCK_SCREEN:63649,PLAYER_ERROR_PAGE:51879,PLAYLIST_ENGAGEMENT_PANEL_SCREEN:111059,PLAYLIST_PAGE:5754,PLAYLIST_SETTINGS_EDITOR_PAGE:20445,PREMIUM_YPC_OFFERS_BROWSE_PAGE:110386,PRODUCT_PANEL_SCREEN:113746,PROFILE_CARD_PAGE:66557,PUSH_NOTIFICATION_DIALOG:17310,PUSH_NOTIFICATION_PAGE:28631,QUICK_ACTION_PAGE:21589,REDEEM_PAGE:68012,REELS_CREATION_ONBOARDING_PAGE:60480,REELS_PERMISSION_REQUEST_PAGE:31571,REQUIRED_SIGN_IN_PAGE:76980,RESTORE_VIDEO_AFTER_CRASH_PAGE:41577, RETROACTIVE_SIGN_IN_PROMO_PAGE:45469,SCAN_CODE_PAGE:38669,SCREENCAST_CONTROLLER_PAGE:13768,SCREENCAST_LAUNCH_PAGE:13777,SEARCH_INPUT_PAGE:62985,SEARCH_SUGGESTION_PAGE:59369,SEND_SMS_PERMISSION_PRE_PROMPT_PAGE:43927,SEND_SMS_PERMISSION_SYSTEM_DIALOG_PAGE:43928,SETTINGS_OVERVIEW_PAGE:12924,SFV_AUDIO_PICKER_SEARCH_PAGE:100355,SHARE_CONVERSATION_INBOX_PAGE:56219,SHARE_CONVERSATION_PAGE:27669,SHARE_MENU:10337,SHARED_TAB_NEW_GROUP_PAGE:47896,SHORTS_CREATION_AUDIO_SCRUBBER_BOTTOM_SHEET_PAGE:107598,SHORTS_CREATION_CAMERA_PAGE:96639, SHORTS_CREATION_CAMERA_PERMISSIONS_PAGE:107536,SHORTS_CREATION_CREATION_PAGE:96661,SHORTS_CREATION_EDITOR_PAGE:96658,SHORTS_CREATION_EDITOR_TIMELINE_EDITOR_PAGE:116646,SHORTS_CREATION_GALLERY_PAGE:96660,SHORTS_CREATION_TIMER_BOTTOM_SHEET_PAGE:104443,SHORTS_CREATION_TRIM_PAGE:96659,SHORTS_CREATION_VOLUME_BALANCER_PAGE:106442,SIDELOADED_MUSIC_ALBUM_PAGE:63667,SIDELOADED_MUSIC_ARTIST_PAGE:63668,SIDELOADED_MUSIC_PLAYLIST_PAGE:63669,SPONSORSHIPS_COMMENTS_ENGAGEMENT_PANEL_SCREEN:78314,STORE_VISITS_AD_ENGAGEMENT_PANEL_SCREEN:55761, SUBSCRIPTIONS_PAGE:96368,SUGGESTED_PLAYLIST_VIDEOS_PAGE:67374,SUPER_CHAT_CONTRACT_PAGE:48992,THUMBNAIL_EDITOR_PAGE:49956,TODAY_WIDGET_PAGE:31961,TOMBSTONED_PAGE_VISUAL_ELEMENT:26388,TOPIC_EXPLORER_PAGE:23811,TOPIC_PICKER_PAGE:5E4,TUNEDER_FORM_PAGE:47355,TUNEDER_SWIPE_PAGE:47356,TV_SPLASH_PAGE:37935,UDC_LOCATION_REPORTING_CONSENT_FLOW_PAGE:45521,UNIFIED_SHARE_PANEL_PAGE:21760,UNKNOWN_PAGE:83769,UNLIMITED_FAMILY_MESSAGE_INTERSTITIAL_PAGE:49977,UNLIMITED_FAMILY_PROFILE_INTERSTITIAL_PAGE:49974,UNLIMITED_MANAGE_SUBSCRIPTION_PAGE:93497, UNLIMITED_ONBOARDING_PAGE:93498,UNLIMITED_POST_PURCHASE_WELCOME_PAGE:34325,UNPLUGGED_APP_OVERLAY_PAGE:115803,UNPLUGGED_INFO_DIALOG_PAGE:100081,UNPLUGGED_LOCATION_PAGE:35309,UNPLUGGED_ONBOARDING_ACCESS_PENDING_PAGE:68314,UNPLUGGED_ONBOARDING_PAGE:25602,UNPLUGGED_ONBOARDING_V2_PAGE:100339,UPLOAD_PAGE:59018,UPLOAD_VIDEO_CAMERA_EXTERNAL_PAGE:18248,UPLOAD_VIDEO_CAMERA_PAGE:50625,UPLOAD_VIDEO_EDITING_PAGE:9729,UPLOAD_VIDEO_EDITING_STICKER_CATALOG_PAGE:37168,UPLOAD_VIDEO_EDITING_TEXT_PAGE:37169,UPLOAD_VIDEO_METADATA_EDITING_PAGE:21667, UPLOAD_VIDEO_PERMISSION_PAGE:16749,UPLOAD_VIDEO_PERMISSION_REQUEST_PAGE:18635,UPLOAD_VIDEO_SELECTION_PAGE:39305,UPLOAD_VIDEO_SPLIT_PAGE:18046,VIDEO_GAME_TOPIC_CHANNEL_PAGE:53969,VIDEO_MANAGER_PAGE:8213,VIDEO_QUALITY_PERSISTENT_SETTINGS:93926,VOICE_SEARCH_EXTERNAL_LINK_PAGE:102852,VOICE_SEARCH_MOBILE_REMOTE_PAGE:110099,VOICE_SEARCH_PAGE:22678,VOICE_SEARCH_PERMISSION_REQUEST_PAGE:69076,VR_MOVIES_PAGE:100856,WATCH_IT_AGAIN_PAGE:17736,WATCH_PAGE:3832,WEBSITE_ACTIONS_AMP_AD_ENGAGEMENT_PANEL_SCREEN:55759, WEBSITE_ACTIONS_EXTENSIONS_AD_ENGAGEMENT_PANEL_SCREEN:64031,WELCOME_PAGE:93044,WHOS_WATCHING_PAGE:93045,YOU_TUBE_ORIGINALS_HOME_PAGE:34388,YPC_DONATION_POST_TRANSACTION:17657,YPC_DONATION_SCREEN:17655,YPC_MEMBERSHIP_CANCEL_SUCCESS_PAGE:39579,YPC_MEMBERSHIP_POST_TRANSACTION_PAGE:39578,YPC_OFFERS_MODULE_PAGE:77448,YPC_OFFERS_PAGE:8196,YPC_POST_TIP_PAGE:11357,YPC_SPONSORSHIP_OFFER_SCREEN:69877,YPC_TIP_PAGE:8197,YT_FLOWS_PAGE:82039};function zNa(){var a=Nn(),b=On();b&&a&&lNa(b,[a],!0)} ;function ANa(){var a=tJ.getInstance();a.set("utco",-Math.floor(new Date().getTimezoneOffset()));a.save()} var BNa={bluetooth:"CONN_DISCO",cellular:"CONN_CELLULAR_UNKNOWN",ethernet:"CONN_WIFI",none:"CONN_NONE",wifi:"CONN_WIFI",wimax:"CONN_CELLULAR_4G",other:"CONN_UNKNOWN",unknown:"CONN_UNKNOWN","slow-2g":"CONN_CELLULAR_2G","2g":"CONN_CELLULAR_2G","3g":"CONN_CELLULAR_3G","4g":"CONN_CELLULAR_4G"};function CNa(){if("undefined"!==typeof Intl)return new Intl.DateTimeFormat().resolvedOptions().timeZone} function DNa(){var a=CNa();if(!a)return!1;a=a.replace("/",".");var b=tJ.getInstance();b.set("tz",a);b.save();return!0} function ENa(){var a,b=window.navigator;if(a=b?b.connection:void 0){b=BNa[a.type||"unknown"]||"CONN_UNKNOWN";a=BNa[a.effectiveType||"unknown"]||"CONN_UNKNOWN";"CONN_CELLULAR_UNKNOWN"===b&&"CONN_UNKNOWN"!==a&&(b=a);if("CONN_UNKNOWN"!==b)return b;if("CONN_UNKNOWN"!==a)return a}} ;function XJ(a){"kevlar_should_maintain_stable_list"===a?(a=ENa(),a="CONN_CELLULAR_2G"===a||"CONN_CELLULAR_3G"===a?!1:!0):a=N(a);return a} ;var FNa=!1,GNa=[],HNa=0,YJ=null,INa=null,JNa=Mm;function KNa(){if("hidden"==hk())var a="FOREGROUND_HEARTBEAT_TRIGGER_ON_BACKGROUND";else"visible"==hk()&&(a="FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND",YJ=null);a&&ZJ(a)} function ZJ(a){if("FOREGROUND_HEARTBEAT_TRIGGER_ON_BACKGROUND"==a||"FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND"==a){if(INa==a)return;INa=a}var b=9E4+2E3*Math.random();if("FOREGROUND_HEARTBEAT_TRIGGER_ON_INTERVAL"!=a||!(Mk()>b)&&"visible"==hk()){b=-1;YJ&&(b=Math.round(Vk()-YJ));var c=String;var d=Ja("_fact",window);d=null==d||-1==d?-1:Math.max(Wa()-d,0);a={firstActivityMs:c(d),clientDocumentNonce:Gn,index:String(HNa),lastEventDeltaMs:String(b),trigger:a};fl("foregroundHeartbeat",a,JNa);Fa("_fact", -1,window);HNa++;YJ=Vk()}} ;function $J(a,b,c,d,f){b=void 0===b?null:b;c=void 0===c?null:c;d=void 0===d?null:d;f=void 0===f?null:f;a={youThereEventType:a};c&&(a.lactThresholdMs=c.lactThresholdMs,a.mediaPosSec=c.promptDelaySec,a.lactServerRequestMs=c.lactServerRequestMs,a.triggerReason=c.triggerReason);null!=f&&(a.renderingMediaPosSec=Math.round(f));b||(b=On());b&&(a.clientScreenNonce=b);d&&(a.clientPlaybackNonce=d);wm("youThere",a)} ;var LNa={AUTOPLAY:"atp",SKA_SKIPPABLE_ADS:"ska",QUEUE_SUPPORT:"que",MULTI_USER_SESSIONS:"mus",SINGLE_USER_SESSIONS:"sus",HAS_DISPLAY:"dsp",SCREEN_EXTENDED_QUEUE_SUPPORT:"seq",MIC:"mic",DPAD:"dpa"};var aK=function(a){this.app=this.name=this.id="";this.type="REMOTE_CONTROL";this.obfuscatedGaiaId=this.avatar=this.username="";this.connected=!1;this.capabilities=new Set;this.experiments=new Set;this.theme="u";this.msn=-1;this.localChannel=null;this.queuedMessages=new pj;this.localChannelEncryptionKey=this.remoteControllerUrl="";this.deviceContext=void 0;a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.username=a.user||"",this.avatar=a.userAvatarUri|| "",this.obfuscatedGaiaId=a.obfuscatedGaiaId||"",this.theme=a.theme||"u",MNa(this,a.capabilities||""),this.setExperiments(a.experiments||""),this.remoteControllerUrl=a.remoteControllerUrl||"",this.localChannelEncryptionKey=a.localChannelEncryptionKey||"",this.deviceContext=a.deviceContext)}; aK.prototype.toDisplayString=function(){var a=this.name||"";this.username&&(a=a+" ("+this.username+")");return a}; aK.prototype.copy=function(){var a=new aK({id:this.id,name:this.name,app:this.app,type:this.type,user:this.username,userAvatarUri:this.avatar,obfuscatedGaiaId:this.obfuscatedGaiaId,theme:this.theme,capabilities:Array.from(this.capabilities.values()).join(","),experiments:Array.from(this.experiments.values()).join(",")});a.connected=this.connected;a.remoteControllerUrl=this.remoteControllerUrl;a.localChannelEncryptionKey=this.localChannelEncryptionKey;a.deviceContext=this.deviceContext;return a}; aK.prototype.equals=function(a){return a?this.id==a.id:!1}; var MNa=function(a,b){a.capabilities.clear();eb(b.split(","),Ua(y.contains,LNa)).forEach(function(c){a.capabilities.add(c)})}; aK.prototype.setExperiments=function(a){var b=this;this.experiments.clear();a.split(",").forEach(function(c){b.experiments.add(c)})};var NNa=function(a,b){this.action=a;this.params=b||{}};function ONa(a,b){Sg.call(this);this.delay_=new $s(this.onTick_,0,this);Tg(this,this.delay_);this.interval_=5E3;this.nextTickTime_=0;if("function"===typeof a)b&&(a=Ta(a,b));else if(a&&"function"===typeof a.handleEvent)a=Ta(a.handleEvent,a);else throw Error("Invalid listener argument");this.listener_=a} v(ONa,Sg);e=ONa.prototype;e.onTick_=function(){this.interval_=Math.min(3E5,2*this.interval_);this.listener_();this.nextTickTime_&&this.start()}; e.start=function(){var a=this.interval_+15E3*Math.random();this.delay_.startIfNotActive(a);this.nextTickTime_=Wa()+a}; e.stop=function(){this.delay_.stop();this.nextTickTime_=0}; e.isActive=function(){return this.delay_.isActive()}; e.reset=function(){this.delay_.stop();this.interval_=5E3};function bK(a,b,c,d,f){c=void 0===c?!1:c;d=void 0===d?function(){return""}:d; f=void 0===f?!1:f;this.pathPrefix_=a;this.defaultQueryParams_=b;this.pubsub_=new vj;this.reconnectTimer_=new ONa(this.safeReconnect_,this);this.channel_=this.logger_=null;this.disposed_=!1;this.connectionParams_=null;this.sCookie_="";this.disconnectUi_=this.connectUi_=0;this.pendingMessages_=[];this.enableAsyncTest_=c;this.getXsrfToken_=d;this.enableLoungeTokenRefresh_=f} v(bK,xr);e=bK.prototype;e.subscribe=function(a,b,c){return this.pubsub_.subscribe(a,b,c)}; e.unsubscribe=function(a,b,c){return this.pubsub_.unsubscribe(a,b,c)}; e.unsubscribeByKey=function(a){return this.pubsub_.unsubscribeByKey(a)}; e.publish=function(a,b){return this.pubsub_.publish.apply(this.pubsub_,arguments)}; e.dispose=function(){this.disposed_||(this.disposed_=!0,Rg(this.pubsub_),this.disconnect(),Rg(this.reconnectTimer_),this.reconnectTimer_=null,this.getXsrfToken_=function(){return""})}; e.isDisposed=function(){return this.disposed_}; var PNa=function(a){return{firstTestResults:[""],secondTestResults:a.channel_.isBuffered(),sessionId:a.channel_.getSessionId(),arrayId:a.channel_.lastArrayId_}}; e=bK.prototype; e.connect=function(a,b,c){if(!this.channel_||2!=this.channel_.getState()){this.sCookie_="";this.reconnectTimer_.stop();this.connectionParams_=a||null;this.connectUi_=b||0;a=this.pathPrefix_+"/test";b=this.pathPrefix_+"/bind";var d=new tr("1",c?c.firstTestResults:null,c?c.secondTestResults:null,this.enableAsyncTest_),f=this.channel_;f&&f.setHandler(null);d.setHandler(this);this.channel_=d;QNa(this);if(this.channel_){d=A("ID_TOKEN");var g=this.channel_.extraHeaders_||{};d?g["x-youtube-identity-token"]=d: delete g["x-youtube-identity-token"];this.channel_.setExtraHeaders(g)}f?(f.getState(),this.channel_.connect(a,b,this.defaultQueryParams_,f.getSessionId(),f.lastArrayId_)):c?this.channel_.connect(a,b,this.defaultQueryParams_,c.sessionId,c.arrayId):this.channel_.connect(a,b,this.defaultQueryParams_)}}; e.disconnect=function(a){this.disconnectUi_=a||0;this.reconnectTimer_.stop();QNa(this);this.channel_&&(3==this.channel_.getState()&&this.channel_.startForwardChannel_(),this.channel_.disconnect());this.disconnectUi_=0}; e.sendMessage=function(a,b){a={_sc:a};b&&y.extend(a,b);this.isReconnecting()||2==(this.channel_?this.channel_.getState():0)?this.pendingMessages_.push(a):this.channel_&&3==this.channel_.getState()&&(QNa(this),this.channel_.sendMap(a))}; e.channelOpened=function(){this.reconnectTimer_.reset();this.connectionParams_=null;this.connectUi_=0;if(this.pendingMessages_.length){var a=this.pendingMessages_;this.pendingMessages_=[];for(var b=0,c=a.length;bTb(a,"10.0")&&(this.supportCors=!1))} var dK=function(a,b){var c=a.basePath;a.supportCors&&(c=a.scheme+"://"+a.domain+a.port+a.basePath);return Jd(c+b,{})},RNa=function(a,b,c,d,f){a={format:"JSON", method:"POST",context:a,timeout:5E3,withCredentials:!1,onSuccess:Ua(a.onSuccess_,d,!0),onError:Ua(a.onError_,f),onTimeout:Ua(a.onTimeout_,f)};c&&(a.postParams=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return ql(b,a)}; cK.prototype.onSuccess_=function(a,b,c,d){b?a(d):a({text:c.responseText})}; cK.prototype.onError_=function(a,b){a(Error("Request error: "+b.status))}; cK.prototype.onTimeout_=function(a){a(Error("request timed out"))};var SNa=Wa(),eK=null,fK=Array(50),gK=-1,hK=!1;function TNa(){var a=UNa;VNa();eK.push(a);WNa()} function iK(a,b){VNa();var c=XNa(a,String(b));0==eK.length?YNa(c):(WNa(),db(eK,function(d){d(c)}))} function VNa(){eK||(eK=Ja("yt.mdx.remote.debug.handlers_")||[],Fa("yt.mdx.remote.debug.handlers_",eK,void 0))} function YNa(a){var b=(gK+1)%50;gK=b;fK[b]=a;hK||(hK=49==b)} function WNa(){var a=eK;if(fK[0]){var b=hK?gK:-1;do{b=(b+1)%50;var c=fK[b];db(a,function(d){d(c)})}while(b!=gK); fK=Array(50);gK=-1;hK=!1}} function XNa(a,b){var c=(Wa()-SNa)/1E3;c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")} ;function jK(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||"";this.idType=a.screenIdType||"normal"} var kK=function(a,b){return!!b&&(a.id==b||a.uuid==b)},ZNa=function(a){return{name:a.name, screenId:a.id,loungeToken:a.token,dialId:a.uuid,screenIdType:a.idType}},$Na=function(a){return new jK(a)},aOa=function(a){return Array.isArray(a)?fb(a,$Na):[]},lK=function(a){return a?"{name:\""+a.name+"\",id:"+a.id.substr(0,6)+"..,token:"+((a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+",idType:"+a.idType+"}"):"null"},bOa=function(a){return Array.isArray(a)?"["+fb(a,lK).join(",")+"]":"null"};function cOa(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})} function dOa(a){return fb(a,function(b){return{key:b.id,name:b.name}})} function eOa(a,b){return kb(a,function(c){return c||b?!c!=!b?!1:c.id==b.id:!0})} function mK(a,b){return kb(a,function(c){return kK(c,b)})} ;var nK=function(a){a=void 0===a?!1:a;Sg.call(this);this.pubSub_=new vj(a);Tg(this,this.pubSub_)}; v(nK,Sg);e=nK.prototype;e.subscribe=function(a,b,c){return this.isDisposed()?0:this.pubSub_.subscribe(a,b,c)}; e.unsubscribe=function(a,b,c){return this.isDisposed()?!1:this.pubSub_.unsubscribe(a,b,c)}; e.unsubscribeByKey=function(a){return this.isDisposed()?!1:this.pubSub_.unsubscribeByKey(a)}; e.publish=function(a,b){return this.isDisposed()?!1:this.pubSub_.publish.apply(this.pubSub_,arguments)}; e.subscribeAll=function(a,b){for(var c in a)this.subscribe(c,a[c],b)}; e.unsubscribeAll=function(a,b){for(var c in a)this.unsubscribe(c,a[c],b)}; e.getPubSub=function(){return this.pubSub_};function oK(a){nK.call(this);this.logName_=a;this.screens=[]} v(oK,nK);oK.prototype.getScreens=function(){return this.screens}; oK.prototype.contains=function(a){return!!eOa(this.screens,a)}; oK.prototype.get=function(a){return a?mK(this.screens,a):null}; var fOa=function(a,b){var c=a.get(b.uuid)||a.get(b.id);if(c)return a=c.name,c.id=b.id||c.id,c.name=b.name,c.token=b.token,c.uuid=b.uuid||c.uuid,c.name!=a;a.screens.push(b);return!0},gOa=function(a,b){var c=a.screens.length!=b.length; a.screens=eb(a.screens,function(g){return!!eOa(b,g)}); for(var d=0,f=b.length;d=jOa.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(a=jOa[this.pollIndex_],this.timer_=sk(Ta(this.poll_,this),a),this.pollIndex_++):this.publish("pairingFailed",Error("Server error "+a.status))}; e.onTimeout_=function(){this.xhr_=null;this.publish("pairingFailed",Error("Server not responding"))}; var jOa=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];var qK=function(a,b,c){var d=c&&0d&&rb(c,-(d+1),0,b)}a=nOa(a);if(0==a.length)try{wl("remote_sid")}catch(f){}else try{ul("remote_sid",a.join(","),-1)}catch(f){}},uK=function(){var a=rK("yt-remote-connected-devices")||[]; tb(a);return a},nOa=function(a){if(0==a.length)return[]; var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return fb(a,function(d,f){return 0==f?d:d.substring(c.length)})},pOa=function(a){qK("yt-remote-connected-devices",a,86400)},vK=function(){if(qOa)return qOa; var a=rK("yt-remote-device-id");a||(a=cOa(),qK("yt-remote-device-id",a,31536E3));for(var b=uK(),c=1,d=a;mb(b,d);)c++,d=a+"#"+c;return qOa=d},rOa=function(){return rK("yt-remote-session-browser-channel")},mOa=function(){return rK("yt-remote-session-screen-id")},uOa=function(a){5d?c(f):a.checkScreenAvailabilityTimeoutKey_=sk(function(){QOa(a,b,c,d-1)},300)})}; GK.prototype.getCastSession=function(){return this.session_}; GK.prototype.onSessionUpdate_=function(a){this.isDisposed()||a||(this.warn("Cast session died."),this.onSessionStopped())}; var KOa=function(a){uk(a.getScreenTimeoutKey_);a.getScreenTimeoutKey_=0;uk(a.checkScreenAvailabilityTimeoutKey_);a.checkScreenAvailabilityTimeoutKey_=0;uk(a.sessionStatusTimeoutKey_);a.sessionStatusTimeoutKey_=0;uk(a.onLoungeTokenTimeoutKey_);a.onLoungeTokenTimeoutKey_=0;uk(a.getLoungeTokenTimeoutKey_);a.getLoungeTokenTimeoutKey_=0};var HK=function(a,b,c){EK.call(this,a,b,"DialSession");this.session_=this.launchData_=null;this.reversePairingCode_="";this.theme_=c;this.connectData_=null;this.deferredLaunch_=Ka;this.deferredLaunchDeadlineTimer_=NaN;this.boundSessionUpdate_=Ta(this.onSessionUpdate_,this);this.cancelPolling_=Ka}; p(HK,EK);HK.prototype.setCastSession=function(a){this.session_=a;this.session_.addUpdateListener(this.boundSessionUpdate_)}; HK.prototype.launchWithParams=function(a){this.connectData_=a;this.deferredLaunch_()}; HK.prototype.stop=function(){this.cancelPolling_();this.cancelPolling_=Ka;uk(this.deferredLaunchDeadlineTimer_);if(this.session_)this.session_.stop(Ta(this.onSessionStopped,this,null),Ta(this.onSessionStopped,this,"Failed to stop DIAL device."));else this.onSessionStopped()}; HK.prototype.disposeInternal=function(){this.cancelPolling_();this.cancelPolling_=Ka;uk(this.deferredLaunchDeadlineTimer_);this.session_&&this.session_.removeUpdateListener(this.boundSessionUpdate_);this.session_=null;EK.prototype.disposeInternal.call(this)}; var SOa=function(a){a.cancelPolling_=a.screenService_.getScreenByPollingPairingCode(a.reversePairingCode_,a.receiver_.label,a.receiver_.friendlyName,Ta(function(b){this.cancelPolling_=Ka;FK(this,b)},a),Ta(function(b){this.cancelPolling_=Ka; this.onSessionStopped(b)},a))}; HK.prototype.onSessionUpdate_=function(a){this.isDisposed()||a||(this.warn("DIAL session died."),this.cancelPolling_(),this.cancelPolling_=Ka,this.onSessionStopped())}; var TOa=function(a){var b={};b.pairingCode=a.reversePairingCode_;b.theme=a.theme_;xOa()&&(b.env_useStageMdx=1);return Id(b)}; HK.prototype.initReversePairingPromise_=function(a){this.reversePairingCode_=cOa();if(this.connectData_){var b=new chrome.cast.DialLaunchResponse(!0,TOa(this));a(b);SOa(this)}else this.deferredLaunch_=Ta(function(){uk(this.deferredLaunchDeadlineTimer_);this.deferredLaunch_=Ka;this.deferredLaunchDeadlineTimer_=NaN;var c=new chrome.cast.DialLaunchResponse(!0,TOa(this));a(c);SOa(this)},this),this.deferredLaunchDeadlineTimer_=sk(Ta(function(){this.deferredLaunch_()},this),100)}; HK.prototype.initScreenLookupPromise_=function(a,b,c){EOa(this.screenService_,this.launchData_.receiver.label,a,this.receiver_.friendlyName,Ta(function(d){d&&d.token?(FK(this,d),b(new chrome.cast.DialLaunchResponse(!1))):this.initReversePairingPromise_(b,c)},this),Ta(function(d){this.warn("Failed to get DIAL screen: "+d); this.initReversePairingPromise_(b,c)},this))};var IK=function(a,b){EK.call(this,a,b,"ManualSession");this.deferredLaunchDeadlineTimer_=sk(Ta(this.launchWithParams,this,null),150)}; p(IK,EK);IK.prototype.stop=function(){this.onSessionStopped()}; IK.prototype.setCastSession=function(){}; IK.prototype.launchWithParams=function(){uk(this.deferredLaunchDeadlineTimer_);this.deferredLaunchDeadlineTimer_=NaN;var a=mK(this.screenService_.getScreens(),this.receiver_.label);if(a)FK(this,a);else this.onSessionStopped(Error("No such screen"))}; IK.prototype.disposeInternal=function(){uk(this.deferredLaunchDeadlineTimer_);this.deferredLaunchDeadlineTimer_=NaN;EK.prototype.disposeInternal.call(this)};var JK=function(a,b){nK.call(this);this.config_=b;this.screenService_=a;this.appId_=b.appId||"233637DE";this.theme_=b.theme||"cl";this.disableDial_=b.disableCastApi||!1;this.launchParams_=this.session_=null;this.hasCastReceiver_=!1;this.customReceivers_=[];this.boundReceiverActionListener_=Ta(this.onReceiverAction_,this)}; p(JK,nK); JK.prototype.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.appId_);this.disableDial_||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;a=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var f=Ta(this.onReceiverUpdated_,this);c=new chrome.cast.ApiConfig(c,Ta(this.onSessionEstablished_,this),f,d,a);c.customDialLaunchCallback=Ta(this.onDialLaunchRequested_,this); chrome.cast.initialize(c,Ta(function(){this.isDisposed()||(chrome.cast.addReceiverActionListener(this.boundReceiverActionListener_),TNa(),this.screenService_.subscribe("onlineScreenChange",Ta(this.onScreenChange_,this)),this.customReceivers_=UOa(this),chrome.cast.setCustomReceivers(this.customReceivers_,Ka,Ta(function(g){this.warn_("Failed to set initial custom receivers: "+tj(g))},this)),this.publish("yt-remote-cast2-availability-change",KK(this)),b(!0))},this),Ta(function(g){this.warn_("Failed to initialize API: "+ tj(g)); b(!1)},this))}; JK.prototype.setConnectedScreenStatus=function(a,b){this.info_("Setting connected screen ID: "+a+" -> "+b);if(this.session_){var c=this.session_.getScreen();if(!a||c&&c.id!=a)this.info_("Unsetting old screen status: "+this.session_.receiver_.friendlyName),LK(this,null)}if(a&&b){if(!this.session_){c=mK(this.screenService_.getScreens(),a);if(!c){this.info_("setConnectedScreenStatus: Unknown screen.");return}if("shortLived"==c.idType){this.info_("setConnectedScreenStatus: Screen with id type to be short lived."); return}a=VOa(this,c);a||(this.info_("setConnectedScreenStatus: Connected receiver not custom..."),a=new chrome.cast.Receiver(c.uuid?c.uuid:c.id,c.name),a.receiverType=chrome.cast.ReceiverType.CUSTOM,this.customReceivers_.push(a),chrome.cast.setCustomReceivers(this.customReceivers_,Ka,Ta(function(d){this.warn_("Failed to set initial custom receivers: "+tj(d))},this))); this.info_("setConnectedScreenStatus: new active receiver: "+a.friendlyName);LK(this,new IK(this.screenService_,a),!0)}this.session_.setDisplayStatus(b)}else this.info_("setConnectedScreenStatus: no screen.")}; var VOa=function(a,b){return b?kb(a.customReceivers_,function(c){return kK(b,c.label)},a):null}; e=JK.prototype;e.setLaunchParams=function(a){this.isDisposed()?this.warn_("Setting connection data on disposed cast v2"):this.session_?this.session_.launchWithParams(a):this.warn_("Setting connection data without a session")}; e.stopSession=function(){this.isDisposed()?this.warn_("Stopping session on disposed cast v2"):this.session_?(this.session_.stop(),LK(this,null)):this.info_("Stopping non-existing session")}; e.handleBrowserChannelAuthError=function(){this.session_?this.session_.handleBrowserChannelAuthError():this.warn_("handleBrowserChannelAuthError for a non-existing session")}; e.requestSession=function(){chrome.cast.requestSession(Ta(this.onSessionEstablished_,this),Ta(this.onSessionRequestFailed_,this))}; e.disposeInternal=function(){this.screenService_.unsubscribe("onlineScreenChange",Ta(this.onScreenChange_,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.boundReceiverActionListener_);var a=UNa,b=Ja("yt.mdx.remote.debug.handlers_");nb(b||[],a);Rg(this.session_);nK.prototype.disposeInternal.call(this)}; e.info_=function(a){iK("Controller",a)}; e.warn_=function(a){iK("Controller",a)}; var UNa=function(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)},KK=function(a){return a.hasCastReceiver_||!!a.customReceivers_.length||!!a.session_},LK=function(a,b,c){b!=a.session_&&(Rg(a.session_),(a.session_=b)?(c?a.publish("yt-remote-cast2-receiver-resumed",b.receiver_):a.publish("yt-remote-cast2-receiver-selected",b.receiver_),b.subscribe("sessionScreen",Ta(a.onSessionScreen_,a,b)),b.getScreen()?a.publish("yt-remote-cast2-session-change",b.getScreen()):c&&a.session_.launchWithParams(null)): a.publish("yt-remote-cast2-session-change",null))}; e=JK.prototype;e.onSessionScreen_=function(a,b){this.session_==a&&(b||LK(this,null),this.publish("yt-remote-cast2-session-change",b))}; e.onReceiverAction_=function(a,b){if(!this.isDisposed())if(a)switch(a.friendlyName=chrome.cast.unescape(a.friendlyName),this.info_("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.session_)if(this.session_.receiver_.label!=a.label)this.info_("onReceiverAction_: Stopping active receiver: "+this.session_.receiver_.friendlyName),this.session_.stop();else{this.info_("onReceiverAction_: Casting to active receiver.");this.session_.getScreen()&&this.publish("yt-remote-cast2-session-change", this.session_.getScreen());break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:LK(this,new IK(this.screenService_,a));break;case chrome.cast.ReceiverType.DIAL:LK(this,new HK(this.screenService_,a,this.theme_));break;case chrome.cast.ReceiverType.CAST:LK(this,new GK(this.screenService_,a,this.config_));break;default:this.warn_("Unknown receiver type: "+a.receiverType);}break;case chrome.cast.ReceiverAction.STOP:this.session_&&this.session_.receiver_.label==a.label?this.session_.stop(): this.warn_("Stopping receiver w/o session: "+a.friendlyName);}else this.warn_("onReceiverAction_ called without receiver.")}; e.onDialLaunchRequested_=function(a){if(this.isDisposed())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.warn_("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.session_?this.session_.receiver_:null;if(!c||c.label!=b.label)return this.warn_("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!= chrome.cast.ReceiverType.DIAL){if(this.session_.getScreen())return this.info_("Reselecting dial screen."),this.publish("yt-remote-cast2-session-change",this.session_.getScreen()),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.warn_("Changing CAST intent from \""+c.receiverType+"\" to \"dial\" for "+b.friendlyName);LK(this,new HK(this.screenService_,b,this.theme_))}b=this.session_;b.launchData_=a;return b.launchData_.appState==chrome.cast.DialAppState.RUNNING?new Promise(Ta(b.initScreenLookupPromise_, b,(b.launchData_.extraData||{}).screenId||null)):new Promise(Ta(b.initReversePairingPromise_,b))}; e.onSessionEstablished_=function(a){if(!this.isDisposed()){this.info_("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.session_)if(b.receiverType==chrome.cast.ReceiverType.CAST)this.info_("Got resumed cast session before resumed mdx connection."),b.friendlyName=chrome.cast.unescape(b.friendlyName),LK(this,new GK(this.screenService_,b,this.config_),!0);else{this.warn_("Got non-cast session without previous mdx receiver event, or mdx resume."); return}var c=this.session_.receiver_,d=mK(this.screenService_.getScreens(),c.label);d&&kK(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==chrome.cast.ReceiverType.CAST&&(this.info_("onSessionEstablished_: manual to cast session change "+b.friendlyName),Rg(this.session_),this.session_=new GK(this.screenService_,b,this.config_),this.session_.subscribe("sessionScreen",Ta(this.onSessionScreen_,this,this.session_)),this.session_.launchWithParams(null));this.session_.setCastSession(a)}}}; e.getCastSession=function(){return this.session_?this.session_.getCastSession():null}; e.onSessionRequestFailed_=function(a){this.isDisposed()||(this.warn_("Failed to estabilish a session: "+tj(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&LK(this,null))}; e.onReceiverUpdated_=function(a){this.info_("Receiver availability updated: "+a);if(!this.isDisposed()){var b=KK(this);this.hasCastReceiver_=a==chrome.cast.ReceiverAvailability.AVAILABLE;KK(this)!=b&&this.publish("yt-remote-cast2-availability-change",KK(this))}}; var UOa=function(a){var b=a.screenService_.getOnlineScreens(),c=a.session_&&a.session_.receiver_;a=fb(b,function(d){c&&kK(d,c.label)&&(c=null);var f=d.uuid?d.uuid:d.id,g=VOa(this,d);g?(g.label=f,g.friendlyName=d.name):(g=new chrome.cast.Receiver(f,d.name),g.receiverType=chrome.cast.ReceiverType.CUSTOM);return g},a); c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a}; JK.prototype.onScreenChange_=function(){this.isDisposed()||(this.customReceivers_=UOa(this),this.info_("Updating custom receivers: "+tj(this.customReceivers_)),chrome.cast.setCustomReceivers(this.customReceivers_,Ka,Ta(function(){this.warn_("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",KK(this)))}; JK.prototype.setLaunchParams=JK.prototype.setLaunchParams;JK.prototype.setConnectedScreenStatus=JK.prototype.setConnectedScreenStatus;JK.prototype.stopSession=JK.prototype.stopSession;JK.prototype.getCastSession=JK.prototype.getCastSession;JK.prototype.requestSession=JK.prototype.requestSession;JK.prototype.init=JK.prototype.init;JK.prototype.dispose=JK.prototype.dispose;var bPa=function(a,b,c){c.disableCastApi?MK("Cannot initialize because disabled by Mdx config."):WOa()?XOa(a,c)&&(YOa(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?ZOa(b):(window.__onGCastApiAvailable=function(d,f){d?ZOa(b):(NK("Failed to load cast API: "+f),$Oa(!1),YOa(!1),sK("yt-remote-cast-available"),sK("yt-remote-cast-receiver"),aPa(),b(!1))},c.loadCastApiSetupScript?kJ("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):0<=window.navigator.userAgent.indexOf("Android")&&0<=window.navigator.userAgent.indexOf("Chrome/")&& window.navigator.presentation?Hqa():!window.chrome||!window.navigator.presentation||0<=window.navigator.userAgent.indexOf("Edge")?It():(Gqa(),Ht(Iqa.map(Eqa))))):MK("Cannot initialize because not running Chrome")},aPa=function(){MK("dispose"); var a=OK();a&&a.dispose();Fa("yt.mdx.remote.cloudview.instance_",null,void 0);cPa(!1);gha();hha.length=0},dPa=function(){return!!rK("yt-remote-cast-installed")},ePa=function(){var a=rK("yt-remote-cast-receiver"); return a?a.friendlyName:null},fPa=function(){MK("clearCurrentReceiver"); sK("yt-remote-cast-receiver")},gPa=function(){return dPa()?OK()?OK().getCastSession():(NK("getCastSelector: Cast is not initialized."),null):(NK("getCastSelector: Cast API is not installed!"),null)},PK=function(a,b){hPa()?OK().setConnectedScreenStatus(a,b):NK("setConnectedScreenStatus called before ready.")},WOa=function(){var a=0<=fc.search(/ (CrMo|Chrome|CriOS)\//); return Je||a},XOa=function(a,b){var c=!1; OK()||(a=new JK(a,b),a.subscribe("yt-remote-cast2-availability-change",function(d){qK("yt-remote-cast-available",d);Tk("yt-remote-cast2-availability-change",d)}),a.subscribe("yt-remote-cast2-receiver-selected",function(d){MK("onReceiverSelected: "+d.friendlyName); qK("yt-remote-cast-receiver",d);Tk("yt-remote-cast2-receiver-selected",d)}),a.subscribe("yt-remote-cast2-receiver-resumed",function(d){MK("onReceiverResumed: "+d.friendlyName); qK("yt-remote-cast-receiver",d);Tk("yt-remote-cast2-receiver-resumed",d)}),a.subscribe("yt-remote-cast2-session-change",function(d){MK("onSessionChange: "+lK(d)); d||sK("yt-remote-cast-receiver");Tk("yt-remote-cast2-session-change",d)}),Fa("yt.mdx.remote.cloudview.instance_",a,void 0),c=!0); MK("cloudview.createSingleton_: "+c);return c},OK=function(){return Ja("yt.mdx.remote.cloudview.instance_")},ZOa=function(a){$Oa(!0); YOa(!1);OK().init(!1,function(b){b?(cPa(!0),Sk("yt-remote-cast2-api-ready")):(NK("Failed to initialize cast API."),$Oa(!1),sK("yt-remote-cast-available"),sK("yt-remote-cast-receiver"),aPa());a(b)})},MK=function(a){iK("cloudview",a)},NK=function(a){iK("cloudview",a)},$Oa=function(a){MK("setCastInstalled_ "+a); qK("yt-remote-cast-installed",a)},hPa=function(){return!!Ja("yt.mdx.remote.cloudview.apiReady_")},cPa=function(a){MK("setApiReady_ "+a); Fa("yt.mdx.remote.cloudview.apiReady_",a,void 0)},YOa=function(a){Fa("yt.mdx.remote.cloudview.initializing_",a,void 0)},hha=[];function QK(a){this.index=-1;this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.playerTimeAt_=this.playerTime_=0;this.trackData=null;this.hasNext=this.hasPrevious=!1;this.loadedTime=this.duration_=this.seekableEnd_=this.seekableStart_=0;this.liveIngestionTime_=NaN;this.isLive_=!1;this.reset(a)} var iPa=function(a){a.audioTrackId=null;a.trackData=null;a.playerState=-1;a.hasPrevious=!1;a.hasNext=!1;a.playerTime_=0;a.playerTimeAt_=Wa();a.seekableStart_=0;a.seekableEnd_=0;a.duration_=0;a.loadedTime=0;a.liveIngestionTime_=NaN;a.isLive_=!1},RK=function(a){return 1==a.playerState?(Wa()-a.playerTimeAt_)/1E3:0}; QK.prototype.reset=function(a){this.listId="";this.index=-1;this.videoId="";iPa(this);this.volume=-1;this.muted=!1;a&&(this.index=a.index,this.listId=a.listId,this.videoId=a.videoId,this.playerState=a.playerState,this.volume=a.volume,this.muted=a.muted,this.audioTrackId=a.audioTrackId,this.trackData=a.trackData,this.hasPrevious=a.hasPrevious,this.hasNext=a.hasNext,this.playerTime_=a.playerTime,this.playerTimeAt_=a.playerTimeAt,this.seekableStart_=a.seekableStart,this.seekableEnd_=a.seekableEnd,this.duration_= a.duration,this.loadedTime=a.loadedTime,this.liveIngestionTime_=a.liveIngestionTime,this.isLive_=!isNaN(this.liveIngestionTime_))}; QK.prototype.isAdPlaying=function(){return 1081==this.playerState}; var SK=function(a,b){a.playerTime_=b;a.playerTimeAt_=Wa()}; QK.prototype.setDuration=function(a){this.duration_=isNaN(a)?0:a}; var TK=function(a){switch(a.playerState){case 1:case 1081:return(Wa()-a.playerTimeAt_)/1E3+a.playerTime_;case-1E3:return 0;}return a.playerTime_}; QK.prototype.getSeekableStartTime=function(){return 0=c?c:c-1)-b}):ZK(this,Ua(this.moveVideo,a,b,c))}; e.insertVideo=function(a){this.isReady_()?this.sendMessage_("insertVideo",{videoId:a}):ZK(this,Ua(this.insertVideo,a))}; e.playVideo=function(a,b,c,d,f,g,l){var m=XK(this);c=c||0;var n={videoId:a,currentIndex:c};UK(m,a,c);void 0!==b&&(SK(m,b),n.currentTime=b);void 0!==d&&(n.listId=d);null!=f&&(n.playerParams=f);null!=g&&(n.clickTrackingParams=g);null!=l&&(n.locationInfo=tj(l));this.sendMessage_("setPlaylist",n);d||$K(this,m)}; e.playVideoList=function(a,b){var c=XK(this),d=cb(b,a);b={videoId:a,videoIds:b.join(",")};this.sendMessage_("setPlaylist",b);UK(c,a,d);$K(this,c)}; e.prevVideo=function(a,b){if(this.isReady_()){if(a&&b){var c=XK(this);UK(c,a,b);$K(this,c)}this.sendMessage_("previous")}else ZK(this,Ua(this.prevVideo,a,b))}; e.nextVideo=function(a,b){if(this.isReady_()){if(a&&b){var c=XK(this);UK(c,a,b);$K(this,c)}this.sendMessage_("next")}else ZK(this,Ua(this.nextVideo,a,b))}; e.clearPlaylist=function(){if(this.isReady_()){this.sendMessage_("clearPlaylist");var a=XK(this);a.reset();$K(this,a);this.publish("remotePlayerChange")}else ZK(this,this.clearPlaylist)}; e.dismissAutoplay=function(){this.isReady_()?this.sendMessage_("dismissAutoplay"):ZK(this,this.dismissAutoplay)}; e.setAutoplayEnabled=function(a){this.isReady_()?a?this.sendMessage_("setAutoplayMode",{autoplayMode:"ENABLED"}):this.sendMessage_("setAutoplayMode",{autoplayMode:"DISABLED"}):ZK(this,Ua(this.setAutoplayEnabled,a))}; e.dispose=function(){if(3!=this.state_){var a=this.state_;this.state_=3;this.publish("proxyStateChange",a,this.state_)}nK.prototype.dispose.call(this)}; e.disposeInternal=function(){mPa(this);this.connection_=null;this.actionQueue_.clear();VK(this,null);nK.prototype.disposeInternal.call(this)}; var kPa=function(a){db("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange".split(" "),function(b){this.contextSubscriptions_.push(this.connection_.subscribe(b,Ua(this.onProxyEvent_,b),this))},a)},mPa=function(a){db(a.contextSubscriptions_,function(b){this.connection_.unsubscribeByKey(b)},a); a.contextSubscriptions_.length=0}; WK.prototype.isReady_=function(){return 1==this.getState()}; var ZK=function(a,b){50>a.actionQueue_.getCount()&&a.actionQueue_.enqueue(b)},lPa=function(a,b,c){var d=XK(a); SK(d,c);-1E3!=d.playerState&&(d.playerState=b);$K(a,d)}; WK.prototype.sendMessage_=function(a,b){this.connection_.sendMessage(a,b)}; var $K=function(a,b){mPa(a);a.connection_.setPlayerContextData(jPa(b));kPa(a)}; WK.prototype.setState_=function(a){if((a!=this.state_||2==a)&&3!=this.state_&&0!=a){var b=this.state_;this.state_=a;this.publish("proxyStateChange",b,a);if(1==a)for(;!this.actionQueue_.isEmpty();)this.actionQueue_.dequeue().apply(this);else 3==a&&this.dispose()}}; WK.prototype.onProxyEvent_=function(a,b){this.publish(a,b)}; var VK=function(a,b){a.castSession_&&(a.castSession_.removeUpdateListener(a.boundCastStatusListener_),a.castSession_.removeMediaListener(a.boundCastMediaListener_),a.onCastMediaChange_(null));a.castSession_=b;if(a.castSession_&&(a.info_("Setting cast session: "+a.castSession_.sessionId),a.castSession_.addUpdateListener(a.boundCastStatusListener_),a.castSession_.addMediaListener(a.boundCastMediaListener_),a.castSession_.media.length))a.onCastMediaChange_(a.castSession_.media[0])}; WK.prototype.getCastSession=function(){return this.castSession_}; WK.prototype.onCastStatusUpdate_=function(a){if(!a)this.onCastMediaChange_(null),VK(this,null);else if(this.castSession_.receiver.volume){a=this.castSession_.receiver.volume;var b=XK(this),c=Math.round(100*a.level||0);if(b.volume!=c||b.muted!=a.muted)this.info_("Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=c,b.muted=!!a.muted,$K(this,b)}}; WK.prototype.onCastMediaChange_=function(a){this.info_("Cast media: "+!!a);this.castMedia_&&this.castMedia_.removeUpdateListener(this.boundCastMediaUpdateListener_);if(this.castMedia_=a)this.castMedia_.addUpdateListener(this.boundCastMediaUpdateListener_),nPa(this),this.publish("remotePlayerChange")}; var nPa=function(a){var b=a.castMedia_.media,c=a.castMedia_.customData;if(b&&c){var d=XK(a);b.contentId!=d.videoId&&a.info_("Cast changing video to: "+b.contentId);d.videoId=b.contentId;d.playerState=c.playerState;SK(d,a.castMedia_.getEstimatedTime());$K(a,d)}else a.info_("No cast media video. Ignoring state update.")}; e=WK.prototype;e.onCastMediaUpdate_=function(a){if(a)nPa(this),this.publish("remotePlayerChange");else this.onCastMediaChange_(null)}; e.toggleVideoInfo=function(){this.sendMessage_("sendDebugCommand",{debugCommand:"stats4nerds "})}; e.onCloudviewAvailabilityChange_=function(){var a=gPa();a&&VK(this,a)}; e.info_=function(a){iK("CP",a)}; e.warn_=function(a){iK("CP",a)}; var YK=function(a,b,c){return Ta(function(d){this.warn_("Failed to "+b+" with cast v2 channel. Error code: "+d.code);d.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.warn_("Retrying "+b+" using MDx browser channel."),this.sendMessage_(b,c))},a)};var aL=function(a,b,c){nK.call(this);this.connectTimerId_=NaN;this.reconnecting_=!1;this.idleDisconnectTimerId_=this.clientSetVideoTimerId_=this.playingSyncTimerId_=this.reconnectedCheckScreenTimeout_=NaN;this.listeners_=[];this.autoplayMode_=this.autoplayVideoId_=this.clientVideoId_=this.playerContext_=this.handler_=null;this.http_=a;this.listeners_.push(ok(window,"beforeunload",Ta(this.handleBeforeUnload_,this)));this.connectedDevices_=[];this.playerContext_=new QK;this.currentScreenId_=b.id;this.currentScreenIdType_= b.idType;this.handler_=oPa(this,c);this.handler_.subscribe("handlerOpened",this.onChannelOpened_,this);this.handler_.subscribe("handlerClosed",this.onChannelClosed_,this);this.handler_.subscribe("handlerError",this.onChannelError_,this);this.handler_.subscribe("handlerMessage",this.onChannelMessage_,this);this.handler_.setLoungeToken(b.token);this.subscribe("remoteQueueChange",function(){var d=this.playerContext_.videoId;mOa()&&qK("yt-remote-session-video-id",d)},this)}; p(aL,nK); aL.prototype.connect=function(a,b){if(b){var c=b.listId,d=b.videoId,f=b.playerParams,g=b.clickTrackingParams,l=b.index,m={videoId:d},n=b.currentTime;b=b.locationInfo;void 0!==n&&(m.currentTime=5>=n?0:n);f&&(m.playerParams=f);b&&(m.locationInfo=b);g&&(m.clickTrackingParams=g);c&&(m.listId=c);void 0!==l&&(m.currentIndex=l);c&&(this.playerContext_.listId=c);this.playerContext_.videoId=d;this.playerContext_.index=l||0;this.playerContext_.state=3;SK(this.playerContext_,n);this.autoplayMode_="UNSUPPORTED";bL("Connecting with setPlaylist and params: "+ tj(m));this.handler_.connect({method:"setPlaylist",params:tj(m)},a,rOa())}else bL("Connecting without params"),this.handler_.connect({},a,rOa());pPa(this)}; aL.prototype.setLoungeToken=function(a){this.handler_.setLoungeToken(a)}; aL.prototype.dispose=function(){this.isDisposed()||(this.publish("beforeDispose"),cL(this,3));nK.prototype.dispose.call(this)}; aL.prototype.disposeInternal=function(){qPa(this);rPa(this);sPa(this);uk(this.clientSetVideoTimerId_);this.clientSetVideoTimerId_=NaN;uk(this.idleDisconnectTimerId_);this.idleDisconnectTimerId_=NaN;this.clientVideoId_=null;pk(this.listeners_);this.listeners_.length=0;this.handler_.dispose();nK.prototype.disposeInternal.call(this);this.autoplayMode_=this.autoplayVideoId_=this.connectedDevices_=this.playerContext_=this.handler_=null}; var bL=function(a){iK("conn",a)}; aL.prototype.handleBeforeUnload_=function(){this.disconnect_(2)}; var oPa=function(a,b){return new bK(dK(a.http_,"/bc"),b,!1,function(){return a.getXsrfToken_()},"shortLived"==a.currentScreenIdType_)},cL=function(a,b){a.publish("proxyStateChange",b)},pPa=function(a){a.connectTimerId_=sk(Ta(function(){bL("Connecting timeout"); this.disconnect_(1)},a),2E4)},qPa=function(a){uk(a.connectTimerId_); a.connectTimerId_=NaN},sPa=function(a){uk(a.reconnectedCheckScreenTimeout_); a.reconnectedCheckScreenTimeout_=NaN},tPa=function(a){rPa(a); a.playingSyncTimerId_=sk(Ta(function(){this.sendMessage_("getNowPlaying")},a),2E4)},rPa=function(a){uk(a.playingSyncTimerId_); a.playingSyncTimerId_=NaN}; aL.prototype.isConnected_=function(){var a=this.handler_;return!!a.channel_&&3==a.channel_.getState()&&isNaN(this.connectTimerId_)}; aL.prototype.onChannelOpened_=function(){bL("Channel opened");this.reconnecting_&&(this.reconnecting_=!1,sPa(this),this.reconnectedCheckScreenTimeout_=sk(Ta(function(){bL("Timing out waiting for a screen.");this.disconnect_(1)},this),15E3)); vOa(PNa(this.handler_),this.currentScreenId_)}; aL.prototype.onChannelClosed_=function(){bL("Channel closed");isNaN(this.connectTimerId_)?wK(!0):wK();this.dispose()}; aL.prototype.onChannelError_=function(a,b){wK();isNaN(this.getReconnectTimeout_())?(b&&"shortLived"==this.currentScreenIdType_&&this.publish("browserChannelAuthError",a),bL("Channel error: "+a+" without reconnection"),this.dispose()):(this.reconnecting_=!0,bL("Channel error: "+a+" with reconnection in "+this.getReconnectTimeout_()+" ms"),cL(this,2))}; var vPa=function(a,b){b&&(qPa(a),sPa(a));b==a.isConnected_()?b&&(cL(a,1),a.sendMessage_("getSubtitlesTrack")):b?(a.getOtherConnectedRemoteId_()&&a.playerContext_.reset(),cL(a,1),a.sendMessage_("getNowPlaying"),uPa(a)):a.disconnect_(1)},wPa=function(a,b){var c=b.params.videoId; delete b.params.videoId;c==a.playerContext_.videoId&&(y.isEmpty(b.params)?a.playerContext_.trackData=null:a.playerContext_.trackData=b.params,a.publish("remotePlayerChange"))},xPa=function(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10); a.playerContext_.listId=b.params.listId||a.playerContext_.listId;UK(a.playerContext_,c,d);a.publish("remoteQueueChange")},yPa=function(a,b){b.params=b.params||{}; xPa(a,b);a.onStateChange_(b);a.publish("autoplayDismissed")}; aL.prototype.onStateChange_=function(a){var b=parseInt(a.params.currentTime||a.params.current_time,10);SK(this.playerContext_,isNaN(b)?0:b);b=parseInt(a.params.state,10);b=isNaN(b)?-1:b;-1==b&&-1E3==this.playerContext_.playerState&&(b=-1E3);this.playerContext_.playerState=b;b=Number(a.params.loadedTime);this.playerContext_.loadedTime=isNaN(b)?0:b;this.playerContext_.setDuration(Number(a.params.duration));b=this.playerContext_;var c=Number(a.params.liveIngestionTime);b.liveIngestionTime_=c;b.isLive_= isNaN(c)?!1:!0;b=this.playerContext_;c=Number(a.params.seekableStartTime);a=Number(a.params.seekableEndTime);b.seekableStart_=isNaN(c)?0:c;b.seekableEnd_=isNaN(a)?0:a;1==this.playerContext_.playerState?tPa(this):rPa(this);this.publish("remotePlayerChange")}; aL.prototype.onAdStateChange_=function(a){if(-1E3!=this.playerContext_.playerState){var b=1085;switch(parseInt(a.params.adState,10)){case 1:b=1081;break;case 2:b=1084;break;case 0:b=1083;}this.playerContext_.playerState=b;a=parseInt(a.params.currentTime,10);SK(this.playerContext_,isNaN(a)?0:a);this.publish("remotePlayerChange")}}; var zPa=function(a,b){var c="true"==b.params.muted;a.playerContext_.volume=parseInt(b.params.volume,10);a.playerContext_.muted=c;a.publish("remotePlayerChange")},APa=function(a,b){a.autoplayVideoId_=b.params.videoId; a.publish("nowAutoplaying",parseInt(b.params.timeout,10))},BPa=function(a,b){var c="true"==b.params.hasNext; a.playerContext_.hasPrevious="true"==b.params.hasPrevious;a.playerContext_.hasNext=c;a.publish("previousNextChange")}; e=aL.prototype;e.onChannelMessage_=function(a){a.params?bL("Received: action="+a.action+", params="+tj(a.params)):bL("Received: action="+a.action+" {}");switch(a.action){case"loungeStatus":a=lr(a.params.devices);this.connectedDevices_=fb(a,function(c){return new aK(c)}); a=!!kb(this.connectedDevices_,function(c){return"LOUNGE_SCREEN"==c.type}); vPa(this,a);break;case"loungeScreenDisconnected":Aaa(this.connectedDevices_,function(c){return"LOUNGE_SCREEN"==c.type}); vPa(this,!1);break;case"remoteConnected":var b=new aK(lr(a.params.device));kb(this.connectedDevices_,function(c){return c.equals(b)})||zaa(this.connectedDevices_,b); break;case"remoteDisconnected":b=new aK(lr(a.params.device));Aaa(this.connectedDevices_,function(c){return c.equals(b)}); break;case"gracefulDisconnect":break;case"playlistModified":xPa(this,a);break;case"nowPlaying":yPa(this,a);break;case"onStateChange":this.onStateChange_(a);break;case"onAdStateChange":this.onAdStateChange_(a);break;case"onVolumeChanged":zPa(this,a);break;case"onSubtitlesTrackChanged":wPa(this,a);break;case"nowAutoplaying":APa(this,a);break;case"autoplayDismissed":this.publish("autoplayDismissed");break;case"autoplayUpNext":this.autoplayVideoId_=a.params.videoId||null;this.publish("autoplayUpNext", this.autoplayVideoId_);break;case"onAutoplayModeChanged":this.autoplayMode_=a.params.autoplayMode;this.publish("autoplayModeChange",this.autoplayMode_);"DISABLED"==this.autoplayMode_&&this.publish("autoplayDismissed");break;case"onHasPreviousNextChanged":BPa(this,a);break;case"requestAssistedSignIn":this.publish("assistedSignInRequested",a.params.authCode);break;default:bL("Unrecognized action: "+a.action);}}; e.resetClientVideoId_=function(){if(this.clientVideoId_){var a=this.clientVideoId_;this.clientVideoId_=null;this.playerContext_.videoId!=a&&this.sendMessage_("getNowPlaying")}}; e.getProxyState_=function(){var a=3;this.isDisposed()||(a=0,isNaN(this.getReconnectTimeout_())?this.isConnected_()&&(a=1):a=2);return a}; e.disconnect_=function(a){bL("Disconnecting with "+a);qPa(this);this.publish("beforeDisconnect",a);1==a&&wK();this.handler_.disconnect(a);this.dispose()}; e.getPlayerContextData_=function(){var a=this.playerContext_;this.clientVideoId_&&(a=this.playerContext_.clone(),UK(a,this.clientVideoId_,a.index));return jPa(a)}; e.setPlayerContextData_=function(a){var b=new QK(a);b.videoId&&b.videoId!=this.playerContext_.videoId&&(this.clientVideoId_=b.videoId,uk(this.clientSetVideoTimerId_),this.clientSetVideoTimerId_=sk(Ta(this.resetClientVideoId_,this),5E3));var c=[];this.playerContext_.listId==b.listId&&this.playerContext_.videoId==b.videoId&&this.playerContext_.index==b.index||c.push("remoteQueueChange");this.playerContext_.playerState==b.playerState&&this.playerContext_.volume==b.volume&&this.playerContext_.muted== b.muted&&TK(this.playerContext_)==TK(b)&&tj(this.playerContext_.trackData)==tj(b.trackData)||c.push("remotePlayerChange");this.playerContext_.reset(a);db(c,function(d){this.publish(d)},this)}; e.getOtherConnectedRemoteId_=function(){var a=this.handler_.getDeviceId(),b=kb(this.connectedDevices_,function(c){return"REMOTE_CONTROL"==c.type&&c.id!=a}); return b?b.id:""}; e.getReconnectTimeout_=function(){return this.handler_.getReconnectTimeout()}; e.getAutoplayMode_=function(){return this.autoplayMode_||"UNSUPPORTED"}; e.getAutoplayVideoId_=function(){return this.autoplayVideoId_||""}; e.reconnect_=function(){!isNaN(this.getReconnectTimeout_())&&this.handler_.reconnect()}; var uPa=function(a){uk(a.idleDisconnectTimerId_);a.idleDisconnectTimerId_=sk(Ta(a.disconnect_,a,1),864E5)}; aL.prototype.sendMessage_=function(a,b){b?bL("Sending: action="+a+", params="+tj(b)):bL("Sending: action="+a);this.handler_.sendMessage(a,b)}; aL.prototype.sendMessageWithUserAction_=function(a,b){this.sendMessage_(a,b);uPa(this)}; aL.prototype.getXsrfToken_=function(){var a=vl("SID","")||"",b=vl("SAPISID","")||"",c=vl("__Secure-3PAPISID","")||"";if(!a&&!b&&!c)return"";a=Me(Od(a),2);b=Me(Od(b),2);c=Me(Od(c),2);return Me(Od(a+","+b+","+c),2)}; aL.prototype.subscribe=aL.prototype.subscribe;aL.prototype.unsubscribeByKey=aL.prototype.unsubscribeByKey;aL.prototype.getProxyState=aL.prototype.getProxyState_;aL.prototype.disconnect=aL.prototype.disconnect_;aL.prototype.getPlayerContextData=aL.prototype.getPlayerContextData_;aL.prototype.setPlayerContextData=aL.prototype.setPlayerContextData_;aL.prototype.getOtherConnectedRemoteId=aL.prototype.getOtherConnectedRemoteId_;aL.prototype.getReconnectTimeout=aL.prototype.getReconnectTimeout_; aL.prototype.getAutoplayMode=aL.prototype.getAutoplayMode_;aL.prototype.getAutoplayVideoId=aL.prototype.getAutoplayVideoId_;aL.prototype.reconnect=aL.prototype.reconnect_;aL.prototype.sendMessage=aL.prototype.sendMessageWithUserAction_;aL.prototype.getXsrfToken=aL.prototype.getXsrfToken_;var CPa=function(a){oK.call(this,"ScreenServiceProxy");this.instance_=a;this.subscriptionKeys_=[];this.subscriptionKeys_.push(this.instance_.$_s("screenChange",Ta(this.onScreenChange_,this)));this.subscriptionKeys_.push(this.instance_.$_s("onlineScreenChange",Ta(this.onOnlineScreenChange_,this)))}; p(CPa,oK);e=CPa.prototype;e.getScreens=function(a){return this.instance_.$_gs(a)}; e.getOnlineScreens=function(){return this.instance_.$_gos()}; e.contains=function(a){return!!this.instance_.$_c(a)}; e.get=function(a){return this.instance_.$_g(a)}; e.start=function(){this.instance_.$_st()}; e.add=function(a,b,c){this.instance_.$_a(a,b,c)}; e.remove=function(a,b,c){this.instance_.$_r(a,b,c)}; e.updateName=function(a,b,c,d){this.instance_.$_un(a,b,c,d)}; e.getScreenByPairingCode=function(a,b,c,d){this.instance_.$_gspc(a,b,c,d)}; e.getScreenByPollingPairingCode=function(a,b,c,d,f){return this.instance_.$_gsppc(a,b,c,d,f)}; e.disposeInternal=function(){for(var a=0,b=this.subscriptionKeys_.length;a>>0);function jQa(a,b,c,d){d=void 0===d?!0:d;a="string"===typeof a?bg(document,a):a;var f=iQa+"_"+Ra(a),g=hQa[f];if(g&&d)return kQa(b,c)?g.api.loadVideoByPlayerVars(b.args||null):g.loadNewVideoConfig(b),g.api;g=new oL(a,f,b,c);hQa[f]=g;Sk("player-added",g.api);Zda(g,function(){delete hQa[g.getId()]}); return g.api} function kQa(a,b){return b&&b.serializedExperimentFlags?b.serializedExperimentFlags.includes("web_player_remove_playerproxy=true"):a&&a.args&&a.args.fflags?a.args.fflags.includes("web_player_remove_playerproxy=true"):!1} ;var rL=function(a,b,c){this.actionName=a;this.optionalAction=void 0===b?!1:b;this.args=void 0===c?null:c;this.disableBroadcast=!1;this.returnValue=[]};var sL=new Map,lQa=new Map;function mQa(a,b){var c=Ra(a);sL.has(c)&&xk(Bk,function(){var d=new Pl("Unable to register component, already registered",{name:b.is||b,definition:a});Vm(d,"WARNING")},5E3); sL.set(c,b);lQa.set(b.is,c)} function tL(a){a=Ra(a);return sL.get(a)} function uL(a){a=lQa.get(a);return sL.get(a)} ;function vL(a,b){for(var c in b)b.hasOwnProperty(c)&&(a=Nd(a,c,b[c]));return a} function nQa(a,b,c){b.urlEndpoint&&"TARGET_NEW_WINDOW"==b.urlEndpoint.target?a.target="_blank":c?a.target=c:a.removeAttribute("target")} function wL(a,b,c){c=void 0===c?!1:c;if(!a)return null;if(a.adInfoDialogEndpoint||a.backstageImageUploadEndpoint||a.confirmDialogEndpoint||a.clientActionEndpoint||a.createBackstagePostDialogEndpoint||a.createCommentReplyDialogEndpoint||a.flowEndpoint||a.guideBuilderEndpoint||a.liveChatDialogEndpoint||a.modalEndpoint||a.openPopupAction||a.shareEndpoint||a.shareEntityEndpoint||a.showLiveChatItemEndpoint||a.subscriptionManagerEndpoint||a.unlimitedCreateFamilyEndpoint||a.unlimitedFamilyFlowEndpoint|| a.updateCommentDialogEndpoint||a.updateCommentReplyDialogEndpoint||a.userFeedbackEndpoint||a.videoEditorEndpoint||a.ypcCancelSurveyEndpoint)return b=ek("polymer_report_client_url_requested_rate"),!c&&Math.random()a?this.delay_.start():this.isAnimating_=!1};var EQa=new xl("yt.autonav");var LL=function(){this.autonavState_=tJ.getInstance().getFlag(140)?1:2;this.disabledAutonavPauseReason_=this.autonavPauseReason_=void 0}; LL.prototype.getState=function(){return this.autonavState_}; LL.prototype.pause=function(a){2==this.autonavState_?(this.setState(3),this.autonavPauseReason_=a):1==this.autonavState_&&(this.disabledAutonavPauseReason_=a)}; LL.prototype.unpause=function(){3==this.autonavState_?(this.setState(2),this.autonavPauseReason_=void 0):1==this.autonavState_&&(this.disabledAutonavPauseReason_=void 0)}; LL.prototype.setState=function(a){if(this.autonavState_!=a){this.autonavState_=a;if(3!=a){a=2==a;var b=!tJ.getInstance().getFlag(140);a!==b&&(b=tJ.getInstance(),a||uJ(0,141,!0),uJ(0,140,!a),b.save(),EQa.set("autonav_disabled",!a))}DL.getInstance().triggerOptionalAction("yt-autonav-state-changed-action",this.autonavState_)}}; La(LL);var ML=function(){this.hasRun=!1};function FQa(a,b){a=a&&a.watchEndpointSupportedAuthorizationTokenConfig&&a.watchEndpointSupportedAuthorizationTokenConfig.videoAuthorizationToken&&a.watchEndpointSupportedAuthorizationTokenConfig.videoAuthorizationToken.credentialTransferTokens||[];for(var c=0;ca?"0"+a:""+a;return{thumbnailOverlayTimeStatusRenderer:{text:fM(b?b+":"+(10>c?"0"+c:""+c)+":"+a:c+":"+a),style:"DEFAULT"}}} ;function bRa(a){return{titleText:fM(mL("DOWNLOADS",void 0,"Downloads")),contents:a.map(function(b){var c=b.videoEntity;b={videoId:c.videoId,title:gM(c.title),shortBylineText:gM(b.channelEntity.title),thumbnail:c.thumbnail};c.videoId&&(b.navigationEndpoint=eM(c.videoId));c.lengthSeconds&&(b.thumbnailOverlays=[aRa(c.lengthSeconds)]);return{playlistPanelVideoRenderer:b}}), totalVideos:a.length}} ;function cRa(a){return{contents:[{shelfRenderer:{title:fM(mL("DOWNLOADS",void 0,"Downloads")),icon:{iconType:"OFFLINE_DOWNLOAD"},content:{gridRenderer:{items:a.map(function(b){var c=b.videoEntity,d=b.channelEntity,f=b.status,g=0;var l=0;b=k([b]);for(var m=b.next();!m.done;m=b.next())m=m.value,g+=isNaN(m.totalSize)?0:m.totalSize,l+=isNaN(m.downloadedSize)?0:m.downloadedSize;l=0===g?0:Math.round(100*l/g)/100;var n;g=3===f||2===f;f=2===f?Math.floor(100*l).toString():"0";d={videoId:c.videoId,title:gM(c.title), shortBylineText:gM(d.title),shortViewCountText:g?gM(mL("DOWNLOADING_PERCENT",{percent:f},"Downloading... "+f+"%")):gM(null===(n=c.localizedStrings)||void 0===n?void 0:n.viewCount),thumbnail:c.thumbnail,menu:{menuRenderer:{items:[{menuServiceItemDownloadRenderer:{serviceEndpoint:{offlineVideoEndpoint:{videoId:c.videoId}}}}]}},isDisabled:g};c.videoId&&!g&&(d.navigationEndpoint=eM(c.videoId));c.lengthSeconds&&(d.thumbnailOverlays=[aRa(c.lengthSeconds)]);return{gridVideoRenderer:d}})}}, menu:{menuRenderer:{topLevelButtons:[{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:fM(mL("DOWNLOADS_SETTINGS",void 0,"Downloads Settings")),loggingDirectives:{clientVeSpec:{uiType:21412}},navigationEndpoint:cM("SPaccount_downloads","/account_downloads",6827,"WEB_PAGE_TYPE_SETTINGS")}}]}}}}]}} ;function dRa(a,b){return(a=eRa(a,b))?a.status:0} function fRa(a){return a.localMediaInfo.filter(function(b){return 1===b.status||3===b.status||4===b.status||2===b.status}).filter(function(b){return!!b.videoEntity&&!!b.channelEntity})} function eRa(a,b){if(b)return a.localMediaInfo.find(function(c){return c.videoId===b})} function gRa(a){return a.localMediaInfo.filter(function(b){return 3===b.status||2===b.status})} ;var hRa=function(a){var b=this;this.listId="PPSV";this.updateCallback=a;bM.subscribe(function(){b.updateCallback(b.listId,b.getPlaylistData(),{})})}; hRa.prototype.getPlaylistData=function(){var a=bM.getState().download;a=fRa(a);return bRa(a)};var hM=function(a,b,c,d){d=void 0===d?[]:d;this.playlistNetworkManager=a;this.listId=b;this.updateCallback=c;this.videoIds=d;this.pendingUpdates=[];this.currentIndex=0}; hM.prototype.setCurrentIndex=function(a){this.currentIndex=a}; hM.prototype.setListId=function(a){this.listId=a}; var iRa=function(a,b){a.currentCreateRequest&&a.currentCreateRequest.cancel(b);a.currentUpdateRequest&&a.currentUpdateRequest.cancel(b);a.currentRefreshRequest&&a.currentRefreshRequest.cancel(b)}; hM.prototype.delete=function(){iRa(this,"PROXY DELETED")}; hM.prototype.addVideos=function(a,b,c){var d=this;void 0!==c?this.videoIds.splice.apply(this.videoIds,[c,0].concat(fa(a))):this.videoIds.push.apply(this.videoIds,fa(a));this.listId||this.currentCreateRequest?(a.forEach(function(f,g){f={addedVideoId:f,action:"ACTION_ADD_VIDEO"};c&&(f.addedVideoPosition=c+g);d.pendingUpdates.push(f)}),iM(this)):jRa(this,b.onCreateListCommand)}; var kRa=function(a,b,c,d,f){Faa(a.videoIds,b,c);b>a.currentIndex&&c<=a.currentIndex?a.setCurrentIndex(a.currentIndex+1):b===a.currentIndex?a.setCurrentIndex(c):b=a.currentIndex&&a.setCurrentIndex(a.currentIndex-1);a.pendingUpdates.push({action:"ACTION_MOVE_VIDEO_AFTER",setVideoId:d,movedSetVideoIdPredecessor:f});iM(a)},jRa=function(a,b){iRa(a,"OBSOLETE"); a.currentCreateRequest=lRa(a.playlistNetworkManager,b,a.videoIds);Si(a.currentCreateRequest,function(){a.currentCreateRequest=void 0}).then(function(c){a.setListId(c.playlistId); 0Date.now()-a:!1:!1}; pM.prototype.getPlaylistId=function(){if(!this.storage)return null;var a=null;try{a=this.storage.get(this.playlistStoreKey)}catch(b){}return a}; pM.prototype.getIndex=function(){if(this.storage){try{var a=this.storage.get(this.indexStoreKey)}catch(b){}a=Number(a);if(!isNaN(a))return a}}; pM.prototype.getTimestamp=function(){if(this.storage){try{var a=this.storage.get(this.timeStoreKey)}catch(b){}a=Number(a);if(!isNaN(a))return a}};var FRa=["navigationEndpoint","watchEndpoint","videoId"],GRa=["nextButtonVideo","watchEndpoint","videoId"];function HRa(a){return{mode:"NORMAL",autoplayVideo:a.navigationEndpoint,nextButtonVideo:a.navigationEndpoint}} function IRa(a,b){if(!b||!b.sets)return{sets:[HRa(a)]};var c=b.sets.find(function(g){return"NORMAL"===g.mode}),d=y.unsafeClone(b); if(!c)return d.sets.push(HRa(a)),d;c=y.getValueByKeys.apply(y,[c].concat(fa(GRa)));var f=y.getValueByKeys.apply(y,[a].concat(fa(FRa)));if(c===f)return b;d.sets=d.sets.filter(function(g){return"NORMAL"!==g.mode}); d.sets.push(HRa(a));return d} function qM(a,b){return a.startsWith("TLPQ")?!0:a.startsWith("TLPP")&&"CRQueue"===b.title} function JRa(a){return!!a.playlistPanelVideoRenderer&&!a.playlistPanelVideoRenderer.unplayableText} function KRa(a){return!!a.playlistPanelVideoRenderer&&!!a.playlistPanelVideoRenderer.title} function LRa(a,b){if(b.contents)return(b=b.contents.find(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId===a}))?b.playlistPanelVideoRenderer:void 0} function MRa(a,b){return b.contents?b.contents.findIndex(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId===a}):-1} function NRa(a,b){return b.contents?b.contents.findIndex(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.playlistSetVideoId===a}):-1} function ORa(a,b){a.contents&&-1!==b&&1===a.contents.splice(b,1).length&&void 0!==a.totalVideos&&(--a.totalVideos,delete a.videoCountText)} function rM(a){var b=[];if(!a||!a.contents)return b;a=k(a.contents);for(var c=a.next();!c.done;c=a.next())c=c.value,c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId&&b.push(c.playlistPanelVideoRenderer.videoId);return b} function PRa(a,b,c){if(void 0!==a&&void 0!==b&&void 0!==c)return{runs:[{text:a},{text:" \u2022 "},{text:b+1+" / "+c}]}} function QRa(a){if(a&&a.contents)return(a=a.contents.find(function(b){return!!b.playlistPanelVideoRenderer&&!!b.playlistPanelVideoRenderer.selected})||a.contents[a.currentIndex])?a.playlistPanelVideoRenderer:void 0} function RRa(a,b,c,d,f,g,l){f=void 0===f?!1:f;g=void 0===g?!1:g;l=void 0===l?!1:l;if(a.contents&&0!==a.contents.length){d&&(a.contents=a.contents.filter(d));d=a.contents.length;for(var m=0;mc||(d.videoIds.splice(c,1),c=f.contents.length?void 0:f.contents[b].playlistPanelVideoRenderer,b&&b.videoId=== d.playingVideoId||(b=MRa(d.playingVideoId,c.panel),a.index=-1===b?0:b));a:{b=a.index+1;f=c.panel;if(f.contents&&!(b>=f.contents.length)&&(b=f.contents.slice(b).find(JRa))){b=b.playlistPanelVideoRenderer;break a}b=void 0}b?c.autoplayRenderer=IRa(b,c.autoplayRenderer):d&&d.relatedVideoArgs&&(c.playerData.rvs=d.relatedVideoArgs);d=d?d.playlistIndexOffset:0;a.queueProxy?RRa(c.panel,a.index,d,KRa,!0,!0,!0):RRa(c.panel,a.index,d);c.playerData.playlistPanelRenderer=c.panel;return c}; zM.prototype.activateMiniplayer=function(a,b){var c=this.actionRouter.triggerOptionalAction("yt-miniplayer-active");if(c&&c.length&&c[0])this.actionRouter.triggerOptionalAction("yt-miniplayer-toast-action",a,mL("ADDED_TO_QUEUE",void 0,"Added to queue"));else if(a&&a.navigationEndpoint){YL.getInstance().lockupActivation=!0;c=a.navigationEndpoint;var d=this.pageManager.getPlayerFromWatch();this.actionRouter.triggerOptionalAction("yt-activate-miniplayer-action",d);d=this.actionRouter;var f=d.triggerOptionalAction, g=a.title;b=b?PRa(mL("QUEUE",void 0,"Queue"),0,1):a.longBylineText;f.call(d,"yt-miniplayer-update-header-action",g,b,a.navigationEndpoint);this.actionRouter.triggerOptionalAction("yt-miniplayer-load-endpoint",c,!0);N("kevlar_miniplayer_queue_user_activation")&&(YL.getInstance().userActivation=!0)}}; var BM=function(a,b){a.playlistManager.setAutoplayRenderer(b.autoplayRenderer||null);a.playlistManager.setPlaylistData(b.panel||null);b.playerData&&a.playlistManager.setPlayerPlaybackControlData(b.playerData)};var DM=function(a,b,c,d,f){c=void 0===c?!1:c;d=void 0===d?AM():d;this.hasRun=!1;this.playerPromiseResolver=a;this.playerProvider=b;this.miniplayerActive=c;this.playlistController=d;this.tempData=f}; p(DM,ML);DM.prototype.validate=function(a){var b=!N("kevlar_op_warm_pages")||!this.hasRun;return!(!a.data.player||"watch"!==a.data.page||!b)}; DM.prototype.handle=function(a){a.data.filler||this.miniplayerActive||(Xo("cfg"),DL.getInstance().triggerAction("player-update-pre",a.data.page,a.data.player,a.data.playerResponse));var b=a.endpoint;N("kevlar_playback_associated_queue")&&b&&b.watchEndpoint&&b.watchEndpoint.playlistId&&b.watchEndpoint.videoId&&(b=this.playlistController.getQueueInfo(b.watchEndpoint.playlistId,b.watchEndpoint.videoId))&&a.data.player&&a.data.player.args&&(a.data.player.args.queue_info=b);N("enable_masthead_quartile_ping_fix")&& this.tempData&&this.tempData.adpings&&a.data.player&&a.data.player.args&&(a.data.player.args.adpings=this.tempData.adpings);if(b=this.playerProvider()){try{b.update(a.data.player,b).then(this.playerPromiseResolver.resolve)}catch(c){b?Um(c):Um(Error("Player missing when attempting update from SwfConfigChunkProcessor. el="+(a.data&&a.data.player&&a.data.player.args&&a.data.player.args.el))),this.playerPromiseResolver.resolve()}this.hasRun=!0}else vm(Error("No player to update with swfconfig."))};var EM=function(a,b,c){this.hasRun=!1;this.playerPromiseResolver=a;this.pageRequest=b;this.playlistController=c}; p(EM,ML);EM.prototype.validate=function(a){return!!y.getValueByKeys.apply(y,[a.data].concat(fa(yRa)))}; EM.prototype.handle=function(a){var b=this;this.playerPromiseResolver.promise.then(function(){var c=a.data;var d=y.getValueByKeys.apply(y,[c].concat(fa(sRa))),f=y.getValueByKeys.apply(y,[c].concat(fa(wRa))),g=y.getValueByKeys.apply(y,[c].concat(fa(uRa)));var l=(l=y.getValueByKeys.apply(y,[c].concat(fa(tRa))))?{videoId:l.videoId,thumbnail:l.thumbnail,title:l.title?zL(l.title):void 0,shortBylineText:l.author?zL(l.author):void 0}:void 0;var m=y.getValueByKeys.apply(y,[c].concat(fa(xRa))),n=y.getValueByKeys.apply(y, [c].concat(fa(vRa))),r=!!m||!!n&&!!n.results&&0=c||LM.get(""+a+"-dismissed")?!1:(c=pSa[a])&&!b.eduDisplayedThisLoad_[c.setKey||a]&&(c.titleText&&mL(c.titleText)||c.bodyText&&mL(c.bodyText))?!0:!1;if(!b)return null;b=pSa[a];if(!b)return null;c=b.bodyText?mL(b.bodyText):void 0;var d=b.titleText?mL(b.titleText):void 0;return[{openPopupAction:{popupType:"HINT",position:b.position,popup:{bubbleHintRenderer:{text:d?zL(d):void 0,detailsText:c? zL(c):void 0,style:"BUBBLE_HINT_STYLE_BLUE_TOOLTIP",confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:zL(mL("EDU_GOT_IT")),serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{eduDismissAction:{key:a}}]}}}}}}}},{eduImpressionAction:{key:a}}]}; La(MM);for(var qSa=["WEB_PAGE_TYPE_SETTINGS","red","playlist","labs","ypc-offers"],rSa=[],OM=6;1<=OM;OM--)rSa.push({columnCount:OM,query:1==OM?0:214*OM-4+32,className:"grid-"+OM+"-columns",width:214*OM+"px"});var PM=function(a){this.actionRouter_=a=void 0===a?DL.getInstance():a;this.documentWidth_=document.body.clientWidth;this.currentSnapState_=sSa(this);this.miniGuideVisible_=this.guidePersistentAndVisible_=!1}; PM.prototype.setWidth=function(a){this.documentWidth_=a;tSa(this)}; var sSa=function(a){var b=a.miniGuideVisible_?72:0,c=a.documentWidth_-(a.guidePersistentAndVisible_?240:b);return rSa.find(function(d){return c>d.query})},tSa=function(a){var b=sSa(a); b!=a.currentSnapState_&&(a.currentSnapState_=b,a.actionRouter_.triggerOptionalAction("ytd-update-grid-state-action"))}; La(PM);var QM=new xl("yt-mentions"),RM=function(){this.eduDisplayedThisLoad_=!1}; RM.prototype.dismissEdu=function(){QM.set("edu-dismissed",!0)}; RM.prototype.getEduImpressionCount_=function(){var a=parseInt(QM.get("edu-impressions"),10);return isFinite(a)?a:0}; RM.prototype.recordEduImpression=function(){QM.set("edu-impressions",this.getEduImpressionCount_()+1)}; RM.prototype.maybeGetEduPopup=function(){if(!QM.get("edu-dismissed")&&!this.eduDisplayedThisLoad_){var a=ek("user_mention_suggestions_edu_impression_cap");if(!(a&&this.getEduImpressionCount_()>=a)&&"MENTIONS_EDU_TEXT"in lL){a={openPopupAction:{popupType:"HINT",position:"OPEN_POPUP_POSITION_TOPRIGHT",popup:{bubbleHintRenderer:{detailsText:zL(mL("MENTIONS_EDU_TEXT")),style:"BUBBLE_HINT_STYLE_BLUE_TOOLTIP",confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:zL(mL("EDU_GOT_IT")), serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{signalAction:{signal:"CONFIRM_MENTIONS_EDU"}}]}}}}}}}};if("MENTIONS_EDU_TITLE"in lL){var b=zL(mL("MENTIONS_EDU_TITLE"));b.runs[0].navigationEndpoint={urlEndpoint:{url:"https://support.google.com/youtube/?p=creator_community",target:"TARGET_NEW_WINDOW"}};a.openPopupAction.popup.bubbleHintRenderer.text=b}return[a,{signalAction:{signal:"RECORD_MENTIONS_EDU_IMPRESSION"}}]}}}; La(RM);var uSa=new xl("yt-menu"),vSa=function(){},xSa=function(a,b,c){a="right-click"==b?c.rightClickMenuPopupHint:c.menuPopupHint; if(!(10b?null:a.substr(b+1);a=a.slice(0);var c=["frags"];N("kevlar_hide_pp_url_param")&&c.push("pp");N("kevlar_hide_time_continue_url_param")&&c.push("time_continue");c=k(c);for(var d=c.next();!d.done;d=c.next())d=d.value,a=Md(Dd(a),d);return Dd(a)+(b?"#"+b:"")} function ZSa(a){if(!a)return a;a=a.toLowerCase();a.startsWith("web_page_type_")&&(a=a.slice(14));return a} ;function mN(){var a;if(!N("kevlar_op_page_consent_bump_killswitch")&&!A("ID_TOKEN",void 0)&&!mJ()){var b=vM();if(b=null===(a=null===b||void 0===b?void 0:b.adSignalsInfo)||void 0===a?void 0:a.consentBumpParams){var c={consentHours:b.consentHours};4!==Number(b.consentDay)&&vl("HideTicker","")||(c.consentDay=b.consentDay,c.consentHostnameOverride=b.consentHostnameOverride,c.urlOverride=b.urlOverride);return c}}} var $Sa=/^[a-zA-Z0-9_\-]{11}$/;function aTa(a,b,c){var d={};d.currentUrl=b;d.vis=void 0!==a.vis?a.vis:0;d.splay=!1;b=tJ.getInstance();d.autoCaptionsDefaultOn=b.getFlag(66);b.getFlag(141)?b.getFlag(140)?d.autonavState="STATE_OFF":d.autonavState="STATE_ON":d.autonavState="STATE_NONE";d.html5Preference="HTML5_PREF_WANTS";isNaN(A("STS",void 0))||(d.signatureTimestamp=A("STS",void 0));a.autonav&&(d.autoplay=!0,d.autonav=!0);d.referer=c;d.lactMilliseconds=void 0!==a.lact?a.lact.toString():"-1";return d} ;var bTa=["SPhistory_controls","FEpost_detail"];N("kevlar_warm_settings_killswitch")&&(bTa=[].concat(fa(bTa),["SPaccount_overview","SPaccount_playback"]));var cTa="jct ybp sld rapt cid channel_creation_token force_ad_format ex_ads extra_kw playnext".split(" ").map(function(a){return a+"="}).join("|"),dTa=["/post/"].map(function(a){return""+a}).join("|"),eTa=new RegExp([cTa, dTa].join("|")),nN=function(a,b){this.watchEndpointMap=a;this.innerTubeTransportService=b},oN=function(a,b){var c,d,f,g,l; if(null===(d=null===(c=b.commandMetadata)||void 0===c?void 0:c.webCommandMetadata)||void 0===d||!d.rootVe)return!1;var m=null===(g=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===g?void 0:g.url;if(!m)return!1;var n=gk("kevlar_page_service_url_prefix_carveouts");if(n&&n.length){n=k(n);for(var r=n.next();!r.done;r=n.next())if((r=r.value)&&m.startsWith(r))return!1}if(eTa.test(m))return!1;m=null===(l=b.browseEndpoint)||void 0===l?void 0:l.browseId;if(m&&bTa.includes(m))var u= !1;else if(b.watchEndpoint){if(N("kevlar_op_warm_pages")&&a.watchEndpointMap.watchNext&&a.watchEndpointMap.player){var z;u=b.watchEndpoint?(a=b.watchEndpoint.videoId)&&$Sa.test(a)?(b=null===(z=null===(u=b.commandMetadata)||void 0===u?void 0:u.webCommandMetadata)||void 0===z?void 0:z.url)&&b.includes(a)?!0:!1:!1:!1}else u=!1;}else u=yM(a.innerTubeTransportService,b);return u},fTa=function(a,b){var c=nN.instance,d={},f=document.referrer,g={url:t.location.href},l=lM(vMa); return oM(c.innerTubeTransportService,g,l).then(function(m){m=m.endpoint;var n="unknown",r=ZSa(y.getValueByKeys(m,"commandMetadata","webCommandMetadata","webPageType"));r&&XSa[r]?n=XSa[r]:m.browseEndpoint||m.watchPlaylistEndpoint?n="browse":m.searchEndpoint?n="search":m.watchEndpoint&&(n="watch");"unknown"==n&&ud(Error("Could not resolve page type for endpoint: "+JSON.stringify(m)));return pN(c,m,d,f,n,a,b)})},pN=function(a,b,c,d,f,g,l){var m,n,r,u,z,C,J={rootVe:null===(n=null===(m=b.commandMetadata)|| void 0===m?void 0:m.webCommandMetadata)||void 0===n?void 0:n.rootVe, url:null===(u=null===(r=b.commandMetadata)||void 0===r?void 0:r.webCommandMetadata)||void 0===u?void 0:u.url,endpoint:b,page:f};if(b.watchEndpoint){f={contentPlaybackContext:aTa(c,null===(C=null===(z=b.commandMetadata)||void 0===z?void 0:z.webCommandMetadata)||void 0===C?void 0:C.url,d),consentBumpParams:mN()};c=Mi(void 0);(d=a.watchEndpointMap.player)&&(d=new d().getRequest(b,f))&&(c=oM(a.innerTubeTransportService,d.innerTubeRequest,d.input,void 0,d.config));d=Mi(void 0);var E=a.watchEndpointMap.watchNext; E&&(f=new E().getRequest(b,f))&&(d=oM(a.innerTubeTransportService,f.innerTubeRequest,f.input,void 0,f.config));f=Mi(J);E=Qi();gTa(a,b,f,c,d,g,l,E);return E.promise}if(yM(a.innerTubeTransportService,b)){c={consentBumpParams:mN(),tempData:c,disableCache:c.disableCache};var T=nM(a.innerTubeTransportService,b,c);return T=T.then(function(la){J.response=la;l(T)||g(b,J);return J})}return Mi(J)},hTa=function(a,b,c){var d=window.location.href,f,g; if(!b.watchEndpoint)return Um(new Pl("Non-WatchEndpoint not support for prefetching.",b)),Mi({});d=aTa(c,null===(g=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===g?void 0:g.url,d);var l=mN(),m={},n=c.pbis||0;n&&(m.playbackBeginsInSeconds=n);c.prefetch_reason&&"hc_pbis"===c.prefetch_reason&&(m.prefetchReason="PREFETCH_REASON_HINT_CONFIG_PLAYBACK_BEGINS_IN_SECONDS");c={contentPlaybackContext:d,consentBumpParams:l,prefetchPlaybackContext:m};if(d=a.watchEndpointMap.player)if(c= new d().getRequest(b,c))return oM(a.innerTubeTransportService,c.innerTubeRequest,c.input,void 0,c.config);Um(new Pl("No request builder available to prefetch endpoint.",b));return Mi({})},gTa=function(a,b,c,d,f,g,l,m){Ya(a,function r(){var u,z,C,J; return ya(r,function(E){switch(E.nextAddress){case 1:return q(E,c,2);case 2:u=E.yieldResult;if(l(m.promise))return m.resolve(u),E.return();g(b,u);sa(E,3);return q(E,d,5);case 5:z=E.yieldResult;ta(E,4);break;case 3:return C=ua(E),m.reject(C),E.return();case 4:if(void 0===z)return u.reload=!0,g(b,u),m.resolve(u),E.return();if(l(m.promise))return m.resolve(u),E.return();u.playerResponse=z;g(b,u);sa(E,6);return q(E,f,8);case 8:J=E.yieldResult;ta(E,7);break;case 6:ua(E);case 7:if(void 0===J)return u.response= {responseContext:{}},m.resolve(u),E.return();if(l(m.promise))return m.resolve(u),E.return();u.response=J;g(b,u);m.resolve(u);oa(E);}})})};var qN=function(a){this.networkManager_=a;this.partCallbacks_=[]}; e=qN.prototype; e.getRequest=function(a,b){var c=this,d=this.getParams(b),f=wL(a,d),g=this.getTempData(a,b);g.endpoint=JSON.stringify(a);var l={headers:{"X-YouTube-STS":N("web_player_enable_ipp")?A("STS",void 0):18648,"x-youtube-csoc":1}};rJ(f,g);return new Ki(function(m,n){var r=c.getXhrParams(d),u;N("kevlar_cache_on_ttl_player")&&(u=nN.instance);u&&oN(u,a)?hTa(u,a,g).then(function(z){z?m(z):n()},n):c.networkManager_.requestDataForEndpoint(a,r,c.onPartsCallback_.bind(c),l).then(function(z){z?m(z):n()},n)})}; e.getCacheKeyForEndpoint=function(a){return kN(a,!1)}; e.addPartCallback=function(a){this.partCallbacks_.push(a)}; e.onPartsCallback_=function(a){this.partCallbacks_.forEach(function(b){a&&b(a)})}; e.onRequestCompletes_=function(){};var rN=function(){}; e=rN.prototype;e.onPlaylistNext=function(){}; e.onPlaylistPrevious=function(){}; e.updatePlaylistEventListeners=function(){}; e.setPlayer=function(){}; e.setPlaylistComponent=function(){}; e.setAutoplayRenderer=function(){}; e.setPlaylistData=function(){}; e.setPlayerPlaybackControlData=function(){}; e.skipVideo=function(){}; e.cancelVideoSkip=function(){}; e.getAutoplayEndpoint=function(){}; e.getPlaylistData=function(){};var sN=function(a,b,c,d){qN.call(this,a);this.player_=b;this.autoplayData_=c;this.playlistManager_=d}; p(sN,qN);sN.prototype.getCacheKeyForEndpoint=function(a){return kN(a,!!this.autoplayData_)}; sN.prototype.getTempData=function(a,b){b=b.timeBeforeNextVideo;a={itct:a.clickTrackingParams,lact:Mk(),pbis:b,prefetch_reason:"hc_pbis",vis:this.player_.getVisibilityState()};this.autoplayData_&&(a.autonav=1,N("kevlar_watch_navigation_clear_autoplay_count_session_data")||(b=this.autoplayData_.webAutoplayRendererData&&this.autoplayData_.webAutoplayRendererData.autoplayCount,N("decorate_autoplay_renderer")?a.playnext=jN().count:b&&(a.playnext=b)));return a}; sN.prototype.getXhrParams=function(a){return Object.assign({pbj:"prefetch"},a)}; sN.prototype.getParams=function(a){a={frags:a.fragmentsRequested.join(",")};N("kevlar_droppable_prefetchable_requests")&&(a.prefetch=1);return a};var tN=function(a,b,c){this.player=a;this.taskManager=b;this.prefetchDelay=c;this.completionResolver_=null;this.playerEvents_=[]}; tN.prototype.start=function(){var a=this;this.completionResolver_=Qi();Si(this.completionResolver_.promise,function(){iTa(a);a.completionResolver_=null}); this.prepareTrigger(this.completionResolver_);return this.completionResolver_.promise}; var jTa=function(a,b,c){a.player.addEventListener(b,c);a.playerEvents_.push({eventName:b,callback:c})},iTa=function(a){a.playerEvents_.forEach(function(b){a.player.removeEventListener(b.eventName,b.callback)}); a.playerEvents_.length=0};var uN={watch:{pageFragments:["pl","wn"],prefetchedFragments:["pl"]}},kTa=["playerResponse"];N("kevlar_prefetch_no_swfconfig_killswitch")&&(kTa=["player","playerResponse"]);var lTa={};lTa.pl={requiredKeys:kTa,graftedKeys:["playerResponse"]};lTa.wn={requiredKeys:["response"],graftedKeys:["response"]};var mTa={};mTa.pl={requiredKeys:kTa,graftedKeys:[]};mTa.wn={requiredKeys:["response"],graftedKeys:[]};var nTa={fragmentsRequested:null,timeBeforeNextVideo:null};var vN=function(a){qN.call(this,a)}; p(vN,qN);vN.prototype.getParams=function(){return{}}; vN.prototype.getXhrParams=function(a){return a}; vN.prototype.getTempData=function(a){return{itct:a.clickTrackingParams,lact:Mk()}};var wN=function(){this.endpointCacheKey_=null;this.expireJobId_=0;(this.ENABLE_PBJ_PREFETCH_=N("web_enable_pbj_prefetch"))&&window.addEventListener("unload",this.onUnload_.bind(this))}; wN.prototype.resolve=function(){this.ENABLE_PBJ_PREFETCH_&&this.endpointCacheKey_&&this.end_()}; wN.prototype.end_=function(){this.endpointCacheKey_&&(this.endpointCacheKey_=null);this.expireJobId_&&(Bk.cancelJob(this.expireJobId_),this.expireJobId_=0)}; wN.prototype.getTriggerFromMouseEvent_=function(a){if(!a)return"";var b="";void 0!=a.button&&(b+="-btn"+a.button.toString());a.altKey&&(b+="-alt");a.ctrlKey&&(b+="-ctrl");a.metaKey&&(b+="-meta");a.shiftKey&&(b+="-shift");return b}; wN.prototype.onUnload_=function(){this.end_()}; La(wN);var xN=function(a,b,c){tN.call(this,a,b,c);this.cueId_="playbackTrigger-"+Math.random()}; p(xN,tN);xN.prototype.prepareTrigger=function(a){var b=this,c=this.player.getDuration();var d=0<=this.prefetchDelay?this.prefetchDelay:c+this.prefetchDelay;this.player.addCueRange(this.cueId_,d,c);Si(a.promise,function(){b.player.removeCueRange(b.cueId_)}); jTa(this,"onCueRangeEnter",function(f){f==b.cueId_&&a.resolve(c-d)})}; xN.prototype.getTriggerName=function(){return"playbackTrigger"};var yN=function(a,b,c,d,f,g){var l=this;this.pageFragments_=a;this.prefetchedFragments_=b;this.fragmentConfiguration_=c;this.prefetchedData_=d;this.networkPrefetchRequest_=f;this.completionPromise=g;this.validatedFragments_=[];this.missingFragments_=this.pageFragments_.slice();this.mergedPrefetchedData_=null;oTa(this);this.networkPrefetchRequest_&&this.addPartCallback(function(m){Object.assign(l.prefetchedData_,m);oTa(l)})}; yN.prototype.addPartCallback=function(a){this.networkPrefetchRequest_.addPartCallback(a)}; var pTa=function(a){if(0==a.validatedFragments_.length)return null;if(!a.mergedPrefetchedData_){for(var b=[],c=k(a.validatedFragments_),d=c.next();!d.done;d=c.next()){d=k(a.fragmentConfiguration_[d.value].graftedKeys);for(var f=d.next();!f.done;f=d.next())(f=a.prefetchedData_[f.value].trackingParams)&&b.push(f)}a.mergedPrefetchedData_={};Object.assign(a.mergedPrefetchedData_,a.prefetchedData_,{clientSideGrafts:b})}return a.mergedPrefetchedData_}; yN.prototype.getValidFragments=function(){return this.validatedFragments_}; var oTa=function(a){a.prefetchedFragments_.forEach(function(b){qTa(a,b)})},qTa=function(a,b){a.fragmentConfiguration_[b].requiredKeys.every(function(c){return!!a.prefetchedData_[c]})&&(a.validatedFragments_.push(b),b=a.missingFragments_.indexOf(b),-1!==b&&a.missingFragments_.splice(b,1))};var rTa=function(){},zN=function(a){this.playlistManager_=a}; p(zN,rTa);zN.prototype.getPrefetchEndpoint=function(){return this.playlistManager_.getAutoplayEndpoint()}; zN.prototype.getProviderType=function(){return"playlist"}; var AN=function(a){this.autonavEndpoints_=a}; p(AN,rTa);AN.prototype.getPrefetchEndpoint=function(){return this.autonavEndpoints_.length?this.autonavEndpoints_[0]:void 0}; AN.prototype.getProviderType=function(){return"first_next"};var sTa=function(a,b,c,d){this.autonavEndpoints=a;this.foregroundTrigger=b;this.backgroundTrigger=c;this.pageType="watch";this.isInPlaylist=d},tTa=function(a,b){if(a.webPrefetchData&&a.webPrefetchData.navigationEndpoints&&a.webPrefetchData.navigationEndpoints.length){a=a.webPrefetchData.navigationEndpoints; var c=a[0];if(c&&c.watchEndpoint&&c.watchEndpoint.watchEndpointSupportedPrefetchConfig&&c.watchEndpoint.watchEndpointSupportedPrefetchConfig.prefetchHintConfig){var d=c.watchEndpoint.watchEndpointSupportedPrefetchConfig.prefetchHintConfig;c=d.countdownUiRelativeSecondsPrefetchCondition;d=d.playbackRelativeSecondsPrefetchCondition;d="number"===typeof d&&Math.abs(d)c?c:void 0;c="number"!==typeof c||b.inPlaylist?void 0:c;if("number"===typeof c)return new sTa(a, b.makeUpNextTrigger(c),b.makePlaybackTrigger(c),b.inPlaylist);if("number"===typeof d)return new sTa(a,b.makePlaybackTrigger(d),null,b.inPlaylist)}}};var BN=function(a,b,c,d){this.prefetchEndpointProvider_=a;this.prefetchRequestPromise_=this.triggerPromise_=null;this.storePrefetchedDataCallback_=b;this.prefetchJobConfig_=c;this.networkPrefetchRequest_=d;this.prefetchResponseCacheKey_=null}; BN.prototype.enqueue=function(){this.triggerPromise_||(uTa(this,vTa(this)),si(document,"visibilitychange",this.onVisibilityChange_,!1,this))}; var uTa=function(a,b){a.triggerPromise_=b.start();a.triggerPromise_.then(function(c){var d=a.prefetchEndpointProvider_.getPrefetchEndpoint();d&&(a.prefetchRequestPromise_=a.networkPrefetchRequest_.getRequest(d,{fragmentsRequested:uN[a.prefetchJobConfig_.pageType].prefetchedFragments,timeBeforeNextVideo:c}),a.prefetchResponseCacheKey_=a.networkPrefetchRequest_.getCacheKeyForEndpoint(d),wTa(a),a.prefetchRequestPromise_.then(function(f){a.storePrefetchedDataCallback_(a.prefetchResponseCacheKey_,f)}))})}; BN.prototype.resolve=function(){this.cancel()}; BN.prototype.cancel=function(){this.triggerPromise_&&this.triggerPromise_.cancel("Prefetch job cancelled, trigger promise cancelled.");this.prefetchRequestPromise_&&this.prefetchRequestPromise_.cancel("Prefetch job cancelled, request promise cancelled.");wTa(this)}; BN.prototype.onVisibilityChange_=function(){var a=this;0==Qo()?this.triggerPromise_&&(Ti(this.triggerPromise_,function(){a.triggerPromise_=null}),this.triggerPromise_.cancel("Visibility changed to background, trigger promise cancelled.")):this.triggerPromise_||uTa(this,vTa(this))}; var wTa=function(a){vi(document,"visibilitychange",a.onVisibilityChange_,!1,a)},vTa=function(a){return a.prefetchJobConfig_.backgroundTrigger?0==Qo()?a.prefetchJobConfig_.backgroundTrigger:a.prefetchJobConfig_.foregroundTrigger:a.prefetchJobConfig_.foregroundTrigger}; BN.prototype.doesEndpointKeyMatchRequestKey_=function(a){return a?a==this.prefetchResponseCacheKey_:!1};var CN=function(a,b,c){tN.call(this,a,b,c)}; p(CN,tN);CN.prototype.prepareTrigger=function(a){var b=this;jTa(this,"onAutonavCoundownStarted",function(c){xTa(b,c,a)})}; var xTa=function(a,b,c){var d=1E3*a.prefetchDelay;if(Math.abs(d)>b)c.promise.cancel("Not enough time to prefetch, cancelling prefetch job");else{var f=d,g=b-d;0>d&&(f=b+d,g=Math.abs(d));var l=a.taskManager.addJob(function(){c.resolve(g/1E3)},10,f); Ti(c.promise,function(){a.taskManager.cancelJob(l)})}}; CN.prototype.getTriggerName=function(){return"upNextTrigger"};var DN=function(){this.prefetchCache_=new Map;this.pendingPrefetchJob_=null},zTa=function(a,b,c,d,f,g){var l=Bk,m=LL.getInstance(); if(!N("block_all_player_prefetch_requests")){yTa(a);var n=!!c.getPlaylistId();if((n||2==m.getState())&&!c.getVideoData().isLive){m={inPlaylist:n,videoDuration:c.getDuration(),makeUpNextTrigger:function(u){return new CN(c,l,u)}, makePlaybackTrigger:function(u){return new xN(c,l,u)}}; var r=tTa(b,m);r&&(a.pendingPrefetchJob_=new BN(r.isInPlaylist?new zN(f):new AN(r.autonavEndpoints),function(u,z){z=new yN(uN[r.pageType].pageFragments,uN[r.pageType].prefetchedFragments,lTa,z);return pTa(z)?(a.prefetchCache_.set(u,z),!0):!1},r,new sN(d,c,g,f)),a.pendingPrefetchJob_.enqueue())}}},ATa=function(a,b,c){if(b.watchEndpoint)return a.prefetchCache_.get(kN(b,c))},yTa=function(a){a.pendingPrefetchJob_&&(a.pendingPrefetchJob_.cancel(),a.pendingPrefetchJob_=null)}; La(DN);var EN=pE(function(a){var b=og("DIV");a&&(b.className=a);b.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px";a=og("DIV");xh(a,"200px","200px");b.appendChild(a);document.body.appendChild(b);a=b.offsetWidth-b.clientWidth;tg(b);return a});function BTa(a,b,c){c=void 0===c?!1:c;var d=Math.max(a.width,474);if(N("kevlar_watch_feed_big_thumbs")&&a.width>=1550-EN()&&800<=a.height)d=!FN(b)||1550<=a.width?d-432:d-382,FN(b)&&(d-=EN());else if(1E3<=a.width){var f=474;1140>=a.width&&FN(b)?f=357:N("kevlar_watch_feed_big_thumbs")&&(f=382);d-=f;FN(b)&&(d-=EN())}else d-=48;d=Math.min(d,1280);var g=d*b;f=240;c&&(f=380);if(!(.5624>b)){var l=1327;N("kevlar_watch_split_pane")&&(l+=EN());630>a.height&&657<=a.width||630<=a.height&&1E3<=a.width&&a.width< l?f=360:630<=a.height&&a.width>=l&&(f=480)}g=Math.min(g,a.height-216);g=Math.max(g,f);1>b?d=g/b:1E3<=a.width&&(d=BTa(a,.5625,c).width);return new Yf(Math.round(d),Math.round(g))} function FN(a){return N("kevlar_watch_split_pane")&&!(.5624>a)} ;var CTa=[{query:window.matchMedia("(max-width: 656px)"),size:new Yf(426,240)},{query:window.matchMedia("(max-width: 856px)"),size:new Yf(640,360)},{query:window.matchMedia("(max-width: 999px)"),size:new Yf(854,480)},{query:window.matchMedia("(min-width: 1720px) and (min-height: 980px)"),size:new Yf(1280,720)},{query:window.matchMedia("(min-width: 1294px) and (min-height: 630px)"),size:new Yf(854,480)},{query:window.matchMedia("(min-width: 1000px)"),size:new Yf(640,360)}];function DTa(a){var b=new jE(A("ONE_PICK_URL",""));b.urlParamMap_.set("hostId",a);(a=A("GAPI_LOCALE"))&&b.setLocale(a);(a=A("SESSION_INDEX"))&&b.setAuthUser(a);(a=A("DELEGATED_SESSION_ID"))&&b.urlParamMap_.set("groupId",a);return b} ;function ETa(){var a=uL("yt-network-manager");return new CRa(a)} var FTa=function(a){var b=this;var c=void 0===c?ETa():c;var d=void 0===d?uL("yt-navigation-manager"):d;this.onePickCommand=a;this.playlistNetworkManager=c;this.navigationManager=d;this.videoPickerBuilder=DTa("yt-addtoplaylist");XBa(this.videoPickerBuilder.setTitle(a.modalTitle).setSize(1E3).addView(new hD().setSite("youtube.com")).addView(new gD().setType("video").setSite("youtube.com")),"multiselectEnabled").addView("youtube").setSecretToken(a.onePickToken).setSelectButtonLabel(a.selectButtonLabel).setDisposeOnHide().setCallback(function(f){b.handleAction(f)})}; FTa.prototype.show=function(){this.videoPickerBuilder.build().setVisible(!0)}; FTa.prototype.handleAction=function(a){var b=this;if(a&&this.onePickCommand.listId&&"picked"===a.action&&a.docs){var c=[];a.docs.forEach(function(d){c.push({addedVideoId:d.id,action:"ACTION_ADD_VIDEO"})}); this.playlistNetworkManager.updatePlaylist(this.onePickCommand.listId,c).then(function(){b.navigationManager.reload()})}};var GN=function(){}; GN.prototype.enqueue=function(){if(this.isCounterfactual()){var a=this.getCounterfactualData();a&&this.sendImpressionEndpoints_(a)}else this.doEnqueue()}; GN.prototype.sendImpressionEndpoints_=function(a){DL.getInstance().triggerOptionalAction("yt-service-request",{},a[0])};var HN=function(a,b){this.renderer_=a;this.page_=b;this.resolver_=Qi()}; p(HN,GN);HN.prototype.cancel=function(){this.resolver_.promise.cancel()}; HN.prototype.getCounterfactualData=function(){return this.renderer_.impressionEndpoints}; HN.prototype.isCounterfactual=function(){return!this.renderer_.isVisible}; HN.prototype.doEnqueue=function(){var a=this;this.resolver_.promise.then(function(){var c={popup:{mealbarPromoRenderer:a.renderer_},popupType:"MEALBAR"};DL.getInstance().triggerOptionalAction("yt-open-popup-action",{openPopupAction:c},{})}); switch(this.renderer_.triggerCondition){case"TRIGGER_CONDITION_POST_AD":if(this.page_){var b=$M(this.page_);b&>a(this.resolver_,b)}break;default:this.resolver_.resolve();}}; var GTa=function(a,b){var c=Qi();b.getPlayerPromise().then(function(d){c.resolve(d)}); c.promise.then(function(d){d.addEventListener("onAdEnd",a.resolve);Si(a.promise,function(){d.removeEventListener("onAdEnd",a.resolve)})}); Ti(a.promise,function(){c.promise.cancel()})};var IN=function(){}; IN.prototype.markDirty=function(){}; IN.prototype.isNodeVisible=function(){}; IN.prototype.reset=function(){};var HTa=["browse-video-menu-button","unified-verified-badge"],JN=function(a){this.actionRouter_=a=void 0===a?DL.getInstance():a;this.targetMap_=new Map;this.visibilityMonitor_=null;this.triggeredTargets_=new Set},ITa=function(a){var b=JN.getInstance(); b.visibilityMonitor_=a;si(b.visibilityMonitor_,"yt-visibility-monitor-refreshed",b.handleVisibilityRefreshed_,!1,b)}; JN.prototype.dispose=function(){this.visibilityMonitor_&&vi(this.visibilityMonitor_,"yt-visibility-monitor-refreshed",this.handleVisibilityRefreshed_,!1,this)}; JN.prototype.handleVisibilityRefreshed_=function(){var a=this;this.targetMap_.forEach(function(b,c){JTa(a,c,b)})}; var LTa=function(a,b){var c=JN.getInstance(),d=KTa(c,a);d.element=b;JTa(c,a,d)},JTa=function(a,b,c){var d=c.action; (c=c.element)&&d&&(HTa.includes(b)||a.visibilityMonitor_&&a.visibilityMonitor_.isNodeVisible(c)||"WEB_REMIX"===A("INNERTUBE_CLIENT_NAME"))&&(EL(a.actionRouter_,[d],c),a.targetMap_.delete(b),a.triggeredTargets_.add(b))},KTa=function(a,b){a.targetMap_.get(b)||a.targetMap_.set(b,{}); return a.targetMap_.get(b)}; La(JN);var KN=function(a,b){this.renderer_=a;this.page_=b}; p(KN,GN);KN.prototype.getCounterfactualData=function(){return this.renderer_.impressionEndpoints}; KN.prototype.isCounterfactual=function(){return!this.renderer_.isVisible}; KN.prototype.doEnqueue=function(){var a={popup:{upsellDialogRenderer:this.renderer_},popupType:"MODAL"};DL.getInstance().triggerOptionalAction("yt-open-popup-action",{openPopupAction:a},{});this.page_&&(a=$M(this.page_))&&a.stop()};var LN={},MTa=(LN.TOOLTIP_POSITION_TYPE_BELOW="OPEN_POPUP_POSITION_BOTTOM",LN.TOOLTIP_POSITION_TYPE_START="OPEN_POPUP_POSITION_LEFT",LN.TOOLTIP_POSITION_TYPE_END="OPEN_POPUP_POSITION_RIGHT",LN.TOOLTIP_POSITION_TYPE_BELOW_START="OPEN_POPUP_POSITION_BOTTOMLEFT",LN.TOOLTIP_POSITION_TYPE_BELOW_END="OPEN_POPUP_POSITION_BOTTOMRIGHT",LN.TOOLTIP_POSITION_TYPE_ABOVE_START="OPEN_POPUP_POSITION_TOPLEFT",LN.TOOLTIP_POSITION_TYPE_ABOVE_END="OPEN_POPUP_POSITION_TOPRIGHT",LN),MN=function(a,b){this.renderer_=a;this.promotionsTargetManager_= b}; p(MN,GN);MN.prototype.getCounterfactualData=function(){if(this.isCounterfactual())return this.renderer_.promoConfig.impressionEndpoints}; MN.prototype.isCounterfactual=function(){return!(!this.renderer_.promoConfig||!this.renderer_.promoConfig.isCounterfactual)}; MN.prototype.doEnqueue=function(){if(this.renderer_.targetId){var a;this.renderer_.suggestedPosition&&this.renderer_.suggestedPosition.type&&(a=MTa[this.renderer_.suggestedPosition.type]);a||(a="OPEN_POPUP_POSITION_BOTTOM");a={openPopupAction:{popup:{tooltipRenderer:this.renderer_},popupType:"HINT",position:a}};var b=this.promotionsTargetManager_,c=this.renderer_.targetId;if(!b.triggeredTargets_.has(c)){var d=KTa(b,c);d.action=a;JTa(b,c,d)}}};function NTa(a){if(a.playerResponse){if(a=a.playerResponse,a.messages&&0=Math.min(b,c)&&a<=d?a:c}; UTa.prototype.axis=function(a){a=this.direction(a);return"up"===a||"down"===a?"Y":"X"};function VTa(a){if(!a||0===a.size)return Hammer.DIRECTION_ALL;if(1===a.size){if(a.has("up"))return Hammer.DIRECTION_UP;if(a.has("down"))return Hammer.DIRECTION_DOWN;if(a.has("right"))return Hammer.DIRECTION_RIGHT;if(a.has("left"))return Hammer.DIRECTION_LEFT}return Hammer.DIRECTION_ALL} var WTa=function(){this.hammerFn=IDa();this.screenManager=OL();this.lastPinchTime=NaN;this.nodeManagerMapping=new Map;N("kevlar_touch_gesture_ves")&&this.screenManager&&(this.ve=Jn(83615),TL(this.screenManager,this.ve))},XTa,PN=function(){XTa||(XTa=new WTa); return XTa}; WTa.prototype.registerTouchEvents=function(a,b,c){for(var d=[],f=2;fDate.now()-a.lastPinchTime)return;"mouse"!==f.pointerType&&(f="doubletap"===d?{coordinates:f.center}:d.includes("pan")?{deltaY:f.deltaY,distance:f.distance,direction:f.direction,velocityY:f.velocityY}:d.includes("swipe")?{target:f.target}:{},b.dispatchEvent(new CustomEvent(d,{bubbles:!0,composed:!0,detail:f})))})}; WTa.prototype.unregisterTouchEvents=function(a,b){for(var c=[],d=1;dJ)u||(r?(m=ON(g.input,l)+g.config.startPosition,l=m+70,g.element.animate([{transform:"translateY("+m+"px)",opacity:""===g.element.style.opacity?1:g.element.style.opacity}, {transform:"translateY("+l+"px)",opacity:0}],{duration:400,easing:"cubic-bezier(.05, 0, 0, 1)"}),g.element.style.transform="translateY("+l+"px)",g.element.style.opacity="0"):(l=ON(g.input,l)+g.config.startPosition,m=m.endPosition,g.element.animate([{transform:"translateY("+l+"px)"},{transform:"translateY("+m+"px)"}],{duration:400,easing:"cubic-bezier(.05, 0, 0, 1)"}),g.element.style.transform="translateY("+m+"px)")),n&&n();g.reset()}}; a=Object.keys(c.triggers);this.directions=new Set(a)}; p(SN,QN);SN.prototype.reset=function(){this.element.style.transform="";this.element.style.opacity="";this.config.resetAction&&this.config.resetAction()}; var ZTa=function(a,b){b=a.input.direction(b);return a.config.triggers[b]}; SN.prototype.move=function(a,b){var c=this;this.animationRequestId||(this.animationRequestId=requestAnimationFrame(function(){var d=c.input.axis(a),f=c.input.position(a,c.config.startPosition,b.endPosition);c.element.style.transform="translate"+d+"("+f+"px)";c.animationRequestId=void 0}))}; var $Ta=function(a,b,c){c=Math.abs(a.config.startPosition-c.endPosition);return Math.min(a.input.distance(b),c)/c}; SN.prototype.fade=function(a,b){var c=b.endOpacity;a=$Ta(this,a,b);0=b+a?(aUa.set("last-user-engagement-exp-trigger-timestamp",Vk()),!0):!1} ;var cUa=function(a,b){this.playerProvider_=a;this.actionSenderElement_=b;this.pausePlaybackJob_=this.showBlockingWarningJob_=this.showWarningJob_=0;this.youThereData_=null;this.ignoreFullscreenExitUserActivity_=this.isUserPredictedAbsent_=!1;this.clientPlaybackNonce_=null;this.inYouThereFlow_=!1}; cUa.prototype.reset=function(){dUa(this);this.isUserPredictedAbsent_=!1}; var dUa=function(a,b){!a.youThereData_||a.showWarningJob_||void 0!==b&&b||($J("YOU_THERE_EVENT_TYPE_NAVIGATED_OUT",On(),a.youThereData_,a.clientPlaybackNonce_),cl());Bk.cancelJob(a.showWarningJob_);a.showWarningJob_=0;Bk.cancelJob(a.showBlockingWarningJob_);a.showBlockingWarningJob_=0;Bk.cancelJob(a.pausePlaybackJob_);a.pausePlaybackJob_=0;a.youThereData_=null;a.clientPlaybackNonce_=null;a.inYouThereFlow_=!1},fUa=function(a,b){var c,d,f; za(function(g){if(1==g.nextAddress)return a.reset(),q(g,a.playerProvider_().getPlayerPromise(),2);c=g.yieldResult;a.clientPlaybackNonce_=c.getVideoData().cpn;a.youThereData_=b.configData.youThereData;if(!a.youThereData_)return g.return();if(a.youThereData_.triggerReason&&"YOU_THERE_TRIGGER_REASON_3"==a.youThereData_.triggerReason&&!bUa())return $J("YOU_THERE_EVENT_TYPE_RATE_LIMITED",On(),a.youThereData_,a.clientPlaybackNonce_),g.return();d=a.youThereData_.promptDelaySec;f=c.getCurrentTime();a.showWarningJob_= yk(Bk,function(){return za(function(l){a.showWarningJob_=0;return q(l,eUa(a),0)})},1E3*Math.max(d-f,0)); oa(g)})},eUa=function(a){var b,c,d,f,g,l; return za(function(m){if(1==m.nextAddress)return q(m,a.playerProvider_().getPlayerPromise(),2);if(3!=m.nextAddress)return b=m.yieldResult,c=b.getCurrentTime(),q(m,gUa(a),3);d=m.yieldResult;if(!d||!a.youThereData_)return m.return();if(N("check_user_lact_at_prompt_shown_time_on_web")&&(f=parseInt(a.youThereData_.lactThresholdMs,10),Mk()=a.youThereData_.playbackPauseDelayMs)return hUa(a), m.return();!N("external_fullscreen")&&(g=FJ())&&(a.ignoreFullscreenExitUserActivity_=!0,yk(Bk,function(){a.ignoreFullscreenExitUserActivity_=!1},2E3),oLa(g)); a.youThereData_.showToastWarningPrompt&&(UN(a,a.youThereData_.showWarningActions),a.inYouThereFlow_=!0,$J("YOU_THERE_EVENT_TYPE_PROMPT_SHOWN",On(),a.youThereData_,a.clientPlaybackNonce_,c),$J("YOU_THERE_EVENT_TYPE_WARNING_PROMPT_SHOWN",On(),a.youThereData_,a.clientPlaybackNonce_,c));l=0;a.youThereData_.blockingPromptDelayMs&&(l=a.youThereData_.blockingPromptDelayMs);a.showBlockingWarningJob_=yk(Bk,function(){return za(function(n){a.showBlockingWarningJob_=0;return q(n,iUa(a),0)})},l); oa(m)})},iUa=function(a){var b,c; return za(function(d){if(1==d.nextAddress)return q(d,gUa(a),2);b=d.yieldResult;if(!a.youThereData_)return d.return();b&&(a.youThereData_.showBlockingWarningAction&&(N("web_handle_meta_commands")||!a.youThereData_.showBlockingWarningAction.commandExecutorCommand?UN(a,[a.youThereData_.showBlockingWarningAction]):UN(a,a.youThereData_.showBlockingWarningAction.commandExecutorCommand.commands),a.inYouThereFlow_=!0,$J("YOU_THERE_EVENT_TYPE_WARNING_PROMPT_SHOWN_IN_DIALOG",On(),a.youThereData_,a.clientPlaybackNonce_)), c=a.youThereData_.playbackPauseDelayMs,a.pausePlaybackJob_=yk(Bk,function(){return za(function(f){a.pausePlaybackJob_=0;return q(f,hUa(a),0)})},c)); oa(d)})},hUa=function(a){var b; return za(function(c){if(1==c.nextAddress)return q(c,gUa(a),2);b=c.yieldResult;if(!a.youThereData_)return c.return();b&&($J("YOU_THERE_EVENT_TYPE_PLAYBACK_PAUSED",On(),a.youThereData_,a.clientPlaybackNonce_),UN(a,a.youThereData_.showPausedActions),a.inYouThereFlow_=!0);oa(c)})},gUa=function(a){var b,c; return za(function(d){if(1==d.nextAddress)return q(d,a.playerProvider_().getPlayerPromise(),2);b=d.yieldResult;c=b.getPlayerState();return d.return(-1==c||1==c||3==c)})},jUa=function(a,b){var c; za(function(d){if(1==d.nextAddress){if(a.isUserPredictedAbsent_==b)return d.jumpTo(0);a.isUserPredictedAbsent_=b;return q(d,a.playerProvider_().getPlayerPromise(),3)}c=d.yieldResult;c.setUserEngagement(b);b&&$J("YOU_THERE_EVENT_TYPE_ABR_TRIGGERED",On(),a.youThereData_,a.clientPlaybackNonce_);oa(d)})},UN=function(a,b){if(N("handle_service_request_actions")||N("kevlar_youthere_service_endpoint_actions_killswitch"))IL(a.actionSenderElement_,b,a.actionSenderElement_);else {b=k(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.commandMetadata&&c.commandMetadata.webCommandMetadata&&c.commandMetadata.webCommandMetadata.sendPost?JL(a.actionSenderElement_,[c]):IL(a.actionSenderElement_,[c],a.actionSenderElement_)}};var VN=function(a,b,c){c=void 0===c?Bk:c;this.priority_=a;this.signal_=b;this.parkedJobs_=null;this.nextJobDescriptor_=0;this.scheduledJobs_=Object.create(null);this.signals_=Un.getInstance();this.scheduler_=c},WN=function(a,b){if(b)if(a.signal_&&!Wn(a.signals_,a.signal_)){var c=a.parkedJobs_; c||(c=a.parkedJobs_=[],a.signals_.addListener(a.signal_,a.processSignal_.bind(a)));c.push(b)}else kUa(a,b)},lUa=function(a,b){if(b!=a.priority_){a.priority_=b; for(var c in a.scheduledJobs_){var d=a.scheduledJobs_[c];a.scheduler_.cancelJob(d.jobId);d.jobId=a.scheduler_.addJob(d.jobWrapper,b)}}}; VN.prototype.cancel=function(){for(var a in this.scheduledJobs_)this.scheduler_.cancelJob(this.scheduledJobs_[a].jobId),delete this.scheduledJobs_[a];this.parkedJobs_&&(this.parkedJobs_.length=0)}; VN.prototype.processSignal_=function(){if(this.parkedJobs_){for(var a=0,b;b=this.parkedJobs_[a++];)kUa(this,b);this.parkedJobs_.length=0}}; var kUa=function(a,b){if(10==a.priority_)Dk(b);else{var c=a.nextJobDescriptor_++,d=function(){b();delete a.scheduledJobs_[c]},f=a.scheduler_.addJob(d,a.priority_); a.scheduledJobs_[c]={jobWrapper:d,jobId:f}}};var mUa=[],nUa=["ytd-section-list-renderer","yt-horizontal-list-renderer","ytd-item-section-renderer","ytd-watch-next-secondary-results-renderer","ytd-video-primary-info-renderer"],pUa=function(a,b){this.usableComponents_=new Map;this.experimentMode_=fk("polymer_task_manager_status");"disabled"!=this.experimentMode_&&oUa(this,a||mUa,b||nUa)},oUa=function(a,b,c){var d=gk("polymer_task_manager_blacklisted_components")||[],f="experimental"==a.experimentMode_,g="production"==a.experimentMode_,l="counterfactual"== a.experimentMode_; f&&b.forEach(function(m){a.usableComponents_.set(m,!0)}); (g||f||l)&&c.forEach(function(m){a.usableComponents_.set(m,!0)}); d.forEach(function(m){a.usableComponents_.set(m,!1)})}; La(pUa);var XN=null;function YN(a,b){var c={};c.key=a;c.value=b;return qUa().then(function(d){return new Promise(function(f,g){try{var l=d.transaction("swpushnotificationsstore","readwrite").objectStore("swpushnotificationsstore").put(c);l.onsuccess=function(){f()}; l.onerror=function(){g()}}catch(m){g(m)}})})} function ZN(a){var b=new Pl("Error accessing DB");return qUa().then(function(c){return new Promise(function(d,f){try{var g=c.transaction("swpushnotificationsstore").objectStore("swpushnotificationsstore").get(a);g.onsuccess=function(){var l=g.result;d(l?l.value:null)}; g.onerror=function(){b.params={key:a,source:"onerror"};f(b)}}catch(l){b.params={key:a, thrownError:String(l)},f(b)}})},function(){return null})} function qUa(){return XN?Promise.resolve(XN):new Promise(function(a,b){var c=self.indexedDB.open("swpushnotificationsdb");c.onerror=b;c.onsuccess=function(){var d=c.result;if(d.objectStoreNames.contains("swpushnotificationsstore"))XN=d,a(XN);else return self.indexedDB.deleteDatabase("swpushnotificationsdb"),qUa()}; c.onupgradeneeded=rUa})} function rUa(a){a=a.target.result;a.objectStoreNames.contains("swpushnotificationsstore")&&a.deleteObjectStore("swpushnotificationsstore");a.createObjectStore("swpushnotificationsstore",{keyPath:"key"})} ;var $N=window.performance&&window.performance.memory,sUa=!1,tUa={},aO={},bO={};function uUa(){za(function(a){if(1==a.nextAddress){if(sUa)return a.jumpTo(0);sUa=!0;if(!(Math.random()a||xUa()} function xUa(){var a;za(function(b){if(1==b.nextAddress)return q(b,yUa(),2);a=b.yieldResult;wm("systemHealthCaptured",a);oa(b)})} function yUa(){var a,b,c,d;return za(function(f){switch(f.nextAddress){case 1:a={metric:{staticContext:aO,dynamicContext:{viewportHeightPixels:Math.max(document.documentElement?document.documentElement.clientHeight||0:0,window.innerHeight||0),viewportWidthPixels:Math.max(document.documentElement?document.documentElement.clientWidth||0:0,window.innerWidth||0)},webMetric:tUa,webApiSupport:bO}};if(b=On())a.csn=b;$N&&(a.metric.webMetric.currentHeapKbytes=Math.round($N.usedJSHeapSize/1E3));window.matchMedia&&( a.metric.dynamicContext.hasHoverSupport=window.matchMedia("(any-hover: hover)").matches,a.metric.dynamicContext.hasFinePointer=window.matchMedia("(any-pointer: fine)").matches,a.metric.dynamicContext.hasCoarsePointer=window.matchMedia("(any-pointer: coarse)").matches);if(!("getBattery"in navigator&&"function"===typeof navigator.getBattery)){f.jumpTo(2);break}return q(f,navigator.getBattery(),3);case 3:c=f.yieldResult,a.metric.dynamicContext.chargingStatus=c.charging?"CHARGING_AC":"CHARGING_INACTIVE"; case 2:"onLine"in navigator&&(a.metric.dynamicContext.networkCoarseState=navigator.onLine?0:2);if(bO.storageEstimatePresent)return q(f,navigator.storage.estimate(),8);if(!bO.webkitTemporaryStoragePresent){f.jumpTo(5);break}return q(f,zUa(),7);case 7:d=f.yieldResult;f.jumpTo(5);break;case 8:d=f.yieldResult;case 5:return a.metric.dynamicContext.deviceStorageQuotaMbytes=d?String(10*Math.round(d.quota/1048576/10)):"-1",a.metric.dynamicContext.deviceStorageUsageMbytes=d?String(10*Math.round(d.usage/1048576/ 10)):"-1",f.return(a);}})} function zUa(){return new Promise(function(a){bO.webkitTemporaryStoragePresent?navigator.webkitTemporaryStorage.queryUsageAndQuota(function(b,c){a({usage:b,quota:c})}):a()})} ;var AUa=!1,cO=function(){},BUa=function(){var a=to(void 0).vpl,b=to(void 0).cpt; if(a&&b){var c=kg(document);Po("vpst",c.y);Ro("ol",Math.max(a,b))}}; cO.prototype.reset=function(){AUa=!1}; var CUa=function(a){cO.getInstance();Vo("cpt")&&ud(Error("Ticking CPT when CPT already ticked"));t.requestAnimationFrame(function(){t.setTimeout(function(){Ro("cpt");BUa()})}); try{a()}catch(b){td(b)}t.requestAnimationFrame(function(){Ro("bcp")})}; La(cO);var DUa=function(a,b){var c={};b&&(c.v=b);a={name:a,locale:void 0,feature:void 0};for(var d in c)a[d]=c[d];c=Jd("/sharing_services",a);Sn(c)};var EUa=!1,FUa=function(a){if(!EUa&&(a=a||A("ZWIEBACK_PING_URLS"))&&a.length){EUa=!0;for(var b=0;b>16,(a&65280)>>8,a&255])},eO=function(a){a=[(a&16711680)>>>16, (a&65280)>>>8,a&255,(a&4278190080)>>>24];var b=jb(a,function(c){return c==(c&255)}); a[3]=(a[3]/255).toFixed(3);if(!b)throw Error("\"("+a.join(",")+"\") is not a valid RGBA color");return"rgba("+a.join(",")+")"};var fO=function(){if(this.constructor===fO)throw new TypeError("VisibilityObserver cannot be instantiated directly.")}; e=fO.prototype;e.dispose=function(){}; e.disconnect=function(){}; e.reconnect=function(){}; e.observe=function(){}; e.unobserveAll=function(){}; e.unobserveByKey=function(){};var GUa=function(a,b){b=void 0===b?0:b;fO.call(this);this.viewroot_=a;this.defaultPrescanHeight_=b;this.observer_=new IntersectionObserver(this.handleObserveEvent_.bind(this),a?{root:a,rootMargin:"-0.1px"}:{rootMargin:"-0.1px"});this.prescanObservers_=new Map;this.handlers_=new Map;this.isConnected_=!0}; p(GUa,fO);e=GUa.prototype;e.dispose=function(){this.isConnected_=!1;this.observer_.disconnect();for(var a=k(this.prescanObservers_.values()),b=a.next();!b.done;b=a.next())b.value.disconnect();this.handlers_.clear()}; e.disconnect=function(){this.isConnected_=!1;this.observer_.disconnect();for(var a=k(this.prescanObservers_.values()),b=a.next();!b.done;b=a.next())b.value.disconnect()}; e.reconnect=function(){if(!this.isConnected_){this.isConnected_=!0;for(var a=k(this.handlers_),b=a.next();!b.done;b=a.next()){var c=k(b.value);b=c.next().value;var d=c.next().value;c=!1;d=k(d.keys());for(var f=d.next();!f.done;f=d.next())if("prescan"==f.value.state){c=!0;break}c&&HUa(this,b).observe(b);this.observer_.observe(b)}}}; e.unobserveAll=function(){this.observer_.disconnect();for(var a=k(this.prescanObservers_.values()),b=a.next();!b.done;b=a.next())b.value.disconnect();this.handlers_.clear()}; e.handleObserveEvent_=function(a){var b=this;a.forEach(function(c){var d=b.handlers_.get(c.target);if(d){var f=c.isIntersecting;d=k(d);for(var g=d.next();!g.done;g=d.next()){var l=k(g.value);g=l.next().value;l=l.next().value;if("visible"==g.state&&f||"hidden"==g.state&&!f)l(c.target,g.state),g.calledOnce&&b.unobserveByKey({element:c.target,option:g})}}})}; e.handlePrescanEvent_=function(a){var b=this;a.forEach(function(c){var d=b.handlers_.get(c.target);if(d&&c.isIntersecting){d=k(d);for(var f=d.next();!f.done;f=d.next()){var g=k(f.value);f=g.next().value;g=g.next().value;"prescan"==f.state&&(g(c.target,f.state),f.calledOnce&&b.unobserveByKey({element:c.target,option:f}))}}})}; e.observe=function(a,b,c){var d=(d=this.handlers_.get(a))&&d.has(c)?{element:a,option:c}:void 0;if(d)return d;d={element:a,option:c};this.handlers_.has(a)||this.handlers_.set(a,new Map);var f=this.handlers_.get(a);f.has(c)||f.set(c,b);"prescan"==c.state&&HUa(this,a).observe(a);this.observer_.observe(a);return d}; e.unobserveByKey=function(a){var b=this.handlers_.get(a.element);if(b&&b.has(a.option)){b.delete(a.option);if("prescan"==a.option)for(var c=k(this.prescanObservers_.values()),d=c.next();!d.done;d=c.next())d.value.unobserve(a.element);0==b.size&&(this.handlers_.delete(a.element),this.observer_.unobserve(a.element))}}; var HUa=function(a,b){var c=a.defaultPrescanHeight_;b.hasAttribute("prescan-height")&&(b=parseInt(b.getAttribute("prescan-height"),10),isNaN(b)||(c=b));if(a.prescanObservers_.has(c))return a.prescanObservers_.get(c);b="-0.1px -0.1px "+c+"px -0.1px";b=new IntersectionObserver(a.handlePrescanEvent_.bind(a),a.viewroot_?{root:a.viewroot_,rootMargin:b}:{rootMargin:b});a.prescanObservers_.set(c,b);return b};function IUa(a){if(window.IntersectionObserver)return new GUa(a,400);throw new TypeError("Non-IntersectionObserver version of VisibilityObserver is not yet implemented")} ;function gO(a,b,c,d){b=void 0===b?{}:b;c=void 0===c?"":c;d=void 0===d?window:d;yc(d.location,Jd(a,b)+c)} function JUa(a,b,c){b=void 0===b?{}:b;c=void 0===c?!1:c;var d=A("EVENT_ID");d&&(b.ei||(b.ei=d));b&&rJ(a,b);if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):gO(a);return!0} ;var KUa;var LUa=["server_prefetched_vast","vmap"],MUa=function(a){if("1"!==y.getValueByKeys(A("PLAYER_CONFIG",{}),"args","privembed")){a&&sha();try{NKa().then(function(){},function(){}),sk(MUa,18E5)}catch(b){td(b)}}},NUa=function(a){if(null!=a){var b=[]; LUa.forEach(function(c){c in a&&(delete a[c],b.push(c))}); a.cached_load="1"}};var hO=function(){this.playerResolver_=Qi();this.playerPromise_=this.playerResolver_.promise;this.playerVars_=null;this.playbackEndedCallback_=Ka;this.playbackDurationSeconds_=0},OUa=function(a){var b=function(){return window.YT&&"function"===typeof window.YT.ready}; if(b())return Mi(window.YT);var c=Qi(),d=og("SCRIPT");d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(d.onload=Ka,d.onreadystatechange=Ka,d.onerror=Ka,b()?c.resolve(window.YT):c.reject(new Pl("Failed to load the iframe player library","script.onload",d.readyState,typeof window.YT,window.YT?typeof window.YT.ready:"YT.ready() missing",window.yt?typeof window.yt.ready:"yt.ready() missing")))}; d.onerror=function(f){d.onload=Ka;d.onreadystatechange=Ka;d.onerror=Ka;c.reject(new Pl("Failed to load the iframe player library","script.onerror",f&&f.target&&f.target.src))}; xc(d,Lb(Db("https://www.youtube.com/iframe_api")));a.insertBefore(d,a.firstChild);return c.promise},PUa=function(a,b,c){var d,f; za(function(g){switch(g.nextAddress){case 1:return a.playbackEndedCallback_=c,sa(g,2),q(g,OUa(yg(b)),4);case 4:d=g.yieldResult;ta(g,3);break;case 2:return f=ua(g),f instanceof Pl&&f.args&&"script.onerror"==f.args[0]?vm(f):Um(f),g.return();case 3:d.ready(function(){return new d.Player(b,{playerVars:{controls:0,enablejsapi:1,iv_load_policy:3,modestbranding:1,mute:1,rel:0,showinfo:0},events:{onReady:a.onPlayerReady_.bind(a),onStateChange:a.onPlayerStateChange_.bind(a),onCueRangeExit:a.onCueRangeExit_.bind(a)}})}), oa(g);}})}; e=hO.prototype;e.getPlayerPromise=function(){return this.playerPromise_}; e.onPlayerReady_=function(a){this.playerResolver_.resolve(a.target)}; e.onPlayerStateChange_=function(a){if(a.data==YT.PlayerState.PLAYING){a=a.target;var b=a.getCurrentTime();a.addCueRange("playback",b,b+this.playbackDurationSeconds_)}}; e.onCueRangeExit_=function(a){"playback"==a.data&&(a.target.stopVideo(),this.playbackEndedCallback_())}; e.stopVideo=function(){this.playerPromise_.then(function(a){a.stopVideo()})}; e.playVideo=function(){var a=this;this.playerVars_&&this.playerPromise_.then(function(b){"function"!=typeof b.loadVideoByPlayerVars?Um(new Pl("vmh: player API not ready","loadVideoByPlayerVars",typeof b.loadVideoByPlayerVars)):b.loadVideoByPlayerVars(a.playerVars_)})}; var QUa=function(a,b,c,d,f){b&&(void 0===c&&(c=0),void 0===d&&(d=0),a.playbackDurationSeconds_=d/1E3,a.playerVars_={adformat:"1_8",autoplay:"1",videoId:b,suggestedQuality:"hd720",startSeconds:c/1E3,player_params:f},a.playerPromise_.then(function(g){"function"!=typeof g.cueVideoByPlayerVars?vm(new Pl("vmh: player API not ready","cueVideoByPlayerVars",typeof g.cueVideoByPlayerVars)):g.cueVideoByPlayerVars(a.playerVars_)}))}; hO.prototype.mute=function(){this.playerPromise_.then(function(a){a.mute()})}; hO.prototype.unMute=function(){this.playerPromise_.then(function(a){a.unMute()})}; function RUa(a){if(a.urlEndpoint){if(a=jl(a.urlEndpoint.url),a.adurl)return Bc(a.adurl)}else if(a.watchEndpoint)return"//www.youtube.com/watch?v="+a.watchEndpoint.videoId;return null} function SUa(a){if(!a||!a.reportingPings)return null;var b={};a.reportingPings.forEach(function(c){c.pingType in b?b[c.pingType].push(c.url):b[c.pingType]=[c.url]}); return{adpings:hl(b)}} ;var TUa={FONT_FAMILY_YTSANS_MEDIUM:"YT Sans:300,500,700"},UUa=function(){this.deferedLoadFont_=new VN(3,"eocs")}; UUa.prototype.addFont_=function(a){var b=og("LINK");b.type="text/css";b.setAttribute("name","www-webfont");for(var c=[],d=0;dTb(c,"50.0.0");b="OPERA"==b.browserName&&0>Tb(c,"42.0.0");if(d||b)return Promise.resolve()}return $Ua().then(function(f){if(!f)return Promise.resolve();f=YUa().then(function(){return bVa({type:"notifications_check_registration",data:A("ID_TOKEN")})}); return"default"!=Notification.permission?f.catch(function(){}):f.then(function(){return gVa(a)}).then(function(g){if(g)return hVa(),iVa().then(function(){})}).catch(function(){})})} function gVa(a){return rd("SERVICE_WORKER_PROMPT_NOTIFICATIONS")||rd("LOGGED_IN")&&(void 0===a?0:a)?eVa().then(function(b){if(b)return!0;b=[jVa(),kVa()];rd("LOGGED_IN")||b.push(lVa());return Promise.all(b).then(function(c){return c.every(function(d){return d})})}):Promise.resolve(!1)} function lVa(){var a=ek("service_worker_push_logged_out_prompt_watches");return-1==a?Promise.resolve(!1):ZN("WatchCount").then(function(b){return b>=a})} function iVa(){var a=arguments;N("service_worker_push_prompt_modal_enable")&&mVa();return Notification.requestPermission().then(function(b){nVa();var c=document.getElementById("ticker");c&&(c.className=c.classList.remove("show"));if("granted"==b)return YUa().then(function(){XUa(!1);iO();return Promise.resolve(!0)}); "denied"==b&&iO();return Promise.resolve(!1)}).catch(function(){nVa(); return Promise.reject.apply(Promise,fa(a))})} function hVa(){ZN("PromptCount").then(function(a){return YN("PromptCount",a+1)}).then(function(){return YN("PromptTime",Wa())}).then(function(){var a=fk("service_worker_push_force_notification_prompt_tag"); if(a)return ZN("PromptTags").then(function(b){var c=[];if(b)try{c=JSON.parse(b)}catch(d){return!1}c||(c=[]);c.push(a);return YN("PromptTags",JSON.stringify(c))})})} function jVa(){return-1==ek("service_worker_push_prompt_cap")?Promise.resolve(!0):ZN("PromptCount").then(function(a){a||(a=0);return Promise.resolve(a(b||0))}):Promise.resolve(!0)} function oVa(){dVa||nVa()} function pVa(a){a.style.zIndex=2147483648;a.style.pointerEvents="auto";a.style.backgroundColor="rgba(0, 0, 0, 0.6)";a.style.width="100%";a.style.height="100vh";a.style.position="absolute";a.style.top="0";a.style.left="0";a.style.border="none"} function mVa(){var a=bg(document,"yt-push-prompt-modal-bg");dVa=N("service_worker_push_prompt_modal_ignore_click");a?pVa(a):(a=mg("div",{id:"yt-push-prompt-modal-bg"}),pVa(a),document.body.appendChild(a),qk(document,"click",oVa))} function nVa(){var a=bg(document,"yt-push-prompt-modal-bg");a&&tg(a)} ;function qVa(a){return cVa(a)?fVa():Promise.resolve()} ;function rVa(){-1!=ek("service_worker_push_logged_out_prompt_watches")&&ZN("WatchCount").then(function(a){100<=a||YN("WatchCount",a+1)})} ;var uVa=function(){rd("SERVICE_WORKER_KILLSWITCH")||navigator.serviceWorker&&navigator.serviceWorker.getRegistrations&&"https:"==window.location.protocol&&(N("service_worker_enabled")?sVa():tVa())},tVa=function(){navigator.serviceWorker.getRegistrations().then(function(a){a.forEach(vVa)})},sVa=function(){if(N("kevlar_enable_slis")){var a=new bka; a.recordStart(Zn())}try{var b=wVa("/sw.js").catch(function(){N("kevlar_enable_slis")&&a.recordEnd("FAILURE");return new Promise(function(){})}); N("service_worker_push_enabled")&&(N("kevlar_enable_slis")?b.then(function(c){a.recordEnd("SUCCESS");return c}).then(xVa).then(qVa):b.then(xVa).then(qVa))}catch(c){if(N("kevlar_enable_slis")&&a.recordEnd("FAILURE"),"SecurityError"!=c.name)throw c; }},xVa=function(a){var b=a.installing||a.waiting; return a.active||!b?Promise.resolve(a):new Promise(function(c){var d=function(f){if("activated"==f.target.state||"redundant"==f.target.state)b.removeEventListener("statechange",d),c(a)}; b.addEventListener("statechange",d)})},vVa=function(a){a&&wVa("/sw.js?0",a.scope)},wVa=function(a,b){return navigator.serviceWorker.register(a,{scope:b||fk("service_worker_scope")||"/"})};function yVa(a){var b=["h","m","s"],c=qb(b);c.reverse();var d={};a=a.toLowerCase().match(/\d+\s*[hms]?/g)||[];a=eb(a,function(l){var m=(l.match(/[hms]/)||[""])[0];return m?(d[m]=parseInt(l.match(/\d+/)[0],10),!1):!0}); for(a.reverse();a.length&&c.length;){var f=c.shift();f in d||(d[f]=parseInt(a.shift(),10))}if(a.length||59=d?b:1<=d?c:fG(a.cubicBezier_,d)*(c-b)+b};var GVa=function(a,b){this.component_=a;this.numItemPerLine_=0;this.isMultipleLine_=b;this.currentAnimateState_="steady-state";this.deferredAnimation_=new VN(2,"eocs");this.isAnimating_=!1;this.animationStartTime_=0;this.posterAnimationPath_=new WeakMap;this.hoveringIndex_=-1}; GVa.prototype.resetSteadyState=function(a){this.deferredAnimation_&&this.deferredAnimation_.cancel();HVa(this,a,"steady-state")}; var LVa=function(a,b,c,d){for(var f=0;fb;WN(this.deferredAnimation_,this.animateFrame_.bind(this,a))}else for("after-hover"==this.currentAnimateState_&&HVa(this,a,"steady-state"),b=0;ba-this.lastHandledScroll_||(this.lastHandledScroll_=a,this.markDirty())}, markDirty:function(){N("kevlar_use_vimio_behavior")||yWa(this);N("kevlar_attach_vimio_behavior")&&this.markDirtyVisibilityObserver()}, getScreenLayer:function(){if(this.screenLayer)return this.screenLayer;var a=this.getParentRenderer_();if(a)return a.getScreenLayer()}, invalidate:function(a){this.markDirty();this.wasPrescan=this.wasVisible=!1;a&&(this.dirtyTree=!0)}, getNodes:function(){return this.childCache_?[].concat(fa(this.childCache_)):[]}, impressionLog:function(){if(this.data&&this.data.impressionEndpoints)for(var a=0;a\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zWa){var d=document.createElement("template");d.innerHTML=""; zWa=d}d=zWa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);BWa=a}a=BWa;return a}}}); var GO=CWa;w([P(W.YtRendererBehavior),x("design:type",Object)],GO.prototype,"ytRendererBehavior",void 0);w([R({}),x("design:type",Object)],GO.prototype,"data",void 0);GO=w([uO({is:"yt-live-chat-message-buy-flow-heading-renderer"})],GO);var DWa={};DWa.YtPlaintextBehavior=[Polymer.IronA11yKeysBehavior,{properties:{plaintextOnly:{type:Boolean,value:!1}},detached:function(){this.plaintextOnly&&(this.removeEventListener("paste",this.onPaste_),this.removeOwnKeyBindings())}, ready:function(){this.plaintextOnly&&(this.addEventListener("paste",this.onPaste_),this.addOwnKeyBinding("ctrl+b meta+b ctrl+i meta+i","preventRichTextFormatting_"))}, onPaste_:function(a){a.preventDefault();a=a.clipboardData.getData("text/plain");document.execCommand("insertText",!1,a)}, preventRichTextFormatting_:function(a){Je&&(a=a.detail.keyboardEvent,a.stopImmediatePropagation(),a.preventDefault())}}];var EWa=document.createElement("template");EWa.innerHTML=""; document.head.appendChild(EWa.content);var FWa=document.createElement("template");FWa.innerHTML=""; document.head.appendChild(FWa.content);var GWa=document.createElement("template");GWa.innerHTML=""; document.head.appendChild(GWa.content);var HO=0,IO=new WeakMap,JO=0,KO=new Set;function LO(a,b,c,d){if(a=MO(a,b,c,void 0===d?"width":d))return $b(a)} function MO(a,b,c,d){d=void 0===d?"width":d;if(!a||!a.length)return null;if(N("kevlar_tuner_should_always_use_device_pixel_ratio")){var f=window.devicePixelRatio;N("kevlar_tuner_should_clamp_device_pixel_ratio")?f=Math.min(f,ek("kevlar_tuner_clamp_device_pixel_ratio")):N("kevlar_tuner_should_use_thumbnail_factor")&&(f=ek("kevlar_tuner_thumbnail_factor"));HO=f}else HO||(HO=window.devicePixelRatio);f=HO;N("kevlar_tuner_should_always_use_device_pixel_ratio")?b*=f:1=b)return a[c].url||null;for(b=f-1;0a.loadTime&&0";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0=== KWa){var d=document.createElement("template");d.innerHTML=""; KWa=d}d=KWa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return LWa=a}, properties:{text:{type:Object,observer:"textChanged_"},noEndpoints:Boolean,noStyles:Boolean,splitLines:{type:Boolean,reflectToAttribute:!0},forceDefaultStyle:{type:Boolean,reflectToAttribute:!0},ellipsisTruncate:{type:Boolean,reflectToAttribute:!0,observer:"ellipsisTruncateChanged_"},ariaLabel:{type:String,reflectToAttribute:!0,computed:"computeAriaLabel_(text.accessibility.accessibilityData.label)"},hasLinkOnly_:{type:String,reflectToAttribute:!0,computed:"computeHasLinkOnly_(text.runs)"},emojiSize:{type:Number, value:N("render_unicode_emojis_as_small_images")?16:24},target:{type:String},enableContentEditable:{type:Boolean,observer:"enableContentEditableChanged_"},overrideAriaLabel:{type:String,observer:"overrideAriaLabelChanged_"},respectHtmlDir:Boolean,stringRunExtensions:{type:Array,value:function(){return[]}}, useMixedDirectionFormattedStrings:{type:Boolean,computed:"computeUseMixedDirectionFormattedStrings_(plaintextOnly)",value:function(){return N("enable_mixed_direction_formatted_strings")}}}, behaviors:[DWa.YtPlaintextBehavior,V.YtActionSenderBehavior,AO.YtComponentBehavior,W.YtRendererBehavior],created:function(){this.hasSetTitle_=this.hasChange_=!1}, ready:function(){Polymer.Settings.useShadow&&this.toggleClass("use-shadow",!0);"rtl"==A("HTML_DIR",void 0)&&(this.useMixedDirectionFormattedStrings?this.setAttribute("dir","rtl"):this.respectHtmlDir||this.setAttribute("dir","auto"));this.enableContentEditableChanged_()}, attached:function(){this.hasChange_&&this.textChanged_(this.text)}, clearContents_:function(){for(var a=this.getRoot(),b=a.lastChild;b&&"STYLE"!=b.tagName;){try{a.removeChild(b)}catch(c){break}"yt-endpoint"==b.is&&(io(b),b.textContent="");b=a.lastChild}}, textChanged_:function(a){if(void 0===this.isAttached)this.hasChange_=!0;else{this.hasChange_=!1;for(var b=this.firstChild;b&&"FONT"==b.nodeName;){var c=b;b=b.nextSibling;this.removeChild(c)}c=this.getRoot();if(a&&(a.runs||a.simpleText)){if(this.ellipsisTruncateChanged_(this.ellipsisTruncate),b=a.simpleText,!b&&1==a.runs.length&&this.isSimpleString_(a.runs[0])&&(b=a.runs[0].text),void 0!=b&&N("disable_simple_mixed_direction_formatted_strings")&&this.useMixedDirectionFormattedStrings&&"rtl"==A("HTML_DIR", void 0)&&this.setAttribute("dir","auto"),void 0===b||!N("disable_simple_mixed_direction_formatted_strings")&&this.useMixedDirectionFormattedStrings)a=a.runs,void 0!==b&&(a=[{text:b}]),this.ellipsisTruncate?this.classList.add("complex-string"):this.classList.remove("complex-string"),a&&this.updateText_(a);else{if(b!=c.textContent){a=Polymer.Settings.useShadow;if(!a)try{c.textContent=b}catch(d){a=!0}a&&(this.clearContents_(),a=document.createElement("span"),a.appendChild(document.createTextNode(b)), c.appendChild(a))}}}else this.clearContents_()}}, ellipsisTruncateChanged_:function(a){!a||this.hasAttribute("title")&&!this.hasSetTitle_?this.hasSetTitle_&&(this.removeAttribute("title"),this.hasSetTitle_=!1):(this.setAttribute("title",this.getRawText()),this.hasSetTitle_=!0)}, computeAriaLabel_:function(a){return a}, setNodeStyle_:function(a,b){!this.useMixedDirectionFormattedStrings||N("disable_child_node_auto_formatted_strings")&&"auto"==this.getAttribute("dir")?b.removeAttribute("dir"):b.setAttribute("dir","auto");b.classList.remove("bold","deemphasize","italic","strikethrough");b.style.color="";this.noStyles||(a.bold&&b.classList.add("bold"),a.deemphasize&&b.classList.add("deemphasize"),a.italics&&b.classList.add("italic"),a.strikethrough&&b.classList.add("strikethrough"),a.textColor&&(b.style.color=dO(a.textColor)))}, setNodeTrackingParams_:function(a,b){b.data||(b.data={});if((a=a.loggingDirectives?a.loggingDirectives.trackingParams:null)||b.data.trackingParams)b.data.trackingParams=a}, computeHasLinkOnly_:function(a){return!(!a||1!=a.length||this.noEndpoints||!a[0].navigationEndpoint)}, computeUseMixedDirectionFormattedStrings_:function(){return this.plaintextOnly?!1:N("enable_mixed_direction_formatted_strings")}, getRoot:function(){var a=Polymer.dom(this.root);this.enableContentEditable&&(a=Polymer.dom(a.querySelector("[contenteditable]")));return a}, fixContenteditableScope:function(){var a=function(b){b&&(1==b.nodeType&&b.classList&&(b.classList.add("style-scope"),b.classList.add("yt-formatted-string")),b.childNodes&&b.childNodes.forEach(function(c){a(c)}))}; a(this.getRoot())}, updateText_:function(a){for(var b=a.length,c=this.getRoot(),d=c.firstChild;d&&"STYLE"==d.nodeName;)d=d.nextSibling;for(var f=0;fthis.messageTiers.length))return this.messageTiers[a]}; var PWa=function(a,b){if(b===Number(a.messageTiers[a.messageTiers.length-1].maxPriceMicros))return a.messageTiers.length;a=a.messageTiers.findIndex(function(c){return b>=Number(c.minPriceMicros)&&b<=Number(c.maxPriceMicros)}); return-1!==a?a:0},QWa=function(a,b,c,d){this.minPrice=a; this.maxPrice=b;this.numberFormatter=c;this.messageTiers=d},SWa=function(a,b,c){b=a.numberFormatter.currencyFormatter.parse(b); if(isNaN(b)||ba.maxPrice)return Object.assign(Object.assign({},c),{isInvalidPrice:!0});c=Math.round(1E6*b);c-=c%a.numberFormatter.currencyUnitMicros;b=PWa(a.messageTiers,c);return RWa(a,c,b)},RWa=function(a,b,c){var d=a.numberFormatter; d=d.currencyFormatter.format(hJ(d,b)).replace(d.currencySymbol,"").trim();var f=a.numberFormatter;f=f.currencyFormatter.format(hJ(f,b));var g=c;g>=a.messageTiers.messageTiers.length&&(g=a.messageTiers.messageTiers.length-1);var l=a.messageTiers.getTier(g)||a.messageTiers.getTier(0);var m=a.messageTiers;g=g>=m.messageTiers.length?void 0:m.messageTiers[g].durationLabel;l={shouldShowPickers:!(!l.messageTemplate.liveChatPaidMessageRenderer||!l.messageTemplate.liveChatPaidMessageRenderer.inputField)|| !(!l.messageTemplate.liveChatMembershipItemRenderer||!l.messageTemplate.liveChatMembershipItemRenderer.inputField),messageRenderer:l.messageTemplate,maxNumCharacters:Number(l.maxNumCharacters)||0,durationLabel:g,shouldHideDurationLabel:!g};g=a.numberFormatter;a={valueNow:g.currencyFormatter.format(hJ(g,b)),valueMin:a.numberFormatter.currencyFormatter.format(a.minPrice),valueMax:a.numberFormatter.currencyFormatter.format(a.maxPrice)};return{sliderIndex:c,priceMicros:b,isInvalidPrice:!1,formattedPrice:d, formattedPriceWithCurrency:f,messagePreviewState:l,sliderAriaState:a}};function TWa(a,b){var c=On();c&&a&&NJ(c,In(a),b)} ;var NO={};NO.YtActionHandlerBehavior=[V.YtActionSenderBehavior,{actionMap:{},attached:function(){this.registerActionMap(this.actionMap)}, detached:function(){this.unregisterActionMap(this.actionMap)}, registerActionMap:function(a){for(var b=DL.getInstance(),c=k(Object.keys(a)),d=c.next();!d.done;d=c.next()){var f=d.value;d=a[f];if(this&&this[d]){var g=b.actionRoutingMap.get(f);g||(g=new Map,b.actionRoutingMap.set(f,g));g.set(this,sd(this[d].bind(this)))}else f=Error("Unable to register undefined function"),f.params=d,td(f)}}, unregisterActionMap:function(a){var b=DL.getInstance();a=k(Object.keys(a));for(var c=a.next();!c.done;c=a.next())(c=b.actionRoutingMap.get(c.value))&&c.delete(this)}}];var UWa=[V.YtActionSenderBehavior,{listeners:{"picker-cancelled":"onPickerCancel_"},togglePicker_:function(a){var b=this.$.pickers.selected;if(b){Polymer.dom(this).removeAttribute(b+"-open");var c=this.$["picker-buttons"].querySelector("#"+b);c&&(c.active=!1)}c=a;b==a&&(c=null);b!=a&&Polymer.dom(this).setAttribute(a+"-open","");this.$.pickers.selected=c;this.sendAction("yt-live-chat-picker-changed",[c])}, onPickerCancel_:function(){this.togglePicker_(this.$.pickers.selected)}}];var OO={YtTaskEmitterBehavior:{created:function(){this.cachedProviderNode_=null}, detached:function(){this.cachedProviderNode_=null}, getTaskManager:function(){var a=this.getContext_();return a?a.getTaskManager():Bk}, getContext_:function(){if(this.shouldUseTaskManager()){if(!this.cachedProviderNode_){var a=this.fire("yt-get-context-provider");a.detail&&a.detail.contextProvider?this.cachedProviderNode_=a.detail.contextProvider:this.parentElement&&(this.cachedProviderNode_=this)}if(this.cachedProviderNode_&&this.cachedProviderNode_.getProvidedContext&&this.cachedProviderNode_.getProvidedContext())return this.cachedProviderNode_.getProvidedContext()}}, shouldUseTaskManager:function(){var a=pUa.getInstance();if("disabled"==a.experimentMode_)a=!1;else{var b=!!a.usableComponents_.get(this.localName);a="counterfactual"==a.experimentMode_?!1:b}return a}, getNetworkManager:function(){var a=this.getContext_();if(a)return a.getNetworkManager()}}};var PO=new WeakMap;function VWa(a,b){for(var c in a)if(a.hasOwnProperty(c)&&b[c])return c;return null} function WWa(a){var b=a.match(/\[\[([\w\.]+)\]\]/);if(b&&1n;){g=a[n];var u=VWa(c,g);if(u){if(this.getComponentName_(c[u],g[u])!=r.is){var z=this.createComponent_(c[u],g[u],d),C=Polymer.dom(r).nextElementSibling;C?b.insertBefore(z,C):b.appendChild(z); ZWa(this.is,b,r,d);r=z}else this.telemetry_.reuse++;this.deferRenderStamperBinding_(r,c[u],g[u]);m++;n++;r=Polymer.dom(r).nextElementSibling}else n++}$Wa(this.is,b,m,d);m=r;if(a.length>n){g=document.createDocumentFragment();for(u=a.length;nf.length||!c.isCustomEmoji&&cXa.test(f))){var g=f.substr(0,3).toLocaleLowerCase();null==a.emojiShortcutCharMap[g]&&(a.emojiShortcutCharMap[g]=Object.create(null));a.emojiShortcutCharMap[g][f]=c}}}}return a.emojiShortcutCharMap}; QO.prototype.createEmoji=function(a,b){b=void 0===b?!0:b;var c=document.createElement("img");N("render_unicode_emojis_as_small_images")&&c.classList.add("small-emoji");c.classList.add("emoji");c.classList.add("yt-formatted-string");c.src=a.image?MO(a.image.thumbnails,this.emojiSize)||"":"";var d=void 0;a.image&&a.image.accessibility&&a.image.accessibility.accessibilityData&&(d=a.image.accessibility.accessibilityData.label);c.alt=d?d:(a.isCustomEmoji&&a.shortcuts?a.shortcuts[0]:a.emojiId)||"";a.isCustomEmoji&&( c.dataset.emojiId=a.emojiId);te&&(c.setAttribute("contenteditable","false"),c.setAttribute("unselectable","on"));b&&(a.shortcuts&&a.shortcuts.length&&c.setAttribute("shared-tooltip-text",a.shortcuts[0]),c.id="emoji-"+bXa++);return c}; QO.prototype.createDocumentFragment=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?!0:c;d=void 0===d?!1:d;for(var f=document.createDocumentFragment(),g=0,l,m=0;null!=(l=this.emojiRegex.exec(a));){var n=RO(this,l[0])||TO(this,l[0]);!n||n.isCustomEmoji&&!b||(n=this.createEmoji(n,c),g!==l.index&&f.appendChild(document.createTextNode(a.substring(g,l.index))),f.appendChild(n),g=l.index+l[0].length,m++)}if(!d||m)return f.appendChild(document.createTextNode(a.substr(g))),f}; var UO=new QO;Polymer({is:"yt-live-chat-message-buy-flow-renderer",_template:function(){if(void 0!==NWa)return NWa;var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n
[[getSimpleString(data.headerText)]]
\n
\n
\n
\n
\n
\n
\n \n [[getSimpleString(durationLabel)]]\n
\n
[[characterCountDisplay]]/[[maxCharacterCount]]
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n
[[currencySymbol]]
\n \n \n
[[data.currency]]
\n
\n \n
\n
\n \n [[getSimpleString(data.buyButton.buttonRenderer.text)]]\n \n
\n
\n \n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===MWa){var d=document.createElement("template");d.innerHTML=""; MWa=d}d=MWa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return NWa=a}, hostAttributes:{tabindex:0},properties:{data:{type:Object,observer:"dataChanged_"},emojiManager:Object,superChatEmojiManager:{type:Object,value:function(){return new QO}}, participantsManager:Object,selectedPage:{type:Number,value:0},currencySymbol:{type:String,computed:"computeCurrencySymbol_(data.currency)"},hideCurrencySymbol:{type:Boolean,computed:"computeHideCurrencySymbol_(currencySymbol, data.currency)"},priceMaxDigits:{type:Number,readOnly:!0},messageTooLong:{type:Boolean,computed:"computeMessageTooLong_(characterCountDisplay, maxCharacterCount)",reflectToAttribute:!0},isInvalidPrice:{type:Boolean,value:!1,readOnly:!0},buyButtonDisabled:{type:Boolean,computed:"computeBuyButtonDisabled_(messageTooLong, isInvalidPrice)"}, priceMicros:{type:Number,value:0},messageTiers:{type:Object},durationLabel:{type:Object,readOnly:!0},hideDurationLabel:{type:Boolean,readOnly:!0,reflectToAttribute:!0},messagePreviewRenderer:Object,messageCharacterCount:{type:Number,value:0},characterCountDisplay:{type:Number,computed:"computeCharacterCountDisplay_(messageCharacterCount, maxCharacterCount)"},maxCharacterCount:{type:Number,value:0},priceInputValue:{type:String,observer:"adjustInputWidth_"},priceMin:{type:Number,readOnly:!0},priceMax:{type:Number, readOnly:!0},sliderIndex:Number,sliderMax:{type:Number},sliderMaxMarkers:{type:Number,computed:"computeSliderMaxMarkers_(sliderMax)"},messageTemplate:{type:Object,readOnly:!0},shouldShowPickers:{type:Boolean,value:!0,readOnly:!0}},actionMap:{"yt-wallet-dialog-closed":"onWalletDialogClose_","yt-wallet-dialog-completed":"onWalletDialogComplete_","yt-open-payments-dialog":"onWalletDialogOpen_","yt-live-chat-buy-flow-callback":"buyFlowCallback_"},behaviors:[xO.YtLiveChatErrorMessageBehavior,UWa,NO.YtActionHandlerBehavior, V.YtActionSenderBehavior,W.YtRendererBehavior,Y],listeners:{"immediate-value-change":"onSliderImmediateChange_","yt-emoji-select":"onEmojiSelect_","yt-live-chat-text-input-field-renderer-character-count-changed":"onCharacterCountChanged_"},stampDom:{"data.heading":{id:"info-heading",mapping:{liveChatMessageBuyFlowHeadingRenderer:"yt-live-chat-message-buy-flow-heading-renderer"}},"data.helpButton":{id:"help",mapping:{buttonRenderer:"yt-button-renderer"}},"data.helpDialog":{id:"dialog",mapping:{liveChatDialogRenderer:"yt-live-chat-dialog-renderer"}}, "data.pickers":{id:"pickers",mapping:{emojiPickerRenderer:{component:"yt-emoji-picker-renderer",properties:{emojiManager:"[[superChatEmojiManager]]"}},liveChatCreatorSupportRenderer:{component:"yt-live-chat-creator-support-renderer"}}},"data.pickerButtons":{id:"picker-buttons",mapping:{liveChatIconToggleButtonRenderer:"yt-live-chat-icon-toggle-button-renderer"}},messageTemplate:{id:"message-renderer",mapping:{liveChatPaidMessageRenderer:{component:"yt-live-chat-paid-message-renderer",properties:{emojiManager:"[[superChatEmojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatMembershipItemRenderer:{component:"yt-live-chat-membership-item-renderer",properties:{emojiManager:"[[superChatEmojiManager]]",participantsManager:"[[participantsManager]]"}}}}},ready:function(){var a=this;this.data&&this.data.emojis&&this.superChatEmojiManager.load(this.data.emojis,this.emojiManager);this.async(function(){a.adjustInputWidth_()},1)}, dataChanged_:function(a){if(a){var b=new lKa(this.data.currency,this.data.currencyUnitMicros),c=new OWa(this.data.messageTiers);this._setPriceMin(hJ(b,Number(c.messageTiers[0].minPriceMicros)||0));this._setPriceMax(hJ(b,Number(c.messageTiers[c.messageTiers.length-1].maxPriceMicros)||0));this._setPriceMaxDigits(b.currencyFormatter.format(this.priceMax).length);var d=c.messageTiers[c.messageTiers.length-1];this.sliderMax=d.minPriceMicros==d.maxPriceMicros?c.messageTiers.length-1:c.messageTiers.length; b=this.buyFlowStateManager_=new QWa(this.priceMin,this.priceMax,b,c);c=Number(a.defaultPurchasePriceMicros)||0;d=PWa(b.messageTiers,c);this.buyFlowState_=RWa(b,c,d);this.updateMessagePreviewRendererFromState_(this.buyFlowState_);this.superChatEmojiManager&&this.superChatEmojiManager.load(a.emojis||[],this.emojiManager);a.buyButton.buttonRenderer.trackingParams&&(a=In(a.buyButton.buttonRenderer.trackingParams))&&(b=On())&&OJ(b,a)}}, onFocusOut_:function(a){this.buyFlowState_=SWa(this.buyFlowStateManager_,a.currentTarget.value);this.updateMessagePreviewRendererFromState_(this.buyFlowState_)}, onInputChange_:function(a){this.buyFlowState_=SWa(this.buyFlowStateManager_,a.currentTarget.value,this.buyFlowState_);this.updateMessagePreviewRendererFromStateWithoutPriceInput_(this.buyFlowState_);this.adjustInputWidth_()}, adjustInputWidth_:function(){var a=document.createElement("div");a.innerText=this.$["price-input"].value;var b=window.getComputedStyle(this.$["price-input"]);a.style.fontFamily=b.fontFamily;a.style.fontSize=b.fontSize;a.style.fontWeight=b.fontWeight;a.style.display="inline-block";a.style.visibility="hidden";document.querySelector("body").appendChild(a);this.updateStyles({"--price-input-width":a.clientWidth+16+"px"});document.querySelector("body").removeChild(a)}, onSliderImmediateChange_:function(){var a=this.$["price-slider"];a.dragging&&this.handleSliderChange_(a.immediateValue)}, onSliderChange_:function(){this.handleSliderChange_(this.$["price-slider"].value)}, onSliderFocus_:function(){this.updateSliderAria_(this.buyFlowState_)}, handleSliderChange_:function(a){var b=this.buyFlowStateManager_,c=b.messageTiers;a=RWa(b,a===c.messageTiers.length?Number(c.messageTiers[c.messageTiers.length-1].maxPriceMicros):Number(c.messageTiers[a].minPriceMicros),a);this.updateMessagePreviewRendererFromState_(a)}, updateSliderAria_:function(a){var b=this.$["price-slider"];b.setAttribute("aria-valuenow",a.sliderAriaState.valueNow);b.setAttribute("aria-valuemax",a.sliderAriaState.valueMax);b.setAttribute("aria-valuemin",a.sliderAriaState.valueMin)}, computeSliderMaxMarkers_:function(a){return a}, onCharacterCountChanged_:function(a){this.messageCharacterCount=a.detail.characterCount}, onBuyButtonClick_:function(){var a=this,b=this.getMessageRendererElement_();b=b?b.inputMessage():null;var c=this.data.buyButton.buttonRenderer.serviceEndpoint;c.ypcGetCartEndpoint?this.sendAction("yt-live-chat-start-buy-flow",[c,{purchase_price_micros:this.priceMicros,rich_chat_message:b},this.buyFlowCallback_.bind(this)]):c.ypcHandleTransactionEndpoint?this.sendServiceRequestAction([c,{purchase_price_micros:this.priceMicros,rich_chat_message:b}]).then(function(){a.selectedPage=0}):c.sendLiveChatMessageEndpoint&& this.sendServiceRequestAction([c, {client_message_id:c.sendLiveChatMessageEndpoint.clientIdPrefix||"",rich_message:b}]).then(function(){a.closeBuyFlow();a.selectedPage=0}); this.logExplicitClick(this.data.buyButton.buttonRenderer);this.$.loading.style.height=this.$.preview.clientHeight+"px";this.$.blank.style.height=this.$.preview.clientHeight+"px";this.selectedPage=1}, getMessageRendererElement_:function(){return this.$$("#message-renderer").firstChild}, onWalletDialogClose_:function(){this.selectedPage=0}, onWalletDialogComplete_:function(){this.selectedPage=1}, onWalletDialogOpen_:function(){this.selectedPage=2}, buyFlowCallback_:function(a){a.success?(a.response&&a.response.data&&a.response.data.actions&&this.sendAction("yt-live-chat-actions",[a.response.data.actions]),this.closeBuyFlow()):(this.selectedPage=0,a.errorMessageRenderer&&this.handleMessageRenderer_(a.errorMessageRenderer))}, handleMessageRenderer_:function(a){var b=AL(a,"renderer");if("confirmDialogRenderer"===b){var c=A("openPopupConfig");c&&this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:c.popupTypeMap[b],popup:a}},this])}else this.setErrorRenderer(a)}, onCloseButtonClick_:function(){this.closeBuyFlow()}, closeBuyFlow:function(){this.sendAction("yt-live-chat-close-buy-flow");this.setErrorRenderer(null)}, updateMessagePreviewRendererFromStateWithoutPriceInput_:function(a){this._setMessageTemplate(a.messagePreviewState.messageRenderer);this._setShouldShowPickers(a.messagePreviewState.shouldShowPickers);this._setDurationLabel(a.messagePreviewState.durationLabel);this._setIsInvalidPrice(a.isInvalidPrice);this._setHideDurationLabel(a.shouldHideDurationLabel);this.maxCharacterCount=a.messagePreviewState.maxNumCharacters;this.priceMicros=a.priceMicros;this.sliderIndex=a.sliderIndex;this.getMessageRendererElement_().set("data.purchaseAmountText", zL(a.formattedPriceWithCurrency));this.updateSliderAria_(a)}, updateMessagePreviewRendererFromState_:function(a){this.updateMessagePreviewRendererFromStateWithoutPriceInput_(a);this.priceInputValue=a.formattedPrice}, computeMessageTooLong_:function(a,b){return a>b}, computeBuyButtonDisabled_:function(a,b){return a||b}, computeCurrencySymbol_:function(a){if(!a)return"";dDa();return HF[a][1]}, computeCharacterCountDisplay_:function(a,b){return 0==b?0:a}, onHelpClick_:function(){var a=this.$.dialog.querySelector("yt-live-chat-dialog-renderer");a&&(a.hidden=!1)}, handlePickerButtonToggle_:function(a){a=a.detail.targetId;this.togglePicker_(a);"emoji"==a&&this.getMessageRendererElement_().inputFocus()}, onEmojiSelect_:function(a){var b=this.getMessageRendererElement_();b.inputFocus();b.inputInsertEmoji(a.detail)}, computeHideCurrencySymbol_:function(a,b){return b?a==b:!0}});var hXa;var iXa;var jXa=function(){return O.apply(this,arguments)||this}; p(jXa,O); h.Object.defineProperties(jXa,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===iXa){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hXa){var d=document.createElement("template");d.innerHTML=""; hXa=d}d=hXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);iXa=a}a=iXa;return a}}}); var VO=jXa;w([P(W.YtRendererBehavior),x("design:type",Object)],VO.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],VO.prototype,"data",void 0);VO=w([uO({is:"yt-live-chat-paid-message-footer-renderer"})],VO);var kXa,lXa=function(){if(void 0!==kXa)return kXa;var a=document.createElement("template");a.innerHTML=""; return kXa=a};var mXa;Polymer({is:"yt-icon",_template:function(){if(void 0!==mXa)return mXa;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(lXa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);return mXa= a}, properties:{icon:String,targetContainer:{type:String,value:""}},observers:["iconChanged_(icon, targetContainer, isAttached)"],meta_:new Polymer.IronMeta({type:"iconset"}),created:function(){this.iconName_="";this.iconsetName_="yt-icons";this.iconset_=null;this.missingIconSet_=!1}, iconChanged_:function(a,b,c){(a||this.iconName_)&&c&&(a?(!N("default_to_innertube_icon")||0>16&255,a>>8&255,a&255,(a>>24&255)/255].join()+")"}, markAsDeleted:function(a,b){this.set("data.deletedStateMessage",a);this.set("data.showOriginalContentMessage",b)}, onMenuButtonFocus_:function(){this.menuFocused=!0}, onMenuButtonBlur_:function(){this.menuFocused=!1}, showContextMenu:function(a){if(this.data.contextMenuEndpoint){var b=this.getInterface(UM),c=this.data.contextMenuEndpoint;mM()?(b=b.endpointToXhrUrl(c),b=oM(mM(),{},b)):b=b.requestDataForEndpoint(c);b.then(this.handleGetContextMenuResponse_,this.handleGetContextMenuError_,this);a&&a.stopPropagation()}}, handleGetContextMenuResponse_:function(a){mM()||(a=a.response);a.liveChatItemContextMenuSupportedRenderers&&a.liveChatItemContextMenuSupportedRenderers.menuRenderer&&this.showContextMenu_(a.liveChatItemContextMenuSupportedRenderers.menuRenderer);a.actions&&this.sendAction("yt-live-chat-actions",[a.actions])}, handleGetContextMenuError_:function(a){if(a instanceof Error||a instanceof Object||a instanceof String)var b=a;Um(new Pl("Error encountered calling GetLiveChatItemContextMenu",b))}, showContextMenu_:function(a){this.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:a}}})}, onYtPopupOpened_:function(){this.menuOpen=!0;this.fire("yt-live-chat-context-menu-opened")}, onYtPopupClosedOrCanceled_:function(){this.menuOpen=!1;this.fire("yt-live-chat-context-menu-closed")}}; bP.YtLiveChatItemBehavior=[tXa,AO.YtComponentBehavior,aP.YtOpenPopupBehavior,V.YtActionSenderBehavior];function cP(a){if(!a)return null;for(var b=[],c=0;c
\n
\n \n \n
\n
\n
[[getSimpleString(data.authorName)]]
\n
\n \n \n
[[getSimpleString(data.purchaseAmountText)]]
\n
\n
\n [[timestampString]]\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nXa){var d=document.createElement("template");d.innerHTML=""; nXa=d}d=nXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return pXa=a}, properties:{data:{type:Object,observer:"dataChanged_"},isUserEditable:{type:Boolean,reflectToAttribute:!0,computed:"computeIsUserEditable_(data)"},showOnlyHeader:{type:Boolean,computed:"computeShowOnlyHeader_(data, isDeleted)",reflectToAttribute:!0},showFooterDivider:{type:Boolean,computed:"computeShowFooterDivider_(data, isDeleted, isUserEditable)",reflectToAttribute:!0},allowAnimations:{type:Boolean,reflectToAttribute:!0,value:!1}},supportsInlineActionButtons:!0,behaviors:[FO.YtPdgLiveChatItemBehavior, W.YtRendererBehavior,bP.YtLiveChatItemBehavior,Y],observers:["isDeletedChanged_(isDeleted)","messageChanged_(data.message)"],stampDom:{"data.footer":{id:"footer",mapping:{liveChatPaidMessageFooterRenderer:{component:"yt-live-chat-paid-message-footer-renderer"}}},"data.buyButton":{id:"buy-flow-button",mapping:{buttonRenderer:"yt-button-renderer"}}},ready:function(){var a=document.querySelector("yt-live-chat-app");a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed", "")}, attached:function(){this.allowAnimations=!1}, dataChanged_:function(a){if(a){var b={};b["--yt-live-chat-paid-message-primary-color"]=this.colorFromDecimal(a.bodyBackgroundColor);b["--yt-live-chat-paid-message-secondary-color"]=this.colorFromDecimal(a.headerBackgroundColor);b["--yt-live-chat-paid-message-header-color"]=this.colorFromDecimal(a.headerTextColor);b["--yt-live-chat-paid-message-author-name-color"]=this.colorFromDecimal(a.authorNameTextColor);b["--yt-live-chat-paid-message-timestamp-color"]=this.colorFromDecimal(a.timestampColor);b["--yt-live-chat-paid-message-color"]= this.colorFromDecimal(a.bodyTextColor);this.updateStyles(b);this.allowAnimations=!0}}, messageChanged_:function(a){var b=Polymer.dom(this.$.message);b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, computeShowOnlyHeader_:function(a,b){return a?this.isEmpty_(a,b)&&!a.footer:!1}, computeShowFooterDivider_:function(a,b,c){return a?!!a.footer&&!this.isEmpty_(a,b)&&!c:!1}, computeIsUserEditable_:function(a){return!!a.inputField}, inputFocus:function(){var a=this.$$("yt-live-chat-text-input-field-renderer");a&&a.focus()}, inputInsertEmoji:function(a){var b=this.$$("yt-live-chat-text-input-field-renderer");b&&b.insertEmoji(a)}, inputMessage:function(){var a=this.$$("yt-live-chat-text-input-field-renderer");return a&&this.data.inputField?(a.completeEmojis(),cP(a.liveChatRichMessageInput)):null}, isDeletedChanged_:function(a){a&&this.set("data.message",null)}, isEmpty_:function(a,b){return a?a.empty||!(a.message||a.inputField||b):!0}, onBuyButtonClick_:function(){var a=this.data.buyButton.buttonRenderer;if(a.trackingParams){var b=In(a.trackingParams);if(b){var c=On();c&&QJ(c,b)}}a.command&&this.fire("yt-navigate",{endpoint:a.command})}});var uXa=document.createElement("template");uXa.innerHTML="";document.head.appendChild(uXa.content);var vXa;var wXa;var xXa;var yXa;Polymer({is:"yt-live-chat-text-input-field-suggestion",_template:function(){if(void 0!==yXa)return yXa;var a=document.createElement("template");a.innerHTML="\n \"[[data.alt]]\"\n [[data.text]]\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xXa){var d=document.createElement("template");d.innerHTML=""; xXa=d}d=xXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return yXa=a}, properties:{data:{type:Object,observer:"dataChanged_"},active:{type:Boolean,reflectToAttribute:!0}},identity:vb,dataChanged_:function(){this.active=!1}, onClick_:function(){this.fire("yt-live-chat-select-suggestion",this.data)}});Polymer({SPLIT_REGEX:/.*([:@#].*?)$/,NBSP_REGEX:/\u00a0/g,NBSP:String.fromCharCode(160),MAX_SUGGESTIONS:64,is:"yt-live-chat-text-input-field-renderer",_template:function(){if(void 0!==wXa)return wXa;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n
\n\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vXa){var d=document.createElement("template");d.innerHTML=""; vXa=d}d=vXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return wXa=a}, properties:{data:{type:Object,observer:"dataChanged_"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},inputTabIndex:{type:Number,computed:"computeInputTabIndex_(disabled)"},maxCharacterLimit:{type:Number,notify:!0,readOnly:!0,computed:"computeMaxCharacterLimit_(data.maxCharacterLimit)"},characterCount:{type:Number,notify:!0,readOnly:!0,computed:"computeCharacterCount_(liveChatRichMessageInput)",observer:"characterCountChanged_"},liveChatRichMessageInput:{type:Object,value:null,notify:!0,readOnly:!0}, hasText:{type:Boolean,reflectToAttribute:!0,computed:"computeHasText_(characterCount)"},isValidWithNoInputText:{type:Boolean,value:!1},isInputValid:{type:Boolean,computed:"computedIsInputValid(characterCount, maxCharacterLimit, isValidWithNoInputText)"},focused:{readOnly:!0,type:Boolean,value:!1,reflectToAttribute:!0},suggestions:{type:Array,value:[]},emojiManager:Object,participantsManager:Object},behaviors:[W.YtRendererBehavior,Y],listeners:{"yt-live-chat-select-suggestion":"onSuggestion_"},stampDom:{suggestions:{id:"dropdown-content", mapping:{suggestion:"yt-live-chat-text-input-field-suggestion"},reuseComponents:!0}},created:function(){this.suggestionIndex_=-1;this.lastSuggestionRange_=null}, ready:function(){this.scopeSubtree(this.$.input,!0)}, attached:function(){we&&(document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1))}, detached:function(){this.setLiveChatRichMessageInput(null)}, dataChanged_:function(a){var b={placeholderTextColor:"--yt-live-chat-text-input-field-placeholder-color",activeUnderlineColor:"--yt-live-chat-text-input-field-active-underline-color",inactiveUnderlineColor:"--yt-live-chat-text-input-field-inactive-underline-color"},c=!1,d={},f;for(f in b)a&&a[f]&&(d[b[f]]=this.colorFromDecimal(a[f]),c=!0);c&&this.updateStyles(d)}, colorFromDecimal:function(a){a=parseInt(a,10);return"rgba("+[a>>16&255,a>>8&255,a&255,(a>>24&255)/255].join()+")"}, preventDrag_:function(a){a.dataTransfer&&(a.dataTransfer.dropEffect="none");a.preventDefault()}, preventResize_:function(a){a.returnValue=!1}, onInputChange_:function(){var a=this.getCurrentRange_();if(a){var b=this.calculateTextBeforeRange_(a);this.completeEmojis_(a,b,!0)||this.updateSuggestions_(a,b)}this._setLiveChatRichMessageInput(this.calculateLiveChatRichMessageInput_())}, getCurrentRange_:function(){var a=window.getSelection();return a.rangeCount?a.getRangeAt(0).cloneRange():null}, getInputRange_:function(){var a=this.getCurrentRange_();if(a){for(var b=a.commonAncestorContainer,c=!1;b;){if(b==this.$.input){c=!0;break}b=b.parentNode}c||(a=null)}a||(a=this.getRangeAtEnd_());return a}, getRangeAtEnd_:function(){var a=document.createRange();this.$.input.lastChild?a.setStart(this.$.input.lastChild,this.$.input.lastChild.length):(a.selectNodeContents(this.$.input),a.collapse(!1));return a}, getSuggestions_:function(a){var b=[],c=a.substr(0,3),d=gXa(this.emojiManager,c);if(d)for(var f in d)if(0==f.toLocaleLowerCase().indexOf(a)){var g=d[f];if(g&&g.emojiId){g=SO(this.emojiManager,g.emojiId);var l=void 0;l=g.image&&g.image.accessibility&&g.image.accessibility.accessibilityData?g.image.accessibility.accessibilityData.label:g.isCustomEmoji?g.shortcuts[0]:g.emojiId;b.push({suggestion:{emoji:!0,image:g.image,alt:l,text:f}});if(b.length>=this.MAX_SUGGESTIONS)break}}if(0==c.indexOf("@")||0== c.indexOf("#"))if(d=c.substr(0,1),a=a.substr(1),c=c.substr(1),c=this.participantsManager.getAuthorsFromPrefix(c))for(var m in c)if(0==m.indexOf(a)&&(f=c[m],g=CL(f.authorName),b.push({suggestion:{author:!0,authorType:d,image:f.authorPhoto,alt:g,text:g}}),b.length>=this.MAX_SUGGESTIONS))break;return b?b.sort(function(n,r){return r.suggestion.text"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===CXa){var d=document.createElement("template");d.innerHTML=""; CXa=d}d=CXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return DXa=a}, behaviors:[Polymer.PaperRippleBehavior],properties:{label:String,disabled:{type:Boolean,reflectToAttribute:!0},noink:Boolean,pressed:Boolean,toggleable:Boolean,untabbable:Boolean},listeners:{down:"rippleDown_",up:"rippleUp_"},ready:function(){var a=this,b=this.$.button;b.addEventListener("focus",function(){a.rippleDown_()}); b.addEventListener("blur",function(){a.rippleUp_()})}, computeTabIndex_:function(a){return a?-1:0}, computeButtonAriaPressed_:function(a){if(this.toggleable)return a?"true":"false"}, rippleDown_:function(){this.noink||this.getRipple().downAction()}, rippleUp_:function(){this.noink||this.getRipple().upAction()}, ensureRipple:function(a){var b=this._ripple;Polymer.PaperRippleBehavior.ensureRipple.apply(this,arguments);this._ripple&&this._ripple!==b&&(this._ripple.center=!0,this._ripple.classList.add("circle"))}});var EXa;var OXa=function(){var a=document.body,b=a.appendChild;if(void 0===EXa){var c=document.createElement("template");c.innerHTML=""; EXa=c}c=EXa;b.call(a,c.content)}; document.body?OXa():window.addEventListener("DOMContentLoaded",OXa);var PXa=[W.YtRendererBehavior,V.YtActionSenderBehavior,dP.YtEndpointBehavior,{properties:{alignByText:{type:Boolean,value:!1,reflectToAttribute:!0},useKeyboardFocused:{type:Boolean,value:function(){return!!this.getInterface(eP)&&N("kevlar_keyboard_button_focus")}, reflectToAttribute:!0},keyboardFocused:{type:Boolean,value:!1,reflectToAttribute:!0},startJustified:{type:Boolean,value:!1,reflectToAttribute:!0},forceIconButton:{type:Boolean,value:!1},forceIconOnly:{type:Boolean,value:!1},styleActionButton:{type:Boolean,reflectToAttribute:!0},verticallyAligned:{type:Boolean,value:!1,reflectToAttribute:!0},noink:{type:Boolean,value:!1},showTooltips:{type:Boolean,value:!1},buttonRaised:{type:Boolean,value:!1},disabled:{type:Boolean,observer:"disabledChanged_",reflectToAttribute:!0}, sendServiceEndpointWhenDisabled:{type:Boolean,value:!1},ellipsisTruncate:Boolean,buttonTooltipPosition:{type:String,value:"bottom"},buttonSize:{type:String,reflectToAttribute:!0},endpoint:{type:Object,readOnly:!0},serviceEndpoint:{type:Object,readOnly:!0},command:{type:Object,readOnly:!0},buttonIcon:{type:String,readOnly:!0,observer:"buttonIconChanged_"},buttonText:{type:Object,readOnly:!0},buttonAccessibility:{type:Object,readOnly:!0},buttonTooltip:{type:String,readOnly:!0},buttonClass:{type:String, readOnly:!0,observer:"buttonClassChanged_"},iconPositionType:{type:String,readOnly:!0,observer:"iconPositionTypeChanged_"},stampType_:{type:String,computed:"computeStampType_(forceIconButton, buttonText, buttonIcon, endpoint)",observer:"stampTypeChanged_"},componentReady_:Boolean},listeners:{focusin:"onFocus_",focusout:"onBlur_",mouseenter:"addTooltips_",tap:"onYtButtonTap_"},observers:["isDisabledChanged_(data.isDisabled)","observeBasicPalette_(data.colorData.basicColorPaletteData)","dataChanged_(data, componentReady_)"], created:function(){this.elements_={};this.hasChange_=!1}, attached:function(){this.hasChange_&&this.stampTypeChanged_(this.stampType_);this.keyboardFocused=!1}, get container(){return this.root},onYtButtonTapHandler:function(){}, ytButtonServiceEndpointHandler:function(){}, updateRenderedElements:function(){if(this.elements_.endpoint){this.elements_.endpoint.data=this.endpoint;var a=this.computeHref_(this.endpoint,!0);a?this.elements_.endpoint.setAttribute("href",a):this.elements_.endpoint.removeAttribute("href")}if(this.buttonClass){a=this.buttonClass.split(" ");a=k(a);for(var b=a.next();!b.done;b=a.next())b=b.value,this.toggleClass(b,!0),this.toggleClass(b,!0,this.elements_.button),this.toggleClass(b,!0,this.elements_.text)}this.elements_.icon&&(this.elements_.icon.icon= this.buttonIcon);this.elements_.text&&(this.elements_.text.text=this.buttonText);this.elements_.button&&(a=null,this.buttonAccessibility&&(a=this.buttonAccessibility.label),"yt-icon-button"==this.elements_.button.is?this.elements_.button.label=a:a?this.elements_.button.setAttribute("aria-label",a):this.elements_.button.removeAttribute("aria-label"))}, dataChanged_:function(){this.updateRenderedElements()}, onFocus_:function(){this.addTooltips_();if(this.useKeyboardFocused){var a=this.getInterface(eP);a&&(this.keyboardFocused=a.isKeyBoardInUse())}}, onBlur_:function(){this.keyboardFocused=!1}, addTooltips_:function(){this.elements_.endpoint&&this.showTooltips&&this.buttonTooltip&&(this.elements_.tooltip||(this.elements_.tooltip=this.reuseEnabled_()?ho("paper-tooltip"):document.createElement("paper-tooltip"),this.elements_.tooltip.position=this.buttonTooltipPosition,this.elements_.tooltip.offset=8,this.elements_.tooltip.fitToVisibleBounds=!0,Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.tooltip)),Polymer.dom(this.elements_.tooltip).textContent=this.buttonTooltip)}, buttonClassChanged_:function(a,b){if(b)for(a=b.split(" "),a=k(a),b=a.next();!b.done;b=a.next())b=b.value,this.toggleClass(b,!1),this.toggleClass(b,!1,this.elements_.button),this.toggleClass(b,!1,this.elements_.text)}, buttonIconChanged_:function(a){this.elements_.icon?a?this.elements_.icon.icon=a:(this.elements_.button&&Polymer.dom(this.elements_.button).removeChild(this.elements_.icon),this.elements_.icon=null,this.toggleAttribute("is-paper-button-with-icon",!1)):a&&this.stampType_&&"paper_button"==this.stampType_&&this.addIconElementToPaperButton_()}, addIconElementToPaperButton_:function(){this.elements_.icon=this.getIcon_();this.elements_.button&&(this.iconPositionType&&"BUTTON_ICON_POSITION_TYPE_LEFT_OF_TEXT"!=this.iconPositionType?"BUTTON_ICON_POSITION_TYPE_RIGHT_OF_TEXT"==this.iconPositionType&&Polymer.dom(this.elements_.button).appendChild(this.elements_.icon):Polymer.dom(this.elements_.button).insertBefore(this.elements_.icon,this.elements_.text),this.toggleAttribute("is-paper-button-with-icon",!0))}, stampTypeChanged_:function(a){if(void 0===this.isAttached)this.hasChange_=!0;else if(this.hasChange_=!1,this.emptyContainer_(),this.elements_={},this.componentReady_=!1,a){var b=!1;this.elements_.endpoint=document.createElement("a");this.elements_.endpoint.classList.add("yt-simple-endpoint");this.elements_.endpoint.tabIndex=-1;switch(a){case"yt_icon_button_with_label":b=!0;this.toggleClass("force-icon-button",!0);this.elements_.button=this.getYtIconButton_();a=Polymer.dom(this.elements_.button).firstElementChild; this.elements_.icon=a;this.elements_.text=this.getFormattedString_();this.elements_.text.id="text";this.elements_.text.ellipsisTruncate=this.ellipsisTruncate;Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.text);break;case"paper_button":this.elements_.button=this.reuseEnabled_()?ho("paper-button"):document.createElement("paper-button");this.elements_.text=this.getFormattedString_();this.elements_.text.id="text"; this.elements_.text.ellipsisTruncate=this.ellipsisTruncate;this.elements_.button.raised=this.buttonRaised;Polymer.dom(this.elements_.button).appendChild(this.elements_.text);Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);this.buttonIcon&&this.addIconElementToPaperButton_();break;case"yt-icon-button":b=!0,this.elements_.button=this.getYtIconButton_(),a=Polymer.dom(this.elements_.button).firstElementChild,this.elements_.icon=a,Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);}this.toggleAttribute("is-icon-button", b);this.toggleAttribute("is-paper-button",!b);this.toggleAttribute("has-no-text",!this.elements_.text);this.elements_.button.id="button";this.elements_.button.noink=this.noink;this.elements_.button.disabled=this.disabled;Polymer.dom(this.container).appendChild(this.elements_.endpoint);this.componentReady_=!0}}, iconPositionTypeChanged_:function(){this.iconPositionType&&(this.elements_.button&&this.elements_.icon&&Polymer.dom(this.elements_.button).removeChild(this.elements_.icon),this.addIconElementToPaperButton_(),this.elements_.icon.icon=this.buttonIcon)}, isDisabledChanged_:function(a){if(void 0!=a||this.disabled)this.disabled=a,this.elements_.button&&(this.elements_.button.disabled=a)}, observeBasicPalette_:function(a){fP(this,a)}, disabledChanged_:function(a){this.data&&this.set("data.isDisabled",a)}, onYtButtonTap_:function(a){if(this.disabled)a.stopImmediatePropagation(),this.sendServiceEndpointWhenDisabled&&this.serviceEndpoint&&this.sendServiceRequestAction([this.serviceEndpoint]);else if(!(this.data&&this.data.command&&this.resolveCommand(this.data.command,{},!0))){if(this.serviceEndpoint)this.ytButtonServiceEndpointHandler(),N("handle_service_request_actions")||this.sendServiceRequestAction([this.serviceEndpoint]),this.fire("yt-execute-service-endpoint",{serviceEndpoint:this.serviceEndpoint});else this.onYtButtonTapHandler();N("handle_service_request_actions")?(a=[],this.serviceEndpoint&&a.push(this.serviceEndpoint),this.data&&this.data.command&&this.data.command!=this.serviceEndpoint&&a.push(this.data.command),a.length&&this.sendInnerTubeActions(a,this)):this.data&&this.data.command&&(a=this.data.command,a.accountUnlinkCommand||a.accountLinkCommand||a.insertAdCommand||a.insertHighlightMarkerCommand||a.createLivestreamHighlightClipCommand||a.getVideoUploadFeedbackCommand||a.musicDeletePrivatelyOwnedEntityCommand? this.sendServiceRequestAction([a]):this.sendInnerTubeActions([a],this))}}, computeStampType_:function(){return this.forceIconButton&&this.buttonText&&this.buttonIcon?"yt_icon_button_with_label":this.buttonText?"paper_button":this.buttonIcon?"yt-icon-button":null}, emptyContainer_:function(){for(var a=Polymer.dom(this.container);a.lastChild&&"STYLE"!=a.lastChild.tagName;)try{a.removeChild(a.lastChild)}catch(b){break}}, getYtIconButton_:function(){var a=this.reuseEnabled_()?ho("yt-icon-button"):document.createElement("yt-icon-button"),b=Polymer.dom(a).firstElementChild;if(b&&"yt-icon"!=b.is){for(b=Polymer.dom(a);b.lastChild;)b.removeChild(b.lastChild);b=null}b||(b=this.getIcon_(),Polymer.dom(a).appendChild(b));return a}, reuseEnabled_:function(){return N("enable_button_behavior_reuse")}, getIcon_:function(){return this.reuseEnabled_()?ho("yt-icon"):document.createElement("yt-icon")}, getFormattedString_:function(){return this.reuseEnabled_()?ho("yt-formatted-string"):document.createElement("yt-formatted-string")}}];var gP={}; gP.YtButtonBehavior=[PXa,{properties:{data:Object},observers:["stateChanged_(data)","stateChanged_(data.isDisabled)","stateChanged_(data.style)","stateChanged_(forceIconOnly)"],stateChanged_:function(){var a=this.data;a&&(this._setEndpoint(this.computeEndpoint_(a)),this._setServiceEndpoint(this.computeServiceEndpoint_(a)),this._setCommand(this.computeCommand_(a)),this._setButtonIcon(this.computeButtonIcon_(a)),this._setButtonText(this.computeButtonText_(a,this.forceIconOnly)),this._setButtonAccessibility(this.computeAccessibility_(a)),this._setButtonTooltip(this.computeTooltip_(a)), this._setButtonClass(this.computeButtonClass_(a)),this._setIconPositionType(this.computeIconPositionType_(a)),this.updateRenderedElements())}, computeIconPositionType_:function(a){return a&&a.iconPosition||null}, computeEndpoint_:function(a){var b=a&&a.navigationEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.url"),d=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:a&&a.command&&a.command.modalEndpoint?a.command:c&&!d&&a.command?a.command:null}, computeServiceEndpoint_:function(a){var b=a&&a.serviceEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:c&&a.command?a.command:null}, computeCommand_:function(a){return a&&a.command||null}, computeButtonIcon_:function(a){return a&&a.icon&&a.icon.iconType?zO(a.icon.iconType):null}, computeButtonText_:function(a,b){return!b&&a&&a.text||null}, computeAccessibility_:function(a){return this.get("accessibilityData.accessibilityData",a)||a&&a.accessibility||(a&&a.text?{label:this.getSimpleString(a.text)}:null)}, computeTooltip_:function(a){return a?a.isDisabled&&a.disabledTooltip||a.tooltip||null:null}, computeButtonClass_:function(a){var b=a&&a.style?a.style.toLowerCase().replace(/_/g,"-")+" ":"";b+=a&&a.size?a.size.toLowerCase().replace(/_/g,"-")+" ":"";a.colorData&&a.colorData.basicColorPaletteData&&a.colorData.basicColorPaletteData.borderColor&&(b+="palette-with-border");return b.trim()}}];var hP={};function iP(a,b,c){hP[a]||(hP[a]={});hP[a][b]=c} function jP(a){hP[a]||(hP[a]={});return hP[a]} ;var QXa,kP=function(){if(void 0!==QXa)return QXa;var a=document.createElement("template");a.innerHTML=""; return QXa=a};var RXa,lP=function(){if(void 0!==RXa)return RXa;var a=document.createElement("template");a.innerHTML=""; return RXa=a};var SXa;var TXa=document.createElement("template");TXa.innerHTML=""; document.head.appendChild(TXa.content);var UXa=document.createElement("template");UXa.innerHTML=""; document.head.appendChild(UXa.content);var VXa=document.createElement("template");VXa.innerHTML=""; document.head.appendChild(VXa.content);var WXa=document.createElement("template");WXa.innerHTML=""; document.head.appendChild(WXa.content);iP("sharingToggleButtonAndDefaultButton","buttonRenderer","yt-button-renderer"); Polymer({is:"yt-button-renderer",_template:function(){if(void 0!==SXa)return SXa;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(lP().content.cloneNode(!0), a.content.firstChild);a.content.insertBefore(kP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);return SXa=a}, behaviors:[aP.YtOpenPopupBehavior,gP.YtButtonBehavior],listeners:{"yt-navigate":"onYtNavigate_"},created:function(){this.openPopupConfig=A("openPopupConfig");this.showTooltips=!0}, onYtNavigate_:function(a){var b=this.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(this.openPopup(b),a.stopPropagation(),a.preventDefault())}});var mP={_noAccessors:!0,properties:{disablePrescanVisibility:Boolean,prescanHeight:{type:Number,reflectToAttribute:!0}},onShow:function(){if(this.onShow_)this.onShow_()}};var XXa=A("DORMANT_IMAGE_TIMEOUT",1E3),nP=function(){this.loadTimeResolver_=YXa(this);this.sessionResolved_=!1;this.collectionJobId_=0;this.visibleSet_=new Set;this.elementLoadPromises_=new Map;this.collectionPromise_=null;this.dormantJobId_=0}; nP.prototype.onDormantLoad_=function(){this.collectionPromise_&&this.loadTimeResolver_.reject(Error("onDormantLoad_"))}; var oP=function(a){Bk.cancelJob(a.dormantJobId_);a:{var b=k(a.visibleSet_);for(var c=b.next();!c.done;c=b.next())if(c=c.value,!c.loadTime||Infinity==c.loadTime){b=!1;break a}b=!0}b||(a.dormantJobId_=xk(Bk,a.onDormantLoad_.bind(a),XXa))},$Xa=function(a,b){if(a.sessionResolved_)return!1; a.collectionJobId_&&ZXa(a);return"loadTime"in b?!0:!1}; nP.prototype.hidden=function(a){$Xa(this,a)&&(this.visibleSet_.delete(a),this.elementLoadPromises_.delete(a),oP(this))}; var aYa=function(a,b){var c=JWa(b).then(function(){if(!a.visibleSet_.has(b))return null;oP(a);return b},function(){}); a.elementLoadPromises_.set(b,c)}; nP.prototype.shown=function(a){if(!$Xa(this,a))return!1;this.visibleSet_.add(a);oP(this);aYa(this,a);return!0}; var bYa=function(a){Bk.cancelJob(a.collectionJobId_);a.collectionJobId_=0;a.collectionPromise_&&(a.collectionPromise_.cancel("canceled collectionPromise_"),a.collectionPromise_=null)},ZXa=function(a){bYa(a); var b=ek("viewport_load_collection_wait_time",0);a.collectionJobId_=xk(Bk,a.collectLoadTime_.bind(a),b)}; nP.prototype.collectLoadTime_=function(){var a=this;bYa(this);oP(this);var b=Infinity;this.collectionPromise_=Pi([].concat(fa(this.elementLoadPromises_.values())));this.collectionPromise_.then(function(c){c=c.filter(function(l){return!!l&&!!l.parentNode&&a.visibleSet_.has(l)}); for(var d=null,f=0;f";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cYa){var d=document.createElement("template");d.innerHTML=""; cYa=d}d=cYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return dYa=a}, behaviors:[mP,W.YtRendererBehavior],properties:{delayedSrc:{type:String,observer:"delayedSrcChanged_"},thumbnail:{type:Object,observer:"thumbnailChanged_"},loaded:{type:Boolean,value:!1,reflectToAttribute:!0},notifyOnLoaded:Boolean,height:Number,width:Number,dimension:{type:{WIDTH:"width",HEIGHT:"height"},value:function(){return"width"}}, fit:{type:Boolean,reflectToAttribute:!0},fitHeight:{type:Boolean,reflectToAttribute:!0},objectFit:{type:String,reflectToAttribute:!0},objectPosition:{type:String,reflectToAttribute:!0},preferredThumbnail:String,alt_:{type:String,value:"",computed:"computeAlt_(thumbnail.accessibility.accessibilityData.label, loaded)"},sharedTooltipText:{type:String,reflectToAttribute:!0},ftlEligible:Boolean},observeHiddenOption:null,observePrescanOption:"observe_once",observers:["observePlaceholderColor_(thumbnail.placeholderColor)"], EMPTY_GIF:rd("NO_EMPTY_DATA_IMG")?"":"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",created:function(){this.empty_=!0;this.loadTime=Infinity;this.hasChange_=this.pendingPaint=!1;this.oldThumbnail_=null;this.oldDelayedSrc_="";this.objectURL_=null}, attached:function(){this.hasChange_&&this.thumbnailChanged_()}, ready:function(){var a=this.shouldShowPlaceholder_();this.toggleClass("no-transition",!0);a&&this.classList.add("with-placeholder")}, isPreloaded:function(){return this.isThumbPreloaded_(this.thumbnail)}, isThumbPreloaded_:function(a){return!!this.get("webThumbnailDetailsExtensionData.isPreloaded",a)}, computeSrc_:function(){return this.delayedSrc||this.computeThumbnailSrc_(this.thumbnail)||this.EMPTY_GIF}, computeThumbnailSrc_:function(a){return a&&a.thumbnails?MO(a.thumbnails,"width"==this.dimension?this.width:this.height,this.preferredThumbnail,this.dimension):null}, computeAlt_:function(){var a=this.thumbnail&&this.thumbnail.accessibility&&this.thumbnail.accessibility.accessibilityData&&this.thumbnail.accessibility.accessibilityData.label;return this.loaded&&a||""}, thumbnailChanged_:function(){var a=k([this.thumbnail,this.oldThumbnail_]),b=a.next().value;a=a.next().value;this.oldThumbnail_=b;if(void 0===this.isAttached)this.hasChange_=!0;else{this.hasChange_=!1;if(this.loaded&&(a=this.computeThumbnailSrc_(a),this.computeThumbnailSrc_(b)==a))return;N("kevlar_attach_vimio_behavior")&&this.markDirtyVisibilityObserver();this.isThumbPreloaded_(b)?(this.loadTime=Infinity,this.setSrc_(this.thumbnail.thumbnails[0].url),this.empty_=!1):b&&rd("DISABLE_YT_IMG_DELAY_LOADING", !1)?this.loaded&&!this.empty_?Polymer.RenderStatus.afterNextRender(this,this.onReload_):Polymer.RenderStatus.afterNextRender(this,this.onShow_):this.resetImage_()}}, delayedSrcChanged_:function(){var a=this.oldDelayedSrc_;this.oldDelayedSrc_=this.delayedSrc;this.loaded&&this.delayedSrc==a||this.resetImage_()}, setSrc_:function(a){a?(this.$.img.src||this.classList.remove("empty"),this.$.img.src=a):(this.$.img.removeAttribute("src"),this.classList.add("empty"))}, resetImage_:function(){this.loaded=!1;this.loadTime=Infinity;var a=IO.get(this);a&&(a.reject(Error("resetImageLoad")),IO.delete(this));this.pendingPaint&&(KO.delete(this),this.pendingPaint=!1);this.empty_=!0;this.setSrc_(this.EMPTY_GIF);this.invalidate(!1)}, observePlaceholderColor_:function(){var a=this.thumbnail&&this.thumbnail.placeholderColor;a?this.style.backgroundColor=dO(a):this.shouldShowPlaceholder_()||(this.style.backgroundColor="transparent")}, onLoad_:function(){this.$.img.src&&this.$.img.src!=this.EMPTY_GIF&&(KO.add(this),this.pendingPaint=!0,JO||(JO=Ck(HWa)),this.notifyOnLoaded&&this.fire("yt-img-shadow-loaded"),this.objectURL_&&(URL.revokeObjectURL(this.objectURL_),this.objectURL_=null))}, onError_:function(){var a=this;if(N("kevlar_woffle"))eYa(this.$.img.src).then(function(b){if(!nea(b.type))throw Error("unsafe blob MIME type: "+b.type);if(URL&&URL.createObjectURL)b=new hh(URL.createObjectURL(b),Zg);else throw Error("cannot find createObjectURL");a.objectURL_=b.toString();a.setSrc_(a.objectURL_)});else this.onLoad_()}, onPrescanVisible:function(){this.onShow_()}, onVisible:function(){if(N("yt_img_shadow_trigger_show_on_visible"))this.onShow_();nP.getInstance().shown(this)}, onShow_:function(){if(!this.loaded||this.empty_){this.empty_=!1;var a=this.computeSrc_();a!=this.$.img.src&&(this.loaded=!1,this.setSrc_(a))}}, onReload_:function(){this.empty_=!1;var a=this.computeSrc_();a!=this.$.img.src&&(this.loaded=!1,this.setSrc_(a))}, shouldShowPlaceholder_:function(){return N("kevlar_thumbnail_bg")}});var fYa={properties:{hidden:{type:Boolean,reflectToAttribute:!0,observer:"hiddenChanged_"}},observers:["isAttachedChanged_(isAttached)"],created:function(){this.restoreFocusNode_=null}, attached:function(){document.addEventListener("focus",this.onFocus_.bind(this),!0)}, detached:function(){this.restoreFocusNode_=null;document.removeEventListener("focus",this.onFocus_.bind(this),!0)}, focusChild_:function(){window.requestAnimationFrame(function(){this.restoreFocusNode_||(this.restoreFocusNode_=document.activeElement);var a=wI(Polymer.IronFocusablesHelper,this);a.length&&a[a.length-1].focus()}.bind(this))}, isAttachedChanged_:function(a,b){a?this.focusChild_():b&&this.restoreFocus_()}, hiddenChanged_:function(){this.hidden?this.restoreFocus_():this.focusChild_()}, restoreFocus_:function(){this.restoreFocusNode_&&(this.restoreFocusNode_.focus(),this.restoreFocusNode_=null)}, onFocus_:function(a){this.hidden||-1!=Polymer.dom(a).path.indexOf(this)||(a.stopPropagation(),this.focusChild_())}};var gYa;var hYa;Polymer({is:"yt-live-chat-dialog-renderer",_template:function(){if(void 0!==hYa)return hYa;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gYa){var d=document.createElement("template");d.innerHTML=""; gYa=d}d=gYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return hYa=a}, properties:{data:Object},hostAttributes:{hidden:!0},behaviors:[Y,fYa],stampDom:{"data.confirmButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},onClick_:function(a){a.target!=this.$.button&&(this.hidden=!0)}});var iYa;var jYa;Polymer({is:"yt-live-chat-error-message-renderer",_template:function(){if(void 0!==jYa)return jYa;var a=document.createElement("template");a.innerHTML="\n \n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===iYa){var d=document.createElement("template");d.innerHTML=""; iYa=d}d=iYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return jYa=a}, properties:{data:Object,icon:{type:String,computed:"computeIcon_(data.icon)"}},dismiss:function(){this.fire("yt-live-chat-error-message-dismiss")}, computeIcon_:function(a){return a&&a.iconType?"yt-icons:"+a.iconType.toLowerCase():"yt-icons:close"}});var kYa;var lYa;Polymer({is:"yt-live-chat-icon-toggle-button-renderer",_template:function(){if(void 0!==lYa)return lYa;var a=document.createElement("template");a.innerHTML="\n \n \n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kYa){var d=document.createElement("template");d.innerHTML=""; kYa=d}d=kYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return lYa=a}, properties:{data:{type:Object,observer:"dataChanged_"},id:{type:String,computed:"computeId_(data.targetId)",reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},icon:{type:String,readOnly:!0,computed:"computeIcon_(data.icon.iconType, active)"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"disabledChanged_"},showTooltip:{type:Boolean,computed:"computeShowTooltip_(data, disabled)"}},listeners:{animationend:"onAnimationEnd_"},behaviors:[NO.YtActionHandlerBehavior, W.YtRendererBehavior,kWa.YtLiveChatTooltipTargetingBehavior],actionMap:{"yt-live-chat-actions":"handleLiveChatActions_"},created:function(){this.tooltip_=null}, dataChanged_:function(a){a.tooltip?(this.tooltip_||(this.tooltip_=document.createElement("paper-tooltip"),this.tooltip_.position="top",this.tooltip_.offset=8,this.tooltip_.fitToVisibleBounds=!0,this.appendChild(this.tooltip_)),Polymer.dom(this.tooltip_).textContent=a.tooltip):this.tooltip_&&(this.removeChild(this.tooltip_),this.tooltip_=null);a.disabled&&(this.disabled=!0)}, computeId_:function(a){return a}, computeIcon_:function(a,b){return a?b&&this.data&&this.data.toggledIcon?"yt-icons:"+this.data.toggledIcon.iconType.toLowerCase():"yt-icons:"+a.toLowerCase():""}, onClick_:function(){this.data.disabled?this.showTooltip&&this.immediatelyShowTooltip_():((this.active=!this.active)&&this.logExplicitClick(this.data),"creator"!=this.id&&"product-picker"!=this.id||this.removeBubble_(),this.fire("yt-live-chat-icon-toggle-button-renderer-toggle",{targetId:this.id}))}, immediatelyShowTooltip_:function(){var a=this.$$("#tooltip");a.animationDelay=0;a.animationConfig={entry:[{name:"fade-in-animation",timing:{}}]};a.show()}, disabledChanged_:function(a){a?Polymer.dom(this).setAttribute("aria-disabled",""):Polymer.dom(this).removeAttribute("aria-disabled")}, computeShowTooltip_:function(a,b){return!!(a&&a.tooltip&&b)}, handleLiveChatActions_:function(a){a.length&&("creator"!=this.id&&"product-picker"!=this.id||a.forEach(function(b){(b=this.get("addLiveChatTickerItemAction.item.liveChatTickerPaidMessageItemRenderer",b))&&b.durationSec==b.fullDurationSec&&this.startBubble_(this.colorFromDecimal_(b.startBackgroundColor))},this))}, onAnimationEnd_:function(){Polymer.dom(this).removeAttribute("bubble")}, startBubble_:function(a){this.updateStyles({"--yt-live-chat-monetization-button-glow":a});Polymer.dom(this).setAttribute("bubble","")}, removeBubble_:function(){Polymer.dom(this).removeAttribute("bubble")}, colorFromDecimal_:function(a){a=parseInt(a,10);return"rgba("+[a>>16&255,a>>8&255,a&255,(a>>24&255)/255].join()+")"}});var mYa;var nYa;var pP={},qP={badgeType:function(a){return a?a.icon?a.icon.iconType.toLowerCase():a.customThumbnail?"member":"":""}, badgeTypeFromBadges:function(a){if(!a)return"";for(var b=0;b
";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mYa){var d=document.createElement("template");d.innerHTML=""; mYa=d}d=mYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return nYa=a}, properties:{data:{type:Object,observer:"dataChanged_"},ariaLabel:{type:String,computed:"identity(data.accessibility.accessibilityData.label)",reflectToAttribute:!0},type:{type:String,computed:"badgeType(data)",reflectToAttribute:!0},sharedTooltipText:{type:String,computed:"identity(data.tooltip)",reflectToAttribute:!0}},behaviors:[qP],dataChanged_:function(a){for(var b=Polymer.dom(this.$.image);b.firstChild;)b.removeChild(b.firstChild);if(a)if(a.icon){var c=document.createElement("yt-icon");c.icon= "live-chat-badges:"+a.icon.iconType.toLowerCase();b.appendChild(c)}else if(a.customThumbnail){c=document.createElement("img");var d;(d=(d=MO(a.customThumbnail.thumbnails,16))?Vb($b(d)):null)?(c.src=d,b.appendChild(c),c.setAttribute("alt",this.ariaLabel)):vm(new Pl("Could not compute URL for thumbnail",a.customThumbnail))}}, identity:function(a){return a}});var oYa;var pYa;Polymer({is:"yt-live-chat-author-chip",_template:function(){if(void 0!==pYa)return pYa;var a=document.createElement("template");a.innerHTML="[[getSimpleString(authorName)]]"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===oYa){var d=document.createElement("template");d.innerHTML=""; oYa=d}d=oYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return pYa=a}, properties:{authorName:{type:Object},authorBadges:{type:Array},authorType:{type:String,computed:"badgeTypeFromBadges(authorBadges)"},badgesInsideChip:{type:Array,computed:"computeBadgesInsideChip_(authorBadges)"},badgesOutsideChip:{type:Array,computed:"computeBadgesOutsideChip_(authorBadges)"},isHighlighted:{type:Boolean,computed:"computeIsHighlighted_(authorBadges)",reflectToAttribute:!0},showUnifiedVerifiedBadge:{type:Boolean,computed:"computeShowUnifiedVerifiedBadge_(authorBadges)",reflectToAttribute:!0}}, behaviors:[AO.YtComponentBehavior,Y,qP],stampDom:{badgesOutsideChip:{id:"chat-badges",mapping:{liveChatAuthorBadgeRenderer:{component:"yt-live-chat-author-badge-renderer"}}},badgesInsideChip:{id:"chip-badges",mapping:{liveChatAuthorBadgeRenderer:{component:"yt-live-chat-author-badge-renderer"}}}},computeBadgesInsideChip_:function(a){return!a||N("enable_unified_verified_badge_live_chat")?[]:a.filter(function(b){return"verified"==this.badgeType(b.liveChatAuthorBadgeRenderer)},this)}, computeBadgesOutsideChip_:function(a){return a?a.filter(function(b){b=this.badgeType(b.liveChatAuthorBadgeRenderer);return"verified"!=b&&"owner"!=b},this):[]}, computeIsHighlighted_:function(a){var b=!!this.getBadge(a,"owner"),c=!!this.getBadge(a,"verified");a=!!this.getBadge(a,"moderator");return b||c&&(!a||N("enable_unified_verified_badge_live_chat"))}, computeShowUnifiedVerifiedBadge_:function(a){return N("enable_unified_verified_badge_live_chat")&&!!this.getBadge(a,"verified")}});var qYa;var rYa;Polymer({is:"yt-live-chat-membership-item-renderer",_template:function(){if(void 0!==rYa)return rYa;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n \n
[[getSimpleString(data.headerPrimaryText)]]
\n
\n
[[getSimpleString(data.headerSubtext)]]
\n
\n
[[timestampString]]
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qYa){var d=document.createElement("template");d.innerHTML=""; qYa=d}d=qYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return rYa=a}, properties:{data:{type:Object},hasPrimaryHeaderText:{type:Boolean,computed:"computeHasPrimaryHeaderText_(data)",reflectToAttribute:!0},showOnlyHeader:{type:Boolean,computed:"computeShowOnlyHeader_(data, isDeleted)",reflectToAttribute:!0},authorBadges:{type:Object,computed:"computeAuthorBadges_(data)"}},supportsInlineActionButtons:!0,behaviors:[W.YtRendererBehavior,bP.YtLiveChatItemBehavior,Y],observers:["isDeletedChanged_(isDeleted)","messageChanged_(data.message)"],ready:function(){var a=document.querySelector("yt-live-chat-app"); a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed","")}, messageChanged_:function(a){var b=Polymer.dom(this.$.message);b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, computeHasPrimaryHeaderText_:function(a){return!(!a||!a.headerPrimaryText)}, computeShowOnlyHeader_:function(a,b){return this.isMessageEmpty_(a,b)}, computeAuthorBadges_:function(a){return a.authorBadges||[]}, isMessageEmpty_:function(a,b){return!a||a.empty?!0:!a.message&&!a.inputField&&!b}, isDeletedChanged_:function(a){a&&(this.set("data.authorName",null),this.set("data.authorPhoto",null),this.set("data.message",null))}, getInputElement:function(){return this.$$("yt-live-chat-text-input-field-renderer")}, inputFocus:function(){var a=this.getInputElement();a&&a.focus()}, inputInsertEmoji:function(a){var b=this.getInputElement();b&&b.insertEmoji(a)}, inputMessage:function(){var a=this.getInputElement();return a&&this.data.inputField?(a.completeEmojis(),cP(a.liveChatRichMessageInput)):null}});var sYa;var tYa;Polymer({is:"yt-emoji-picker-category-button-renderer",_template:function(){if(void 0!==tYa)return tYa;var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===sYa){var d=document.createElement("template");d.innerHTML=""; sYa=d}d=sYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return tYa=a}, properties:{data:{type:Object,observer:"dataChanged_"},id:{type:String,computed:"computeId_(data.categoryId)",reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},icon:{type:String,readOnly:!0,computed:"computeIcon_(data.icon.iconType)"}},created:function(){this.tooltip_=null}, dataChanged_:function(a){a.tooltip&&(this.tooltip_||(this.tooltip_=document.createElement("paper-tooltip"),this.$.button.appendChild(this.tooltip_)),Polymer.dom(this.tooltip_).textContent=a.tooltip)}, computeId_:function(a){return a}, computeIcon_:function(a){return zO(a)}, onTap_:function(){this.active=!this.active;this.fire("yt-emoji-picker-select-category",{categoryId:this.id})}});var uYa;var vYa;Polymer({is:"yt-emoji-picker-category-renderer",_template:function(){if(void 0!==vYa)return vYa;var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===uYa){var d=document.createElement("template");d.innerHTML=""; uYa=d}d=uYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return vYa=a}, properties:{data:Object,id:{type:String,computed:"computeId_(data)"},emoji:{type:Array,computed:"computeEmoji_(data)",observer:"emojiChanged_"},skinTone:Number,emojiManager:{type:Object,observer:"emojiManagerChanged_"},focusedIndex:{type:Number,value:0},showFocus:{type:Boolean,value:!1},ariaLabel:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaLabel_(data.title)"},ariaActivedescendant:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaActivedescendant_(emoji, focusedIndex)"}, domRepeatTargetFramerate:{type:Number,value:ek("live_chat_incremental_emoji_rendering_target_framerate")},domRepeatInitialCount:{type:Number,computed:"computeDomRepeatInitialCount_(domRepeatTargetFramerate)"}},behaviors:[NO.YtActionHandlerBehavior],hostAttributes:{"aria-live":"polite",role:"listbox",tabindex:0},listeners:{focus:"onFocus_",blur:"onBlur_",mouseover:"onMouseOver_",mousedown:"onMouseDown_",keydown:"onKeyDown_",click:"onClick_"},actionMap:{"yt-live-chat-emoji-skin-tone-changed":"emojiSkinToneChanged_"}, created:function(){this.ignoreNextFocus_=!1}, emojiChanged_:function(a){this.changeFocus_(0,!1);for(var b=OL(),c=0;c
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yYa){var d=document.createElement("template");d.innerHTML=""; yYa=d}d=yYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return zYa=a}, properties:{data:Object,id:{type:String,computed:"computeId_(data)"},emoji:{type:Array,computed:"computeEmoji_(data)",observer:"emojiChanged_"},titleOffset:{type:Number,value:0,observer:"titleOffsetChanged_"},ariaLabel:{type:String,value:null,reflectToAttribute:!0,computed:"getFormattedStringRawText(data.upsell)"},ariaActivedescendant:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaActivedescendant_(focusedIndex)"},showFocus:{type:Boolean,value:!1},focusedIndex:{type:Number,value:0}, emojiManager:{type:Object}},listeners:{focus:"onFocus_",blur:"onBlur_",mousedown:"onMouseDown_",keydown:"onKeyDown_",click:"onEmojiTap_"},behaviors:[AO.YtComponentBehavior],hostAttributes:{"aria-live":"polite",role:"listbox",tabindex:0},created:function(){this.ignoreNextFocus_=!1}, emojiUrl:function(a){a=SO(this.emojiManager,a,!0).image.thumbnails;return MO(a,24)||""}, emojiAlt:function(a){var b=this.get("image.accessibility.accessibilityData.label",a);return b?b:a.isCustomEmoji?a.shortcuts[0]:a.emojiId}, emojiId:function(a){return"emoji"+a}, computeId_:function(a){return a.categoryId||""}, computeAriaActivedescendant_:function(a){return this.emoji&&a
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wYa){var d=document.createElement("template");d.innerHTML=""; wYa=d}d=wYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return xYa=a}, properties:{data:Object,categories:{type:Array,value:function(){return[]}}, categoryButtons:{type:Array,value:function(){return[]}}, id:{type:String,computed:"computeId_(data)",reflectToAttribute:!0},selected:{type:Boolean,value:!1},placeholder:String,search:{type:String,value:"",observer:"searchChanged_"},searching:{type:Boolean,computed:"computeSearching_(search)",reflectToAttribute:!0},searchCategory:{type:Object,computed:"computeSearchCategory_(search)"},searchEmptyMessage:{type:String,computed:"computeSearchEmptyMessage_(searching, searchCategory)"},skinTone:{type:Number,computed:"identity(emojiManager.skinTone)",observer:"skinToneChanged_"}, skinToneOpened:{type:Boolean,value:!1},skinToneHidden:{type:Boolean,computed:"computeSkinToneHidden_(skinToneOpened, categories)"},emojiManager:Object},behaviors:[V.YtActionSenderBehavior,W.YtRendererBehavior,Y],listeners:{"yt-emoji-picker-select-category":"onSelectCategory_","yt-emoji-hover":"onEmojiHover_"},stampDom:{categories:{id:"categories",mapping:{emojiPickerCategoryRenderer:{component:"yt-emoji-picker-category-renderer",properties:{emojiManager:"[[emojiManager]]"}},emojiPickerUpsellCategoryRenderer:{component:"yt-emoji-picker-upsell-category-renderer", properties:{emojiManager:"[[emojiManager]]"}}}},categoryButtons:{id:"category-buttons",mapping:{emojiPickerCategoryButtonRenderer:"yt-emoji-picker-category-button-renderer"}}},observers:["updateCategoriesAndPlaceholder_(data, selected)"],identity:vb,created:function(){this.lastAnimationTime_=0;this.animationEnd_=this.animationStart_=null}, attached:function(){te&&(this.style.height=this.clientHeight+150+"px")}, updateCategoriesAndPlaceholder_:function(a,b){a&&b&&(this.categories=a.categories||[],this.categoryButtons=a.categoryButtons||[],this.resetPlaceholder(),this.search="",this.async(this.updateButtons_))}, computeId_:function(a){return a.id||""}, onScroll_:function(){null==this.animationEnd_&&window.requestAnimationFrame(this.updateButtons_.bind(this))}, onSelectCategory_:function(a){var b=""!=this.search;this.search="";for(var c=this.$.categories.children,d=0;d\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===AYa){var d=document.createElement("template");d.innerHTML=""; AYa=d}d=AYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return BYa=a}, actionMap:{"yt-live-chat-close-buy-flow":"resetState_"},behaviors:[Polymer.IronResizableBehavior,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,Y,W.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},selectedIndex:{type:Number,readOnly:!0},isPreviewHidden:{type:Boolean,value:!0},numberOfStickerPacks:{type:Number},numOfPacksToShift:{type:Number},firstPackIndexInView:{type:Number,value:0},isAtFront:{type:Boolean},isAtBack:{type:Boolean}},stampDom:{"data.helpButton":{id:"help-button", mapping:{buttonRenderer:"yt-button-renderer"}},"data.backButton":{id:"close-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.superStickerPacks":{id:"stickers-container",mapping:{superStickerPackRenderer:"yt-live-chat-super-sticker-pack-renderer"}}},listeners:{"iron-resize":"onIronResize_","yt-super-sticker-close-preview":"closePreview_","yt-super-sticker-open-preview":"onStickerClick_"},created:function(){this.scrollHandler_=null;this.hasScrollToPack_=!1}, attached:function(){var a=this;this.$["sticker-tabs"].$.tabsContent.addEventListener("track",function(b){return a.onTrack_(b)})}, detached:function(){this.scrollHandler_&&window.cancelAnimationFrame(this.scrollHandler_);this.hasScrollToPack_=!1}, stringAsRawText:function(a){return CL(a)}, dataChanged_:function(a){var b=a.defaultStickerPackId;b?this.setSelectTab_(this.computeSelectedIndex_(a,b)):this.setSelectTab_(0);this.scrollHandler_=null;this.numberOfStickerPacks=a.superStickerPackButtons.length}, onDomChange_:function(){if(!this.hasScrollToPack_&&(this.hasScrollToPack_=!0,this.$.template.render(),this.updateTabsProperties_(),!this.isAtFront||!this.isAtBack)){var a=Math.floor(this.selectedIndex/this.numOfPacksToShift);if(0==a)this.isAtFront=!0,this.isAtBack=!1;else for(var b=0;b=this.numberOfStickerPacks&&(this.firstPackIndexInView=this.numberOfStickerPacks-this.numOfPacksToShift,this.isAtBack=!0)}, onScrollForwardWithAnimation_:function(){this.$["scroll-forward-button"].disabled||(this.recalculateScrollForwardPositions_(),this.animateScroll_())}, onScrollForwardWithoutAnimation_:function(){this.recalculateScrollForwardPositions_();this.$["sticker-tabs"].$.tabsContainer.scrollLeft=this.$.header.querySelectorAll("paper-tab")[this.firstPackIndexInView].offsetLeft}, animateScroll_:function(){var a=this.$["sticker-tabs"].$.tabsContainer.scrollLeft,b=this.$.header.querySelectorAll("paper-tab")[this.firstPackIndexInView].offsetLeft-a,c=this.$["scroll-forward-button"];this.$["scroll-back-button"].disabled=!0;c.disabled=!0;this.scroll_(0,12,0=c*d){var m=this.$["scroll-back-button"],n=this.$["scroll-forward-button"];l.$.tabsContainer.scrollLeft=f+d;m.disabled=!1;n.disabled=!1}else this.scrollHandler_=window.requestAnimationFrame(function(){return g.scroll_(a,b,c,d,f)})}, onIronResize_:function(){this.hasScrollToPack_&&this.debounce("resize",this.updateTabsProperties_.bind(this))}, onTrack_:function(a){a.preventDefault();a.stopPropagation()}, updateTabsProperties_:function(){var a=this.$["sticker-tabs"],b=a.clientWidth;if(0!=b)if(a=a.$.tabsContent.clientWidth,a
\n \n \n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===CYa){var d=document.createElement("template");d.innerHTML=""; CYa=d}d=CYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);DYa=a}a=DYa;return a}}}); var sP=rP;sP.prototype.onIconLoaded_=sP.prototype.onIconLoaded_;w([P(W.YtRendererBehavior),x("design:type",Object)],sP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],sP.prototype,"data",void 0);w([S("yt-img-shadow-loaded"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],sP.prototype,"onIconLoaded_",null);sP=w([uO({is:"yt-live-chat-super-sticker-pack-button-renderer",isInjectionRoot:!0})],sP);var EYa;var FYa;var tP=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-live-chat-set-dark-theme":"onDarkModeToggledAction_"};return a}; p(tP,O);e=tP.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme_=document.documentElement.hasAttribute("dark")}; e.preloadImage_=function(){if(this.data){var a=this.data.stickerImage,b=this.$$("#sticker");a&&a.thumbnails&&(b=MO(a.thumbnails,b.width,b.preferredThumbnail),new Image().src=b,a.webThumbnailDetailsExtensionData={isPreloaded:!0})}}; e.stringAsRawText=function(a){return CL(a)}; e.onDarkModeToggledAction_=function(a){this.isDarkTheme_=a}; e.updateBackground_=function(){var a=this.backgroundThumbnailUrl;a&&(this.$$("#container").style.backgroundImage="url("+a+")")}; h.Object.defineProperties(tP.prototype,{backgroundThumbnailUrl:{configurable:!0,enumerable:!0,get:function(){if(!this.data)return"";var a=this.data.backgroundImage;this.isDarkTheme_&&this.data.darkModeBackgroundImage&&(a=this.data.darkModeBackgroundImage);var b=this.$$("#container");a=MO(a.thumbnails,b.width,b.preferredThumbnail);0==a.indexOf("//")&&(a="https:"+a);return a}}}); h.Object.defineProperties(tP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===FYa){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
[[stringAsRawText(data.packTitle)]]
\n
[[stringAsRawText(data.packDescription)]]
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===EYa){var d=document.createElement("template");d.innerHTML=""; EYa=d}d=EYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);FYa=a}a=FYa;return a}}}); var uP=tP;uP.prototype.updateBackground_=uP.prototype.updateBackground_;uP.prototype.preloadImage_=uP.prototype.preloadImage_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],uP.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],uP.prototype,"ytRendererBehavior",void 0);w([R({}),x("design:type",Object)],uP.prototype,"data",void 0);w([R(),x("design:type",Boolean)],uP.prototype,"isDarkTheme_",void 0); w([zE("data","isDarkTheme_"),x("design:type",String),x("design:paramtypes",[])],uP.prototype,"backgroundThumbnailUrl",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],uP.prototype,"preloadImage_",null);w([yE("backgroundThumbnailUrl"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],uP.prototype,"updateBackground_",null);uP=w([uO({is:"yt-live-chat-super-sticker-pack-backstory-renderer",isInjectionRoot:!0})],uP);var GYa;var HYa;function IYa(a){if(a){var b=new Image;vc(b,a)}} function JYa(a){var b=new Image;return new Ki(function(c,d){b.addEventListener("load",function(){c()}); b.addEventListener("error",function(){d()}); vc(b,a)})} ;var vP=function(){var a=O.apply(this,arguments)||this;a.isStatic=!1;return a}; p(vP,O);e=vP.prototype;e.beforeRegister=function(){this.ironA11yKeysBehavior.keyBindings={"enter:keydown":"onClick_"}}; e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}; e.stringAsRawText=function(a){return CL(a)}; e.onClick_=function(){this.ytRendererBehavior.logExplicitClick(this.data);this.fire("yt-super-sticker-open-preview",this.data.command.previewSuperStickerCommand)}; e.onStickerLoaded_=function(){this.$.unselected.classList.add("sticker-loaded")}; e.preloadImage_=function(a){a=a.stickerSneakPeekImage;var b=this.$$("#selected");a&&a.thumbnails&&(a=MO(a.thumbnails,b.width,b.preferredThumbnail))&&IYa(a)}; e.onFocus_=function(){this.isStatic||(this.classList.add("focus"),this.ytRendererBehavior.markDirty())}; e.onBlur_=function(){this.isStatic||this.classList.remove("focus")}; e.computeIsStatic_=function(a){return a&&a.stickerImage&&a.stickerSneakPeekImage?a.stickerImage.thumbnails[0].url===a.stickerSneakPeekImage.thumbnails[0].url:!1}; e.updateChipStyles_=function(){var a=this.data;a&&(a={"--yt-live-chat-paid-sticker-chip-background-color":this.colorFromDecimal_(a.moneyChipBackgroundColor),"--yt-live-chat-paid-sticker-chip-text-color":this.colorFromDecimal_(a.moneyChipTextColor)},this.updateStyles(a))}; e.colorFromDecimal_=function(a){a=parseInt(a,10);return eO(a)}; h.Object.defineProperties(vP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===HYa){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n \n [[stringAsRawText(data.basePriceText)]]\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===GYa){var d=document.createElement("template");d.innerHTML=""; GYa=d}d=GYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);HYa=a}a=HYa;return a}}}); var wP=vP;wP.prototype.updateChipStyles_=wP.prototype.updateChipStyles_;wP.prototype.onBlur_=wP.prototype.onBlur_;wP.prototype.onFocus_=wP.prototype.onFocus_;wP.prototype.onStickerLoaded_=wP.prototype.onStickerLoaded_;wP.prototype.onClick_=wP.prototype.onClick_;w([P(Polymer.IronA11yKeysBehavior),x("design:type",Object)],wP.prototype,"ironA11yKeysBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],wP.prototype,"ytActionHandlerBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],wP.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],wP.prototype,"ytRendererBehavior",void 0);w([R({observer:"preloadImage_"}),x("design:type",Object)],wP.prototype,"data",void 0);w([R({computed:"computeIsStatic_(data)"}),x("design:type",Object)],wP.prototype,"isStatic",void 0); w([S("click"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],wP.prototype,"onClick_",null);w([S("yt-img-shadow-loaded"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],wP.prototype,"onStickerLoaded_",null);w([S("focus"),S("mouseover"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],wP.prototype,"onFocus_",null); w([S("blur"),S("mouseout"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],wP.prototype,"onBlur_",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],wP.prototype,"updateChipStyles_",null);wP=w([uO({is:"yt-live-chat-super-sticker-pack-item-button-renderer",isInjectionRoot:!0})],wP);var KYa;var LYa;Polymer({is:"yt-live-chat-super-sticker-pack-renderer",_template:function(){if(void 0!==LYa)return LYa;var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===KYa){var d=document.createElement("template");d.innerHTML=""; KYa=d}d=KYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return LYa=a}, behaviors:[Y,W.YtRendererBehavior],properties:{data:Object},hostAttributes:{tabindex:-1},monitorScroll:!0,stampDom:{"data.superStickerPackItemButtons":{id:"pack-stickers",mapping:{superStickerPackItemButtonRenderer:"yt-live-chat-super-sticker-pack-item-button-renderer"}},"data.packBackstory":{id:"backstory",mapping:{superStickerPackBackstoryRenderer:"yt-live-chat-super-sticker-pack-backstory-renderer"}}}});var MYa;var NYa;Polymer({is:"yt-live-chat-paid-sticker-renderer",_template:function(){if(void 0!==NYa)return NYa;var a=document.createElement("template");a.innerHTML="
[[timestampString]]
[[getSimpleString(data.authorName)]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===MYa){var d=document.createElement("template");d.innerHTML=""; MYa=d}d=MYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return NYa=a}, properties:{data:{type:Object,observer:"dataChanged_"},authorPhotoSize:{type:Number,value:40},stickerWidth:{type:Number,computed:"computeStickerWidth_(data)"},stickerHeight:{type:Number,computed:"computeStickerHeight_(data)"}},listeners:{"yt-img-shadow-loaded":"onStickerLoaded_"},observers:["isDeletedChanged_(isDeleted)","updateStickerStyles_(data)"],ready:function(){var a=document.querySelector("yt-live-chat-app");a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed", "")}, behaviors:[FO.YtPdgLiveChatItemBehavior,W.YtRendererBehavior,qP,bP.YtLiveChatItemBehavior],dataChanged_:function(){if(this.data&&this.data.sticker){var a=MO(this.data.sticker.thumbnails,this.stickerWidth);Ti(JYa(a),function(){vm(new Pl("Failed to load Super Sticker with url",a))})}}, onStickerLoaded_:function(a){Polymer.dom(a).rootTarget.parentNode.classList.add("sticker-loaded")}, computeStickerWidth_:function(a){return a&&a.stickerDisplayWidth||96}, computeStickerHeight_:function(a){return a&&a.stickerDisplayWidth||96}, isDeletedChanged_:function(a){a&&(this.set("data.detailText",null),this.set("data.superStickerIcon",null),this.set("data.sticker",null))}, updateStickerStyles_:function(a){a&&(a={"--yt-live-chat-paid-sticker-chip-background-color":this.colorFromDecimal(a.moneyChipBackgroundColor),"--yt-live-chat-paid-sticker-chip-text-color":this.colorFromDecimal(a.moneyChipTextColor),"--yt-live-chat-paid-sticker-background-color":this.colorFromDecimal(a.backgroundColor),"--yt-live-chat-paid-sticker-author-name-text-color":this.colorFromDecimal(a.authorNameTextColor)},this.updateStyles(a))}});var OYa;var PYa;var xP=function(){var a=O.apply(this,arguments)||this;a.selectedPage=0;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm_","yt-wallet-dialog-closed":"onWalletDialogClosed_","yt-wallet-dialog-completed":"onWalletDialogCompleted_","yt-open-payments-dialog":"onOpenPaymentsDialog_"};return a}; p(xP,O);e=xP.prototype;e.configureRendererStamper=function(){return{"data.buyButton":{id:"buy-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.backButton":{id:"back-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}; e.stringAsRawText=function(a){return CL(a)}; e.handleSignalActionSubmitForm_=function(){var a=this.data.submitEndpoint;this.ytActionSenderBehavior.sendAction("yt-live-chat-start-buy-flow",[a,{sticker_params:a.ypcGetCartEndpoint.stickerParams},this.buyFlowCallback_.bind(this)])}; e.onBackClick_=function(){this.fire("yt-super-sticker-close-preview")}; e.onBuyButtonClick_=function(){var a=this.$.preview.clientHeight;this.$.loading.style.height=a+"px";this.$.blank.style.height=a+"px";this.selectedPage=1}; e.onCloseClick_=function(){this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow")}; e.onWalletDialogClosed_=function(){this.selectedPage=0}; e.onWalletDialogCompleted_=function(){this.selectedPage=1}; e.onOpenPaymentsDialog_=function(){this.selectedPage=2}; e.closeBuyFlow=function(){this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow")}; e.buyFlowCallback_=function(a){a.success?(a.response&&a.response.data&&a.response.data.actions&&this.ytActionSenderBehavior.sendAction("yt-live-chat-actions",[a.response.data.actions]),this.closeBuyFlow()):(this.selectedPage=0,a.errorMessageRenderer&&this.handleMessageRenderer_(a.errorMessageRenderer))}; e.handleMessageRenderer_=function(a){var b=AL(a,"renderer");if("confirmDialogRenderer"===b){var c=A("openPopupConfig");c&&this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:c.popupTypeMap[b],popup:a}},this])}else this.ytLiveChatErrorMessageBehavior.setErrorRenderer(a)}; e.resetState=function(){this.ytLiveChatErrorMessageBehavior.setErrorRenderer(null)}; h.Object.defineProperties(xP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===PYa){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n \n

[[stringAsRawText(data.headerText)]]

\n
\n
\n \n [[stringAsRawText(data.durationLabel)]]\n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===OYa){var d=document.createElement("template");d.innerHTML=""; OYa=d}d=OYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);PYa=a}a=PYa;return a}}}); var yP=xP;w([P(xO.YtLiveChatErrorMessageBehavior),x("design:type",Object)],yP.prototype,"ytLiveChatErrorMessageBehavior",void 0);w([P(Y),x("design:type",Object)],yP.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],yP.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],yP.prototype,"ytActionSenderBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],yP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],yP.prototype,"data",void 0);yP=w([U({is:"yt-live-chat-super-sticker-preview-renderer"})],yP);var QYa;var RYa,SYa=function(){if(void 0!==RYa)return RYa;var a=document.createElement("template");a.innerHTML=""; return RYa=a};var TYa;var UYa=[NO.YtActionHandlerBehavior,bP.YtLiveChatItemBehavior,{properties:{containerStyle:{type:cc,computed:"computeContainerStyle(data, ratio)"},dimmed:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Boolean,value:!1},ratio:{type:Number,value:0},ariaLabel:{type:String,value:null,reflectToAttribute:!0},shouldAnimateIn:Boolean,isAnimationPaused:{type:Boolean,value:!1,observer:"handleIsAnimationPausedChanged_"}},listeners:{click:"onClick_",keypress:"onKeyPress_"},observers:["updateWidthOnDataChanged_(data)", "deletedChanged_(isDeleted)"],hostAttributes:{role:"button",tabindex:0},behaviorActionMap_:{"yt-live-chat-pause-replay":"handlePauseReplay_","yt-live-chat-resume-replay":"handleResumeReplay_","yt-live-chat-replay-progress":"handleReplayProgress_"},attached:function(){this.registerActionMap(this.behaviorActionMap_)}, created:function(){this.countdownMs_=this.countdownDurationMs_=0;this.lastCountdownTimeMs_=null;this.detlaSincePausedSecs_=this.playerProgressSec_=this.rafId_=0}, updateWidthOnDataChanged_:function(){this.style.width="auto";this.style.overflow="visible"}, startCountdown:function(a,b){void 0!=a&&(this.countdownMs_=1E3*a,this.countdownDurationMs_=b?1E3*b:this.countdownMs_,this.ratio=1,this.lastCountdownTimeMs_||this.isAnimationPaused||(this.lastCountdownTimeMs_=performance.now(),this.rafId_=window.requestAnimationFrame(this.updateTimeout_.bind(this))))}, updateTimeout_:function(a){this.countdownMs_=Math.max(0,this.countdownMs_-(a-this.lastCountdownTimeMs_));this.ratio=this.countdownMs_/this.countdownDurationMs_;this.isAttached&&this.countdownMs_?(this.lastCountdownTimeMs_=a,this.rafId_=window.requestAnimationFrame(this.updateTimeout_.bind(this))):(this.lastCountdownTimeMs_=null,this.isAttached&&("auto"==this.style.width&&this.setContainerWidth(),this.slideDown_()))}, setContainerWidth:function(){var a=this.$.container.clientWidth;0==a?(this.style.overflow="visible",this.style.width="auto"):(this.style.overflow="hidden",this.shouldAnimateIn?(this.style.width=0,this.async(function(){this.style.width=a+"px"},1)):this.style.width=a+"px")}, slideDown_:function(){this.classList.add("sliding-down");this.async(this.collapse_,200)}, collapse_:function(){this.classList.add("collapsing");this.style.width="0";this.async(this.requestRemoval_,200)}, requestRemoval_:function(){this.fire("yt-live-chat-ticker-remove-ticker-item",this.data.id);this.classList.remove("sliding-down");this.classList.remove("collapsing");this.style.overflow="visible";this.style.width="auto"}, computeContainerStyle:function(a,b){if(!a)return dc({});var c=this.colorFromDecimal(a.startBackgroundColor);a=this.colorFromDecimal(a.endBackgroundColor);b=100*b+"%";return dc({background:"linear-gradient(90deg, "+c+","+c+" "+b+","+a+" "+b+","+a+")"})}, onClick_:function(){this.data.showItemEndpoint&&this.fire("yt-navigate",{endpoint:this.data.showItemEndpoint})}, onKeyPress_:function(a){if(13==a.keyCode)this.onClick_()}, deletedChanged_:function(a){a&&(this.style.overflow="visible",this.style.width="auto",this.async(this.setContainerWidth));if(a=this.get("data.showItemEndpoint.showLiveChatItemEndpoint.renderer"))a=Object.keys(a)[0],this.set("data.showItemEndpoint.showLiveChatItemEndpoint.renderer."+a+".deletedStateMessage",this.data.deletedStateMessage),this.selected&&this.fire("yt-live-chat-pinned-message-update")}, handlePauseReplay_:function(){this.isAnimationPaused=!0;this.detlaSincePausedSecs_=0}, handleResumeReplay_:function(){this.isAnimationPaused=!1}, handleIsAnimationPausedChanged_:function(a,b){a?window.cancelAnimationFrame(this.rafId_):!a&&b&&(a=this.lastCountdownTimeMs_,this.detlaSincePausedSecs_&&(a=this.lastCountdownTimeMs_+1E3*this.detlaSincePausedSecs_,this.detlaSincePausedSecs_=0),this.updateTimeout_(a),this.lastCountdownTimeMs_=window.performance.now())}, handleReplayProgress_:function(a){this.isAnimationPaused?this.detlaSincePausedSecs_=Math.floor(a-this.playerProgressSec_):this.playerProgressSec_=a}}];var zP=function(){return O.apply(this,arguments)||this}; p(zP,O);zP.prototype.dataChanged_=function(a){a&&(this.$.content.style.color=this.ytLiveChatTickerItemBehavior.colorFromDecimal(a.amountTextColor),this.ytLiveChatTickerItemBehavior.ariaLabel=this.ytLiveChatTickerItemBehavior.getSimpleString(a.amount),this.ytLiveChatTickerItemBehavior.startCountdown(a.durationSec,a.fullDurationSec),this.async(this.ytLiveChatTickerItemBehavior.setContainerWidth))}; h.Object.defineProperties(zP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===TYa){var a=document.createElement("template");a.innerHTML="
\n
\n \n [[getSimpleString(data.amount)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(SYa().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===QYa){var d=document.createElement("template");d.innerHTML=""; QYa=d}d=QYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);TYa=a}a=TYa;return a}}}); var AP=zP;w([P(FO.YtPdgLiveChatItemBehavior),x("design:type",Object)],AP.prototype,"ytPdgLiveChatItemBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],AP.prototype,"ytRendererBehavior",void 0);w([P(UYa),x("design:type",Object)],AP.prototype,"ytLiveChatTickerItemBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],AP.prototype,"data",void 0);AP=w([uO({is:"yt-live-chat-ticker-paid-message-item-renderer",isInjectionRoot:!0})],AP);var VYa;var WYa;var BP=function(){return O.apply(this,arguments)||this}; p(BP,O);BP.prototype.dataChanged_=function(a){a&&(1
\n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(SYa().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===VYa){var d=document.createElement("template");d.innerHTML=""; VYa=d}d=VYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);WYa=a}a=WYa;return a}}}); var CP=BP;w([P(FO.YtPdgLiveChatItemBehavior),x("design:type",Object)],CP.prototype,"ytPdgLiveChatItemBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],CP.prototype,"ytRendererBehavior",void 0);w([P(UYa),x("design:type",Object)],CP.prototype,"ytLiveChatTickerItemBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],CP.prototype,"data",void 0);CP=w([uO({is:"yt-live-chat-ticker-paid-sticker-item-renderer",isInjectionRoot:!0})],CP);var XYa=function(a){this.siteKey=a},YYa,ZYa=function(){var a=A("RECAPTCHA_V3_SITEKEY"); if(!YYa){var b=Jd("https://www.google.com/recaptcha/api.js?",{render:a});kJ(b,function(){}); YYa=new XYa(a)}};var $Ya=function(){this.replayQueue_=new nG;this.lastVideoOffsetTimeMsec=0}; $Ya.prototype.addReplayChatItemAction=function(a){this.replayQueue_.enqueue(a);this.lastVideoOffsetTimeMsec=parseInt(a.videoOffsetTimeMsec||0,10)}; var aZa=function(a,b){for(var c=HDa(a.replayQueue_),d=[];c&&b>=parseInt(c.videoOffsetTimeMsec||0,10);)c=a.replayQueue_.dequeue(),d=d.concat(c.actions||[]),c=HDa(a.replayQueue_);return d}; $Ya.prototype.clear=function(){this.replayQueue_.clear();this.lastVideoOffsetTimeMsec=0};var bZa=function(){this.lastUpdateTime_=this.estimatedUpdateInterval_=this.callback=null;this.messageQueue_=[];this.nextUpdateId_=null;this.pollResponseDelayQueue_=new nG}; bZa.prototype.enqueueActionGroup=function(a){if(this.lastUpdateTime_){var b=Wa()-this.lastUpdateTime_;this.pollResponseDelayQueue_.enqueue(b);5a&&(c=eZa(this))){a=(b-a)/c;break a}a=1}this.timestampScale_=a;this.currentTimestampUs_=fZa(this);this.animationFrameRequestId_||(this.lastUpdateTimeMs_=performance.now(),this.emitSmoothedMessages_(this.lastUpdateTimeMs_))}; var gZa=function(a){if(a.addChatItemAction){a=a.addChatItemAction.item;var b=Object.keys(a)[0];a=a[b];if(a.timestampUsec)return parseInt(a.timestampUsec,10)}return-1},fZa=function(a){a=k(a.actionQueue_); for(var b=a.next();!b.done;b=a.next())if(b=gZa(b.value),-1!=b)return b;return-1}; dZa.prototype.emitSmoothedMessages_=function(a){var b=this;if(this.callback&&this.actionQueue_.length){this.animationFrameRequestId_=window.requestAnimationFrame(function(f){return b.emitSmoothedMessages_(f)}); var c=a-this.lastUpdateTimeMs_;this.lastUpdateTimeMs_=a;this.emitDelayMs_-=c;this.currentTimestampUs_+=Math.floor(1E3*c*this.timestampScale_);if(!(0this.currentTimestampUs_)break;a=c+1}a&&(this.callback(this.actionQueue_.splice(0,a)),this.emitDelayMs_=84)}}else this.animationFrameRequestId_=0,this.actionQueue_.length=0};var hZa;var iZa;var jZa;var kZa;Polymer({is:"yt-live-chat-poll-choice",_template:function(){if(void 0!==kZa)return kZa;var a=document.createElement("template");a.innerHTML="\n \n
\n
\n
\n
\n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jZa){var d=document.createElement("template");d.innerHTML=""; jZa=d}d=jZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return kZa=a}, properties:{data:{type:Object,value:null},selected:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeSelected_(data.selected)"},voteRequestInFlight:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"voteRequestInFlightChanged"},hasVoted:{type:Boolean,value:!1,reflectToAttribute:!0},showSpinner:{type:Boolean,value:!1,reflectToAttribute:!0},command:{type:Object,computed:"identity(data.selectServiceEndpoint)"},signInEndpoint:{type:Object,computed:"identity(data.signinEndpoint)"},isWinning:{type:Boolean, value:!1,reflectToAttribute:!0},hasVotes:{type:Boolean,value:!1,computed:"computeHasVotes(data.voteRatio)",reflectToAttribute:!0}},behaviors:[NO.YtActionHandlerBehavior,V.YtActionSenderBehavior],actionMap:{"yt-cancel-vote-action":"handleVoteRequestError_"},observers:["updateVoteBarStyles_(data, hasVoted)"],listeners:{"yt-service-request-error":"handleVoteRequestError_"},created:function(){this.boundOnClick_=this.onClick_.bind(this);this.spinnerTimerId_=null}, detached:function(){clearTimeout(this.spinnerTimerId_)}, identity:function(a){return a}, updateVoteBarStyles_:function(a,b){a&&a.voteRatio&&b&&this.updateStyles({"--yt-live-chat-poll-choice-vote-bar-transform":"translateX("+(100*a.voteRatio-100+"%)")})}, onClick_:function(){!this.hasVoted&&this.get("command.sendLiveChatVoteEndpoint")&&(this.set("data.selected",!0),this.sendServiceRequestAction([this.command]))}, handleVoteRequestError_:function(){this.set("data.selected",!1)}, computeSelected_:function(a){return void 0===a?!!this.selected:!!a}, computeHasVotes:function(){return this.data&&0\n";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===lZa){var d=document.createElement("template");d.innerHTML="";lZa=d}d=lZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return mZa=a}, properties:{id:{type:String,computed:"computeId(data.targetId)",reflectToAttribute:!0},data:{type:Object}},behaviors:[kWa.YtLiveChatTooltipTargetingBehavior],computeId:function(){return this.data&&this.data.targetId}});var nZa;var oZa;Polymer({is:"yt-live-chat-poll-header-renderer",_template:function(){if(void 0!==oZa)return oZa;var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n
\n
\n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nZa){var d=document.createElement("template");d.innerHTML=""; nZa=d}d=nZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return oZa=a}, properties:{data:{type:Object,observer:"dataChanged"},cachedData:{type:Object,computed:"computeCachedData(data)"},creatorPhoto:{type:Object,value:null,computed:"computeCreatorPhoto(cachedData.thumbnail, cachedData.liveChatPollType)"},gamePhoto:{type:Object,value:null,computed:"computeGamePhoto(cachedData.thumbnail, cachedData.liveChatPollType)"},inCollapsedBanner:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[Y,bP.YtLiveChatItemBehavior],stampDom:{"cachedData.contextMenuButton":{id:"menu", events:!0,mapping:{buttonRenderer:"yt-live-chat-button"}}},listeners:{"yt-rendererstamper-finished":"onRenderStamperFinished_"},dataChanged:function(){this.data&&this.data.contextMenuButton&&(this.data.contextMenuEndpoint=this.get("contextMenuButton.buttonRenderer.command",this.data))}, computeCachedData:function(){return this.cachedData?this.cachedData:this.data}, computeCreatorPhoto:function(){if(this.cachedData)return"LIVE_CHAT_POLL_TYPE_STADIA"==this.cachedData.liveChatPollType&&this.cachedData.questionThumbnail||"LIVE_CHAT_POLL_TYPE_CREATOR"===this.cachedData.liveChatPollType?this.cachedData.thumbnail||null:null}, computeGamePhoto:function(){if(this.cachedData)return this.cachedData.questionThumbnail?this.cachedData.questionThumbnail:"LIVE_CHAT_POLL_TYPE_STADIA"===this.cachedData.liveChatPollType?this.cachedData.thumbnail||null:null}, onContextMenuButtonClick_:function(a){this.showContextMenu(a)}, onRenderStamperFinished_:function(){var a=this.get("cachedData.contextMenuButton.buttonRenderer.targetId");a&&(this.menuButton=this.$$("#"+a))}});var pZa;var qZa;Polymer({is:"yt-live-chat-poll-renderer",_template:function(){if(void 0!==qZa)return qZa;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pZa){var d=document.createElement("template");d.innerHTML=""; pZa=d}d=pZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return qZa=a}, properties:{data:{type:Object},voteRequestInFlight:{type:Boolean,value:!1},endPollRequestInFlight:{type:Boolean,value:!1},hasClosed:{type:Boolean,value:!1},displayVoteResults:{type:Boolean,value:!1,computed:"computeDisplayVoteResults_(data.displayVoteResults)"},highlightWinningOption:{type:Boolean,value:!1,reflectToAttribute:!0},pollChoices:{type:Array,value:function(){return[]}}, inCollapsedBanner:{type:Boolean,value:!1,reflectToAttribute:!0},isTransitioningCollapse:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[NO.YtActionHandlerBehavior,Y],stampDom:{"data.header":{id:"header",mapping:{pollHeaderRenderer:{component:"yt-live-chat-poll-header-renderer",properties:{inCollapsedBanner:"[[inCollapsedBanner]]"}}},stamperStableList:!0},pollChoices:{id:"poll-choice-container",mapping:{pollChoice:"yt-live-chat-poll-choice"},stamperStableList:!0},"data.button":{id:"button", mapping:{buttonRenderer:"yt-button-renderer"}}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-cancel-vote-action":"handleVoteRequestError_","yt-update-live-chat-poll-action":"handleUpdateLiveChatPollAction_"},listeners:{"yt-service-request-completed":"handleServiceRequestCompleted_","yt-service-request-error":"handleServiceRequestError_","yt-service-request-sent":"handleServiceRequestSent_"},observers:["updatePollChoices_(data.choices, voteRequestInFlight)","inCollapsedBannerChanged(inCollapsedBanner)"], created:function(){this.collapseTimerId_=null}, detached:function(){clearTimeout(this.collapseTimerId_)}, updatePollChoices_:function(a,b){var c=this;if(a){this.set("pollChoices",a.map(function(m){return{pollChoice:m}})); var d=this.displayVoteResults||b,f=0;if(this.highlightWinningOption)for(var g=1,l=a.length;ga[f].voteRatio&&(f=g);Array.prototype.forEach.call(this.$["poll-choice-container"].children,function(m,n){m.hasVoted=d;m.voteRequestInFlight=b;c.highlightWinningOption&&(m.isWinning=n===f,c.inCollapsedBanner&&c.slidePollChoice_(m))})}}, handleLiveChatActions_:function(a){var b=this;a.forEach(function(c){c.updateLiveChatPollAction&&b.handleUpdateLiveChatPollAction_(c)})}, handleUpdateLiveChatPollAction_:function(a){if(a=this.get("updateLiveChatPollAction.pollToUpdate.pollRenderer",a))this.set("data.displayVoteResults",a.displayVoteResults),this.displayVoteResults&&this.set("data.choices",a.choices),a.header&&this.set("data.header",a.header)}, computeDisplayVoteResults_:function(a){return this.displayVoteResults?!0:!!a}, inCollapsedBannerChanged:function(a){var b=Polymer.dom(this.$.header).firstElementChild;b&&(b.inCollapsedBanner=a,this.slidePollContents_(b))}, slidePollContents_:function(){var a=this;if(this.highlightWinningOption){clearTimeout(this.collapseTimerId_);this.isTransitioningCollapse=!0;var b=this.$$("yt-live-chat-poll-choice[is-winning]");this.inCollapsedBanner?(this.$["collapse-container"].style.height=this.$["collapse-container"].clientHeight+"px",this.slidePollChoice_(b),this.$["collapse-container"].style.height="0"):(this.$["collapse-container"].style.height="auto",b.style.transform="translateY(0)");this.collapseTimerId_=setTimeout(function(){a.isTransitioningCollapse= !1;a.collapseTimerId_=null},350)}}, slidePollChoice_:function(a){if(a.isWinning){var b=Polymer.dom(this.$.header).firstElementChild.$["content-top"].clientHeight;a.style.transform="translateY(-"+(b+a.offsetTop)+"px)"}else a.style.transform="translateY(0)"}, handleServiceRequestSent_:function(a){(a=this.get("detail.endpoint",a))&&a.sendLiveChatVoteEndpoint&&(this.voteRequestInFlight=!0)}, handleServiceRequestCompleted_:function(a,b){this.voteRequestInFlight=!1;this.endPollRequestInFlight&&b.data&&b.data.success&&(this.hasClosed=!0);this.endPollRequestInFlight=!1}, handleServiceRequestError_:function(){this.endPollRequestInFlight=!1;this.handleVoteRequestError_()}, handleVoteRequestError_:function(){this.voteRequestInFlight=!1}, onClickButton:function(a){a.stopPropagation()}, handleEndButtonAction:function(a){"yt-service-request"==a.detail.actionName&&(this.endPollRequestInFlight||this.hasClosed?a.stopPropagation():this.endPollRequestInFlight=!0)}});var rZa;var sZa;Polymer({is:"yt-live-interactivity-component-background",_template:function(){if(void 0!==sZa)return sZa;var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rZa){var d=document.createElement("template");d.innerHTML=""; rZa=d}d=rZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return sZa=a}, properties:{useLargeBackground:{type:Boolean,value:!1},ids:{type:Object}},created:function(){this.ids={background:LI(),maskOne:LI(),maskTwo:LI(),gradient:LI(),largeBackground:LI(),largeGradientOne:LI(),largeGradientTwo:LI(),largeGradientPath:LI()}}});Polymer({is:"yt-live-chat-action-panel-renderer",_template:function(){if(void 0!==iZa)return iZa;var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hZa){var d=document.createElement("template");d.innerHTML=""; hZa=d}d=hZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return iZa=a}, properties:{data:{type:Object},id:{type:String,computed:"computeId(data.id)"}},behaviors:[NO.YtActionHandlerBehavior,Y],stampDom:{"data.contents":{id:"contents",mapping:{pollRenderer:"yt-live-chat-poll-renderer"}}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-remove-chat-item-action":"handleRemoveChatItemAction_","yt-mark-chat-item-as-deleted-action":"handleMarkChatItemAsDeletedAction_"},computeId:function(){return this.data&&this.data.id||""}, handleLiveChatActions_:function(a){a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=DQa(b);if(!c)break;"removeChatItemAction"===c?this.handleRemoveChatItemAction_(b):"markChatItemAsDeletedAction"===c&&this.handleMarkChatItemAsDeletedAction_(b)}}, handleRemoveChatItemAction_:function(a){this.handleRemoveAction_(a.removeChatItemAction)}, handleMarkChatItemAsDeletedAction_:function(a){this.handleRemoveAction_(a.markChatItemAsDeletedAction)}, handleRemoveAction_:function(a){this.id===a.targetItemId&&this.sendAction("yt-close-live-chat-action-panel-action",[{closeLiveChatActionPanelAction:{targetPanelId:this.id}}])}});var tZa;var uZa;var vZa;var wZa;Polymer({is:"yt-live-chat-text-message-renderer",_template:function(){if(void 0!==wZa)return wZa;var a=document.createElement("template");a.innerHTML="
[[timestampString]]\u200B[[getSimpleString(data.deletedStateMessage)]][[getSimpleString(data.showOriginalContentMessage)]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vZa){var d=document.createElement("template");d.innerHTML=""; vZa=d}d=vZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return wZa=a}, properties:{data:{type:Object,observer:"dataChanged_"},showOriginal:{type:Boolean,value:!1,reflectToAttribute:!0},isDimmed:{type:Boolean,value:!1,computed:"truthy(data.isDimmed)",reflectToAttribute:!0},showBar:{type:Boolean,computed:"computeShowBar_(isDeleted, hasOriginalContent, isDimmed)",reflectToAttribute:!0},authorBadges:{type:Object,computed:"computeAuthorBadges_(data)"},authorIsOwner:{type:Boolean,computed:"computeAuthorIsOwner_(data)",reflectToAttribute:!0},inCollapsedBanner:{type:Boolean, value:!1,reflectToAttribute:!0}},supportsInlineActionButtons:!0,behaviors:[W.YtRendererBehavior,qP,bP.YtLiveChatItemBehavior,Y],observers:["updateMessage_(data.message)"],dataChanged_:function(a){a=this.badgeTypeFromBadges(a.authorBadges||[]);this.setAttribute("author-type",a)}, updateMessage_:function(a){var b=Polymer.dom(this.$.message);b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, actionMessageChanged_:function(a){var b=this.$.action;b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, onShowOriginalClick_:function(a){a.preventDefault();this.showOriginal=!0}, computeShowBar_:function(a,b,c){return a&&b||c}, computeAuthorBadges_:function(a){return a.authorBadges||[]}, computeAuthorIsOwner_:function(a){return!!this.getBadge(a.authorBadges,"owner")}});Polymer({is:"yt-live-chat-auto-mod-message-renderer",_template:function(){if(void 0!==uZa)return uZa;var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tZa){var d=document.createElement("template");d.innerHTML=""; tZa=d}d=tZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return uZa=a}, properties:{data:Object,emojiManager:Object,participantsManager:Object},supportsInlineActionButtons:!0,behaviors:[W.YtRendererBehavior,bP.YtLiveChatItemBehavior,Y],stampDom:{"data.infoDialogButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.autoModeratedItem":{id:"auto-moderated-item",mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"},attributes:{"hide-inline-action-buttons":!0}}}}, "data.moderationButtons":{id:"moderation-buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.additionalInlineActionButtons":{id:"additional-inline-action-buttons",mapping:{buttonRenderer:"yt-button-renderer"}}}});var xZa;var yZa;Polymer({is:"yt-live-chat-banner-header-renderer",_template:function(){if(void 0!==yZa)return yZa;var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xZa){var d=document.createElement("template");d.innerHTML=""; xZa=d}d=xZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return yZa=a}, properties:{data:{type:Object},inCollapsedBanner:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[bP.YtLiveChatItemBehavior,Y],stampDom:{"data.contextMenuButton":{id:"menu",events:!0,mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{id:"menu-button"}}}}},listeners:{"yt-rendererstamper-finished":"onRenderStamperFinished_"},observers:["dataChanged(data)"],onContextMenuButtonClick_:function(a){this.showContextMenu(a)}, dataChanged:function(){this.data&&this.data.contextMenuButton&&(this.data.contextMenuEndpoint=this.get("contextMenuButton.buttonRenderer.command",this.data))}, onRenderStamperFinished_:function(){this.menuButton=this.$$("#menu-button")}});var zZa;var AZa;var BZa;var CZa;var DZa;var EZa;var DP=function(){return O.apply(this,arguments)||this}; p(DP,O);e=DP.prototype;e.onProgressChanged=function(){var a,b=100*(null!==(a=this.progress)&&void 0!==a?a:0);this.updateStyles({"--progress-bar-completion":b+"%"})}; e.configureRendererStamper=function(){return{"data.donateButton":{id:"donate-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.getRaisedAmount=function(){var a,b=JSON.parse(JSON.stringify(null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?void 0:a.raised));FZa(b,this.amountRaised);return b}; e.getTargetAmount=function(){var a,b=JSON.parse(JSON.stringify(null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?void 0:a.goal));FZa(b,this.targetAmount);return b}; e.onTapDonate=function(){this.data&&this.data.liveChatDonationsEndpoint&&(this.fire("yt-live-chat-toggle-banner"),this.fire("yt-navigate",{endpoint:this.data.liveChatDonationsEndpoint}))}; h.Object.defineProperties(DP.prototype,{noGoal:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?0:a.goal)}}, targetAmount:{configurable:!0,enumerable:!0,get:function(){var a,b;return null!==(b=null===(a=this.fundraiserStatsEntity)||void 0===a?void 0:a.targetAmount)&&void 0!==b?b:""}}, amountRaised:{configurable:!0,enumerable:!0,get:function(){var a,b;return null!==(b=null===(a=this.fundraiserStatsEntity)||void 0===a?void 0:a.amountRaised)&&void 0!==b?b:""}}, progress:{configurable:!0,enumerable:!0,get:function(){var a,b;return null!==(b=null===(a=this.fundraiserStatsEntity)||void 0===a?void 0:a.progress)&&void 0!==b?b:0}}, hasGoalBeenReached:{configurable:!0,enumerable:!0,get:function(){return 1<=this.progress}}}); h.Object.defineProperties(DP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===EZa){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n \n
\n
\n\n \n\n \n\n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===DZa){var d=document.createElement("template");d.innerHTML=""; DZa=d}d=DZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);EZa=a}a=EZa;return a}}}); var EP=DP;EP.prototype.onProgressChanged=EP.prototype.onProgressChanged;w([P(Y),x("design:type",Object)],EP.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],EP.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],EP.prototype,"actionSenderBehavior",void 0);w([P(jWa),x("design:type",Object)],EP.prototype,"ytLiveChatReduxBehavior",void 0);w([R(),x("design:type",Object)],EP.prototype,"data",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],EP.prototype,"inCollapsedBanner",void 0);w([R({reflectToAttribute:!0}),zE("data.goal"),x("design:type",Boolean),x("design:paramtypes",[])],EP.prototype,"noGoal",null);w([yE("progress"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],EP.prototype,"onProgressChanged",null);w([R({selectorArgs:["data.fundraiserStatsEntityKey"],selector:function(a,b){return aM(a.entities,"updatableFundraiserStatsEntity",b)}}), x("design:type",Object)],EP.prototype,"fundraiserStatsEntity",void 0);w([zE("fundraiserStatsEntity"),x("design:type",String),x("design:paramtypes",[])],EP.prototype,"targetAmount",null);w([zE("fundraiserStatsEntity"),x("design:type",String),x("design:paramtypes",[])],EP.prototype,"amountRaised",null);w([zE("fundraiserStatsEntity"),x("design:type",Number),x("design:paramtypes",[])],EP.prototype,"progress",null); w([zE("progress"),x("design:type",Boolean),x("design:paramtypes",[])],EP.prototype,"hasGoalBeenReached",null);EP=w([U({is:"yt-live-chat-donations-progress-bar-renderer"})],EP);function FZa(a,b){a=k(a.runs);for(var c=a.next();!c.done;c=a.next())c=c.value,c.text=c.text.replace("$0",b)} ;var FP={};FP.YtdOpenPopupBehavior=[aP.YtOpenPopupBehavior,{_noAccessors:!0,created:function(){this.openPopupConfig=A("openPopupConfig")}}];var GZa;iP("itemSectionRenderer","buttonRenderer","ytd-button-renderer");iP("sharingRendererButtons","buttonRenderer","ytd-button-renderer");var GP=function(){return O.apply(this,arguments)||this}; p(GP,O);e=GP.prototype;e.created=function(){this.showTooltips=!0}; e.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; e.onHintIdChanged_=function(){var a=this,b,c,d=null===(c=null===(b=this.ytButtonBehavior.data)||void 0===b?void 0:b.hint)||void 0===c?void 0:c.hintRenderer;if(d&&d.hintId){var f=this.ytButtonBehavior.sendOptionalAction("yt-get-opened-popups-action");f=0<(f&&1===f.length?f[0]:[]).length;var g=[];"sponsor-pre-purchase"!==d.hintId||f?d.hintId.startsWith("sponsor-post-purchase")&&!f?g=NM("membership-manage"):d.hintId.startsWith("sponsorships-premium-freebie-pre-purchase")&&!f&&(g=NM("membership-freebie-join")): g=NM("membership-join");g&&yk(Bk,function(){a.ytButtonBehavior.sendInnerTubeActions(g,a)})}}; e.onYtNavigate_=function(a){var b=this.ytdOpenPopupBehavior.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.ytdOpenPopupBehavior.openPopup(b))}; e.onYtServiceRequestSent_=function(a,b){this.handleServiceRequestActions_(b)}; e.onServiceRequestCompleted_=function(a,b){this.handleServiceRequestActions_(b)}; e.handleServiceRequestActions_=function(a){if(a=a.actions)for(var b=0;b"; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(kP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);GZa=a}a=GZa;return a}}}); var HP=GP;HP.prototype.onServiceRequestCompleted_=HP.prototype.onServiceRequestCompleted_;HP.prototype.onYtServiceRequestSent_=HP.prototype.onYtServiceRequestSent_;HP.prototype.onYtNavigate_=HP.prototype.onYtNavigate_;HP.prototype.onHintIdChanged_=HP.prototype.onHintIdChanged_;w([P(gP.YtButtonBehavior),x("design:type",Object)],HP.prototype,"ytButtonBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],HP.prototype,"ytdOpenPopupBehavior",void 0); w([yE("data.hint.hintRenderer"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],HP.prototype,"onHintIdChanged_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HP.prototype,"onYtNavigate_",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],HP.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],HP.prototype,"onServiceRequestCompleted_",null);HP=w([U({is:"ytd-button-renderer"})],HP);var HZa=document.createElement("template");HZa.innerHTML=""; document.head.appendChild(HZa.content);var IZa=document.createElement("template");IZa.innerHTML=""; document.head.appendChild(IZa.content);var JZa;var KZa;var LZa=function(){return O.apply(this,arguments)||this}; p(LZa,O); h.Object.defineProperties(LZa,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===KZa){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===JZa){var d=document.createElement("template");d.innerHTML=""; JZa=d}d=JZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);KZa=a}a=KZa;return a}}}); var IP=LZa;w([P(W.YtRendererBehavior),x("design:type",Object)],IP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],IP.prototype,"data",void 0);IP=w([U({is:"ytd-ad-hover-text-button-renderer"})],IP);var MZa;var NZa;var JP=function(){return O.apply(this,arguments)||this}; p(JP,O);JP.prototype.dataChanged=function(){this.data&&this.data.isPreview&&(this.data.onClickCommand=void 0)}; JP.prototype.onHelpTap=function(a){this.data&&!this.data.isPreview&&this.data.informationDialog&&(this.fire("yt-navigate",{endpoint:{liveChatDialogEndpoint:{content:this.data.informationDialog}}}),a.preventDefault(),a.stopPropagation())}; h.Object.defineProperties(JP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===NZa){var a=document.createElement("template");a.innerHTML="\n\n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===MZa){var d=document.createElement("template");d.innerHTML=""; MZa=d}d=MZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);NZa=a}a=NZa;return a}}}); var KP=JP;KP.prototype.dataChanged=KP.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],KP.prototype,"ytRendererBehavior",void 0);w([P([V.YtActionSenderBehavior]),x("design:type",Object)],KP.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],KP.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],KP.prototype,"inCollapsedBanner",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],KP.prototype,"dataChanged",null);KP=w([U({is:"ytd-live-chat-product-item-renderer"})],KP);var OZa=document.createElement("template");OZa.innerHTML=""; document.head.appendChild(OZa.content);var PZa=document.createElement("template");PZa.innerHTML=""; document.head.appendChild(PZa.content);var QZa=document.createElement("template");QZa.innerHTML=""; document.head.appendChild(QZa.content);Polymer({is:"yt-live-chat-banner-renderer",_template:function(){if(void 0!==CZa)return CZa;var a=document.createElement("template");a.innerHTML="\n\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===BZa){var d=document.createElement("template");d.innerHTML=""; BZa=d}d=BZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return CZa=a}, properties:{data:{type:Object},id:{type:String,computed:"computeId(data.actionId)"},collapsed:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:String,value:"0",reflectToAttribute:!0},disableStateChange:{type:Boolean,value:!1},shouldUseLargeBackground:{type:Boolean,value:!1,computed:"computeShouldUseLargeBackground(isPollBanner)"},isPollBanner:{type:Boolean,value:!1,computed:"computeIsPollBanner(data.contents)",reflectToAttribute:!0},isIndeterminate:{type:Boolean,value:!1,computed:"computeIsIndeterminate(data.contents)"}, emojiManager:Object},behaviors:[Y,Polymer.IronA11yKeysBehavior],stampDom:{"data.contents":{id:"contents",events:!0,mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{inCollapsedBanner:"[[collapsed]]",emojiManager:"[[emojiManager]]"}},liveChatProductItemRenderer:{component:"ytd-live-chat-product-item-renderer",properties:{inCollapsedBanner:"[[collapsed]]",emojiManager:"[[emojiManager]]"}},donationsProgressBarRenderer:{component:"yt-live-chat-donations-progress-bar-renderer", properties:{inCollapsedBanner:"[[collapsed]]"}},pollRenderer:{component:"yt-live-chat-poll-renderer",properties:{inCollapsedBanner:"[[collapsed]]"},attributes:{"highlight-winning-option":!0,"in-banner":!0}}}},"data.header":{id:"header",mapping:{liveChatBannerHeaderRenderer:"yt-live-chat-banner-header-renderer"}}},observers:["collapsedChanged(collapsed)"],listeners:{click:"onClick_","yt-live-chat-toggle-banner":"toggleBanner"},keyBindings:{space:"onKeyPress_",enter:"onKeyPress_"},created:function(){this.boundOnWindowClick_= this.onWindowClick_.bind(this)}, attached:function(){this.startCollapseTimeout();window.addEventListener("click",this.boundOnWindowClick_)}, detached:function(){this.stopCollapseTimeout();window.removeEventListener("click",this.boundOnWindowClick_)}, computeId:function(a){return a}, computeShouldUseLargeBackground:function(){return this.isPollBanner}, computeIsPollBanner:function(){return!!this.data.contents&&!!this.data.contents.pollRenderer}, computeIsIndeterminate:function(){return!!this.data.contents&&!!this.data.contents.pollRenderer}, startCollapseTimeout:function(){var a=this;this.collapseTimeout=setTimeout(function(){a.disableStateChange||(a.collapsed=!0)},2E4)}, stopCollapseTimeout:function(){this.collapseTimeout&&(clearTimeout(this.collapseTimeout),delete this.collapseTimeout)}, collapsedChanged:function(a){var b=Polymer.dom(this.$.contents).firstElementChild,c=Polymer.dom(this.$.header).firstElementChild;[b,c].forEach(function(d){d&&(d.inCollapsedBanner=a)}); a&&this.stopCollapseTimeout();this.slideBannerContents_(b)}, slideBannerContents_:function(){this.isPollBanner||(this.collapsed?(this.$.contents.style.height=this.$.contents.clientHeight+"px",this.$.contents.style.transform="translateY(-"+this.$.header.clientHeight+"px)",this.$.contents.style.height="0"):(this.$.contents.style.height="auto",this.$.contents.style.transform="translateY(0)"))}, toggleBanner:function(){this.disableStateChange||(this.collapsed=!this.collapsed)}, onClick_:function(a){var b=this;(a=Lg(a.target,function(c){return"A"===c.tagName||c===b.$.contents},!0))&&a!==this.$.contents||this.toggleBanner()}, onKeyPress_:function(){document.activeElement===this&&this.toggleBanner()}, onWindowClick_:function(a){if(!this.collapsed&&!this.disableStateChange){a=a.target;var b=document.querySelector("yt-live-chat-app");b&&b.contains(a)&&!Mg(a,"yt-live-chat-dialog-renderer")&&!this.contains(a)&&(this.collapsed=!0)}}});var RZa=["liveChatTextMessageRenderer","liveChatProductItemRenderer"],SZa=["pollRenderer"]; Polymer({is:"yt-live-chat-banner-manager",_template:function(){if(void 0!==AZa)return AZa;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zZa){var d=document.createElement("template");d.innerHTML=""; zZa=d}d=zZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return AZa=a}, properties:{id:{type:String,computed:"computeId(visibleBanners.*)",reflectToAttribute:!0},emojiManager:Object,visiblePinnedBanner:{type:Object,computed:"computeVisiblePinnedBanner(visibleBanners.*)"},visibleIndeterminateBanner:{type:Object,computed:"computeVisibleIndeterminateBanner(visibleBanners.*)"},visibleBanners:{type:Array,value:function(){return[]}}, hasVisibleBanner:{type:Boolean,computed:"computeHasVisibleBanner(visibleBanners.*)",reflectToAttribute:!0},bannerQueue:{type:Array,value:function(){return[]}}}, behaviors:[NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,kWa.YtLiveChatTooltipTargetingBehavior,Y],stampDom:{visibleBanners:{id:"visible-banners",mapping:{liveChatBannerRenderer:{component:"yt-live-chat-banner-renderer",properties:{emojiManager:"[[emojiManager]]"}}},reuseComponents:!1,stamperStableList:!1}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-remove-banner-for-live-chat-command":"handleRemoveBannerForLiveChatCommand_","yt-remove-chat-item-action":"handleRemoveChatItemAction_", "yt-mark-chat-item-as-deleted-action":"handleMarkChatItemAsDeletedAction_","yt-mark-chat-items-by-author-as-deleted-action":"handleMarkChatItemsByAuthorAsDeletedAction_"},observers:["onVisibleBannersOrBannerQueueChanged(visibleBanners.*, bannerQueue.splices)","onVisiblePinnedBannerChange(visiblePinnedBanner)"],created:function(){this.boundIsPinnedBanner_=this.isPinnedBanner_.bind(this);this.boundIsIndeterminateBanner_=this.isIndeterminateBanner_.bind(this);this.isTransitioningBanner=!1;this.liveChatActionMap_= {addBannerToLiveChatCommand:"handleAddBannerToLiveChatCommand_",removeBannerForLiveChatCommand:"handleRemoveBannerForLiveChatCommand_",removeChatItemAction:"handleRemoveChatItemAction_",markChatItemAsDeletedAction:"handleMarkChatItemAsDeletedAction_",markChatItemsByAuthorAsDeletedAction:"handleMarkChatItemsByAuthorAsDeletedAction_"}}, reset:function(){this.visibleBanners=[];this.bannerQueue=[];this.isTransitioningBanner=!1}, onVisibleBannersOrBannerQueueChanged:function(){if(this.bannerQueue.length&&!this.isTransitioningBanner){this.isTransitioningBanner=!0;var a=this.bannerQueue.shift();if(this.visiblePinnedBanner&&this.isPinnedBanner_(a)){var b=this.visibleBanners.findIndex(this.boundIsPinnedBanner_);this.splice("visibleBanners",b,1)}else this.visibleIndeterminateBanner&&this.isIndeterminateBanner_(a)?(b=this.visibleBanners.findIndex(this.boundIsIndeterminateBanner_),this.splice("visibleBanners",b,1)):b=this.visibleBanners.length; this.splice("visibleBanners",b,0,a);this.isTransitioningBanner=!1}}, onVisiblePinnedBannerChange:function(){this.sendOptionalAction("yt-visible-banner-change",[this.visiblePinnedBanner])}, computeId:function(){return 0===this.visibleBanners.length?"live-chat-banner":this.visibleBanners[0].liveChatBannerRenderer.targetId}, computeHasVisibleBanner:function(){return 0=c||1b)&&this.fireSeekContinuation_(a);this.previousProgressSec_=a;return b}, fireSeekContinuationAtCurrentProgress:function(){this.fireSeekContinuation_(this.previousProgressSec_)}, fireSeekContinuation_:function(a){this.previousProgressSec_=a;this.fire("yt-load-seek-continuation",this.getContinuationUrl_.bind(this,1E3*a))}, getContinuationUrl_:function(a,b){a={ctoken:this.data.continuation,currentPlayerTimeMsec:Math.floor(a)};this.data.clickTrackingParams&&(a.itct=this.data.clickTrackingParams);return Jd(b,a)}});Polymer({is:"yt-reload-continuation",behaviors:[W.YtRendererBehavior],properties:{data:Object},trigger:function(){this.fire("yt-load-reload-continuation",this.getContinuationUrl.bind(this))}, getContinuationUrl:function(a){var b={ctoken:this.data.continuation,continuation:this.data.continuation};this.data.clickTrackingParams&&(b.itct=this.data.clickTrackingParams);return Jd(a,b)}});Polymer({is:"yt-timed-continuation",properties:{data:{type:Object,observer:"dataChanged_"}},created:function(){this.asyncHandle_=null}, attached:function(){this.scheduleCallback_()}, detached:function(){null!==this.asyncHandle_&&(this.cancelAsync(this.asyncHandle_),this.asyncHandle_=null)}, dataChanged_:function(){this.scheduleCallback_()}, forceTrigger:function(a){this.trigger_(a)}, scheduleCallback_:function(){this.isAttached&&this.data&&(null!==this.asyncHandle_&&this.cancelAsync(this.asyncHandle_),this.asyncHandle_=this.async(this.trigger_,this.data.timeoutMs))}, trigger_:function(a){a=void 0===a?{}:a;this.asyncHandle_&&this.cancelAsync(this.asyncHandle_);this.asyncHandle_=null;this.fire("yt-load-timed-continuation",this.getContinuationUrl.bind(this,a))}, getContinuationUrl:function(a,b){var c={ctoken:this.data.continuation};this.data.clickTrackingParams&&(c.itct=this.data.clickTrackingParams);return Jd(b,Object.assign(c,a))}});var YZa=document.createElement("template");YZa.innerHTML=""; document.head.appendChild(YZa.content);var ZZa,$Za=function(){if(void 0!==ZZa)return ZZa;var a=document.createElement("template");a.innerHTML=""; return ZZa=a}; document.head.appendChild($Za().content);var a_a;var b_a=document.head,c_a=b_a.appendChild,d_a;if(void 0===a_a){var MP=document.createElement("template");MP.innerHTML="";MP.content.insertBefore($Za().content.cloneNode(!0),MP.content.firstChild);a_a=MP}d_a=a_a;c_a.call(b_a,d_a.content);var e_a=document.createElement("template");e_a.innerHTML=""; document.head.appendChild(e_a.content);var f_a;var g_a;Polymer({is:"yt-live-chat-docked-message-renderer",_template:function(){if(void 0!==g_a)return g_a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===f_a){var d=document.createElement("template");d.innerHTML=""; f_a=d}d=f_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return g_a=a}, properties:{dockedItem:{type:Object},undockingItem:{type:Object},emojiManager:Object,participantsManager:Object,isUndocking:{type:Boolean,reflectToAttribute:!0,value:!1},dockableMessages:{type:Array},isScrolledToBottomOfItemList:{type:Boolean,observer:"isScrolledToBottomOfItemListChanged_"}},behaviors:[Y],observers:["onDockableMessagesChanged_(dockableMessages.splices)"],stampDom:{dockedItem:{id:"docked-item",mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}}}},undockingItem:{id:"undocking-item",mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}}}}},STICKY_CHAT_DOCK_TIME_MS:1E4,STICKY_CHAT_UNDOCK_TRANSITION_TIME_MS:250,MESSAGE_TO_TOP_EPSILON:8,created:function(){this.boundCheckIntersections_=this.checkIntersections_.bind(this);this.intersectRAF_=null}, detached:function(){this.intersectRAF_&&window.cancelAnimationFrame(this.intersectRAF_)}, clear:function(){this.undock_()}, dock_:function(a){this.dockedItem&&this.undock_();this.dockedItem={liveChatTextMessageRenderer:a.data};this.dockTimer=window.setTimeout(this.undock_.bind(this),this.STICKY_CHAT_DOCK_TIME_MS)}, undock_:function(){!this.isUndocking&&this.dockedItem&&(window.clearTimeout(this.dockTimer),this.isUndocking=!0,this.undockingItem=this.dockedItem,this.dockedItem=void 0,window.setTimeout(function(){this.undockingItem=void 0;this.isUndocking=!1}.bind(this),this.STICKY_CHAT_UNDOCK_TRANSITION_TIME_MS))}, checkIntersections_:function(){if(this.dockableMessages.length){this.intersectRAF_=window.requestAnimationFrame(this.boundCheckIntersections_);var a=this.dockableMessages[0],b=this.getBoundingClientRect();a=a.getBoundingClientRect();var c=a.top-b.top,d=c<=this.MESSAGE_TO_TOP_EPSILON;c=c-this.clientHeight<=this.MESSAGE_TO_TOP_EPSILON;if(d){for(var f;d;){f=this.dockableMessages.shift();d=this.dockableMessages[0];if(!d)break;d=d.getBoundingClientRect();c=d.top-b.top;var g=c<=this.MESSAGE_TO_TOP_EPSILON; if(c-a.height<=this.MESSAGE_TO_TOP_EPSILON)if(g)a=d;else return;d=g}this.dock_(f)}else c&&this.dockedItem&&this.clear()}else this.intersectRAF_=null}, trimInvisibleDockableMessages_:function(){if(this.parentElement)for(var a=this.parentElement.scrollTop;this.dockableMessages&&this.dockableMessages.length&&(this.dockableMessages[0].offsetTop
[[getSimpleString(data.authorName)]]
[[getSimpleString(data.text)]]
[[timestampString]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h_a){var d=document.createElement("template");d.innerHTML=""; h_a=d}d=h_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return i_a=a}, properties:{data:Object},behaviors:[W.YtRendererBehavior,bP.YtLiveChatItemBehavior],ready:function(){var a=document.querySelector("yt-live-chat-app");a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed","")}});var j_a;var k_a;var NP=function(){var a=O.apply(this,arguments)||this;a.showOverflowButton=!1;a.isViewSelectorDisabled=!1;a.actionMap={"yt-live-chat-seek-start":"disableViewSelector","yt-live-chat-reload-start":"disableViewSelector","yt-live-chat-reload-success":"enableViewSelector","yt-live-chat-reload-fail":"enableViewSelector","yt-live-chat-seek-success":"enableViewSelector","yt-live-chat-seek-fail":"enableViewSelector"};return a}; p(NP,O);e=NP.prototype;e.configureRendererStamper=function(){return{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.viewSelector":{id:"view-selector",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}}}}; e.ready=function(){this.popupPositionTarget=this.ytIconButton}; e.onMenuClick=function(){var a,b;(null===(b=null===(a=this.data)||void 0===a?void 0:a.overflowMenu)||void 0===b?0:b.menuRenderer)&&this.ytOpenPopupBehavior.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data.overflowMenu.menuRenderer}}})}; e.computeShowOverflowButton=function(a){return!!a&&!!a.overflowMenu}; e.disableViewSelector=function(){this.isViewSelectorDisabled=!0}; e.enableViewSelector=function(){this.isViewSelectorDisabled=!1}; e.viewSelectorDisabledChanged=function(){var a=this.$$("yt-sort-filter-sub-menu-renderer");a&&(a.disabled=this.isViewSelectorDisabled)}; h.Object.defineProperties(NP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===k_a){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.titleText)]]\n \n
\n
\n\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===j_a){var d=document.createElement("template");d.innerHTML=""; j_a=d}d=j_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);k_a=a}a=k_a;return a}}}); var OP=NP;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],OP.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],OP.prototype,"ytActionSenderBehavior",void 0);w([P(aP.YtOpenPopupBehavior),x("design:type",Object)],OP.prototype,"ytOpenPopupBehavior",void 0);w([P(Y),x("design:type",Object)],OP.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],OP.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],OP.prototype,"data",void 0);w([R({computed:"computeShowOverflowButton(data)"}),x("design:type",Boolean)],OP.prototype,"showOverflowButton",void 0);w([R({observer:"viewSelectorDisabledChanged"}),x("design:type",Boolean)],OP.prototype,"isViewSelectorDisabled",void 0);w([R(),x("design:type",HTMLElement)],OP.prototype,"popupPositionTarget",void 0);w([AE("#overflow"),x("design:type",HTMLElement)],OP.prototype,"ytIconButton",void 0); OP=w([U({is:"yt-live-chat-header-renderer"})],OP);var l_a;var m_a;var n_a;var o_a;Polymer({is:"yt-dropdown-menu",_template:function(){if(void 0!==o_a)return o_a;var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n_a){var d=document.createElement("template");d.innerHTML=""; n_a=d}d=n_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return o_a=a}, behaviors:[AO.YtComponentBehavior,dP.YtEndpointBehavior],properties:{data:{type:Object,observer:"dataChanged_"},selected:Number,useLabel:{type:Boolean,value:!1},icon:String,iconLabel:String,ariaLabel:String,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},menuExpanded:{type:String,value:"false"},closeOnActivate:{type:Boolean,value:!1}},listeners:{"iron-activate":"onIronActivate_",tap:"onTap_","iron-overlay-closed":"onMenuClose_"},dataChanged_:function(a){this.selected=void 0;var b=this.computeSelectedIndex_(a); 0<=b&&(this.selected=b);a=a&&1=this.data.length?a.stopPropagation():this.menuExpanded="true"}, onIronActivate_:function(a){a=a.detail.item;var b=this.$.repeat.itemForElement(a);b&&b.serviceEndpoint?(this.sendServiceRequestAction([b.serviceEndpoint]),this.fire("yt-playlist-reloading")):TZa(a)}, onTap_:function(a){a.preventDefault()}, onItemTap_:function(a){this.onEndpointTap_(a)}, onLinkFocus_:function(a){try{var b=Polymer.dom(a).localTarget}catch(d){}if(b){var c=b.querySelector("paper-item");c&&this.debounce("focus",function(){c.focus()})}}, onMenuClose_:function(){this.menuExpanded="false"}, computeHasSubtitle_:function(a){return!!a}, computeHrefForItem_:function(a){return this.computeHref_(this.computeEndpoint_(a))}});Polymer({is:"yt-sort-filter-sub-menu-renderer",_template:function(){if(void 0!==m_a)return m_a;var a=document.createElement("template");a.innerHTML="[[data.tooltip]]\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l_a){var d=document.createElement("template");d.innerHTML=""; l_a=d}d=l_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return m_a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object,isRightAligned:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},closeOnActivate:{type:Boolean,value:!1}},computeHorizontalAlign_:function(a){return a?"right":"left"}, computeAccessibilityLabel_:function(a){return this.get("accessibility.accessibilityData.label",a)}});var p_a;var q_a;var r_a;var s_a;var PP=function(){var a=O.apply(this,arguments)||this;a.hidden=!1;a.supportsInlineActionButtons=!0;return a}; p(PP,O);PP.prototype.ready=function(){var a=document.querySelector("yt-live-chat-app");(null===a||void 0===a?0:a.hasAttribute("dashboard-money-feed"))&&Polymer.dom(this).setAttribute("dashboard-money-feed","")}; PP.prototype.dataChanged=function(a){var b=Polymer.dom(this.$["detail-text"]);b.textContent="";(null===a||void 0===a?0:a.detailText)&&b.appendChild(this.ytLiveChatItemBehavior.createDocumentFragment(a.detailText))}; h.Object.defineProperties(PP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===s_a){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n
[[getSimpleString(data.authorName)]]
\n
[[getSimpleString(data.eventText)]]
\n
\n
\n
[[timestampString]]
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r_a){var d=document.createElement("template");d.innerHTML=""; r_a=d}d=r_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);s_a=a}a=s_a;return a}}}); var QP=PP;w([P(W.YtRendererBehavior),x("design:type",Object)],QP.prototype,"ytRendererBehavior",void 0);w([P(bP.YtLiveChatItemBehavior),x("design:type",Object)],QP.prototype,"ytLiveChatItemBehavior",void 0);w([P(Y),x("design:type",Object)],QP.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],QP.prototype,"data",void 0);w([R({computed:"truthy(isDeleted)",reflectToAttribute:!0}),x("design:type",Boolean)],QP.prototype,"hidden",void 0); QP=w([U({is:"yt-live-chat-legacy-paid-message-renderer"})],QP);var t_a;var u_a;var v_a;var w_a;Polymer({is:"yt-live-chat-message-subtext-renderer",_template:function(){if(void 0!==w_a)return w_a;var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===v_a){var d=document.createElement("template");d.innerHTML="";v_a=d}d=v_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild); return w_a=a}, properties:{data:Object}});Polymer({is:"yt-live-chat-message-renderer",_template:function(){if(void 0!==u_a)return u_a;var a=document.createElement("template");a.innerHTML="\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===t_a){var d=document.createElement("template");d.innerHTML=""; t_a=d}d=t_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return u_a=a}, properties:{data:Object,subtextOnBottom:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[W.YtRendererBehavior,Y],stampDom:{"data.button":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.subtext":{id:"subtext",mapping:{messageSubtextRenderer:"yt-live-chat-message-subtext-renderer"}}}});var x_a;var y_a;Polymer({is:"yt-live-chat-mode-change-message-renderer",_template:function(){if(void 0!==y_a)return y_a;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x_a){var d=document.createElement("template");d.innerHTML=""; x_a=d}d=x_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return y_a=a}, properties:{data:Object},behaviors:[Y],stampDom:{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}}}});var z_a;var A_a;Polymer({is:"yt-live-chat-moderation-message-renderer",_template:function(){if(void 0!==A_a)return A_a;var a=document.createElement("template");a.innerHTML="
\n [[timestampString]]\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z_a){var d=document.createElement("template");d.innerHTML=""; z_a=d}d=z_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return A_a=a}, properties:{data:Object},behaviors:[W.YtRendererBehavior,bP.YtLiveChatItemBehavior]});var B_a;Polymer({is:"yt-live-chat-placeholder-item-renderer",_template:function(){if(void 0!==B_a)return B_a;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);return B_a=a}, properties:{data:Object}});var C_a;var D_a;Polymer({is:"yt-live-chat-server-error-message",_template:function(){if(void 0!==D_a)return D_a;var a=document.createElement("template");a.innerHTML="[[timestampString]]\n[[data.message]]\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C_a){var d=document.createElement("template");d.innerHTML=""; C_a=d}d=C_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return D_a=a}, properties:{data:{type:Object,observer:"dataChanged_"},timestampString:{type:String,computed:"computeTimestampString_(data.timestampUsec)"}},TIME_FORMATTER:new MF(7),dataChanged_:function(a,b){a&&a.class&&this.toggleClass(a.class,!0);b&&b.class&&this.toggleClass(b.class,!1)}, computeTimestampString_:function(a){return this.TIME_FORMATTER.format(new Date(a/1E3))}});var E_a;var F_a;Polymer({is:"yt-live-chat-toast-renderer",_template:function(){if(void 0!==F_a)return F_a;var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E_a){var d=document.createElement("template");d.innerHTML=""; E_a=d}d=E_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return F_a=a}, properties:{message:{type:Object},text:{type:Object,computed:"computeText_(message)",observer:"handleTextChanged_"},actionButton:{type:Object,computed:"computeActionButton_(message)"},isShowingMessage:{type:Boolean,value:!1,reflectToAttribute:!0},isMessageVisible:{type:Boolean,value:!1,reflectToAttribute:!0}},listeners:{transitionend:"onTransitionEnd_"},behaviors:[Y,NO.YtActionHandlerBehavior],actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-live-chat-add-to-toast-action":"handleAction_"}, stampDom:{actionButton:{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},created:function(){this.queuedMessages_=[];this.clearTimeout_=this.toastTimeout_=null}, queueMessage_:function(a){this.queuedMessages_.push(a);this.maybeShowMessage_()}, maybeShowMessage_:function(){this.clearTimeout_||this.toastTimeout_||!this.queuedMessages_.length||(Polymer.dom(this).setAttribute("role","alert"),this.message=this.queuedMessages_.shift(),this.isShowingMessage=this.isMessageVisible=!0,this.toastTimeout_=this.async(function(){this.toastTimeout_=null;this.dismissMessage()},this.actionButton?5E3:3E3))}, dismissMessage:function(){this.toastTimeout_&&(this.cancelAsync(this.toastTimeout_),this.toastTimeout_=null);this.isShowingMessage=!1;Polymer.dom(this).removeAttribute("role");this.clearTimeout_=this.async(function(){this.clearTimeout_=this.message=null;this.isMessageVisible=!1;this.maybeShowMessage_()},500)}, onTransitionEnd_:function(){if(this.isShowingMessage){var a=kk(this);a&&a.focus()}}, handleLiveChatActions_:function(a){a.forEach(this.handleAction_.bind(this))}, handleAction_:function(a){a.liveChatAddToToastAction&&this.queueMessage_(a.liveChatAddToToastAction)}, computeText_:function(a){return a&&a.item?a.item.notificationTextRenderer&&a.item.notificationTextRenderer.successResponseText?a.item.notificationTextRenderer.successResponseText:a.item.notificationActionRenderer&&a.item.notificationActionRenderer.responseText?a.item.notificationActionRenderer.responseText:null:null}, handleTextChanged_:function(a){a?(a=CL(a),Polymer.dom(this).setAttribute("aria-label",a)):Polymer.dom(this).removeAttribute("aria-label")}, computeActionButton_:function(a){return a&&a.item?a.item.notificationActionRenderer&&a.item.notificationActionRenderer.actionButton?a.item.notificationActionRenderer.actionButton:null:null}});var G_a;var H_a;Polymer({is:"yt-live-chat-viewer-engagement-message-renderer",_template:function(){if(void 0!==H_a)return H_a;var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===G_a){var d=document.createElement("template");d.innerHTML=""; G_a=d}d=G_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return H_a=a}, properties:{data:Object},behaviors:[W.YtRendererBehavior,bP.YtLiveChatItemBehavior,Y],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}}}});var I_a;var J_a;var RP=function(){return O.apply(this,arguments)||this}; p(RP,O);RP.prototype.onHelpTap=function(a){this.data&&this.data.informationDialog&&(this.fire("yt-navigate",{endpoint:{liveChatDialogEndpoint:{content:this.data.informationDialog}}}),a.preventDefault(),a.stopPropagation())}; h.Object.defineProperties(RP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===J_a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===I_a){var d=document.createElement("template");d.innerHTML=""; I_a=d}d=I_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);J_a=a}a=J_a;return a}}}); var SP=RP;w([P(W.YtRendererBehavior),x("design:type",Object)],SP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],SP.prototype,"data",void 0);SP=w([U({is:"ytd-live-chat-purchased-product-message-renderer"})],SP);Polymer({is:"yt-live-chat-item-list-renderer",_template:function(){if(void 0!==q_a)return q_a;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p_a){var d=document.createElement("template");d.innerHTML=""; p_a=d}d=p_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return q_a=a}, properties:{data:{type:Object,observer:"dataChanged_"},atBottom:{type:Boolean,value:!0,observer:"atBottomChanged_"},visibleItems:{type:Array,value:function(){return[]}}, itemIdToDockDurationMap:{type:Object,value:function(){return{}}}, dockableMessages:{type:Array,value:function(){return[]}}, allowScroll:{type:Boolean,reflectToAttribute:!0,computed:"computeAllowScroll_(contextMenuOpen, moderationModeEnabled)"},emojiManager:Object,participantsManager:Object,contextMenuOpen:{type:Boolean,value:!1},moderationModeEnabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"moderationModeEnabledChanged_"},isEmpty:{type:Boolean,computed:"computeIsEmpty_(visibleItems.splices)"}},behaviors:[Polymer.IronResizableBehavior,W.YtRendererBehavior,mP,Y,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior], listeners:{"iron-resize":"onIronResize_","yt-live-chat-context-menu-opened":"onContextMenuOpened_","yt-live-chat-context-menu-closed":"onContextMenuClosed_","yt-popup-closed":"maybeScrollToBottom_","yt-rendererstamper-finished":"onYtRendererstamperFinished_"},observers:["isAttachedOrDataChanged_(isAttached, data)"],actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-add-chat-item-action":"handleLiveChatAction_","yt-dim-chat-item-action":"handleLiveChatAction_","yt-remove-chat-item-action":"handleLiveChatAction_", "yt-replace-chat-item-action":"handleLiveChatAction_","yt-mark-chat-item-as-deleted-action":"handleLiveChatAction_","yt-mark-chat-items-by-author-as-deleted-action":"handleLiveChatAction_","yt-add-live-chat-text-message-from-template-action":"handleAddTextMessageFromTemplateAction_","yt-live-chat-picker-changed":"handlePickerChanged_","yt-live-chat-maybe-scroll-to-bottom":"maybeScrollToBottom_","yt-live-chat-scroll-to-bottom":"scrollToBottom_","yt-live-chat-keyboard-event":"onKeyboardEventAction_", "yt-live-chat-seek-success":"handleChatSeekSuccess_"},stampDom:{"data.emptyStateMessage":{id:"empty-state-message",mapping:{messageRenderer:"yt-live-chat-message-renderer"}},visibleItems:{id:"items",mapping:{liveChatAutoModMessageRenderer:{component:"yt-live-chat-auto-mod-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatPaidMessageRenderer:{component:"yt-live-chat-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatLegacyPaidMessageRenderer:{component:"yt-live-chat-legacy-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatMembershipItemRenderer:{component:"yt-live-chat-membership-item-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatPaidStickerRenderer:"yt-live-chat-paid-sticker-renderer",liveChatDonationAnnouncementRenderer:"yt-live-chat-donation-announcement-renderer",liveChatModeChangeMessageRenderer:"yt-live-chat-mode-change-message-renderer",liveChatModerationMessageRenderer:"yt-live-chat-moderation-message-renderer",liveChatPlaceholderItemRenderer:"yt-live-chat-placeholder-item-renderer",liveChatPurchasedProductMessageRenderer:"ytd-live-chat-purchased-product-message-renderer", liveChatViewerEngagementMessageRenderer:"yt-live-chat-viewer-engagement-message-renderer",serverErrorMessage:"yt-live-chat-server-error-message"},events:!0,reuseComponents:!0}},CHAT_SMOOTH_ANIMATION_TIME_MS:ve?0:84,SCROLLED_TO_BOTTOM_EPSILON:15,created:function(){this.activeItems_=[];this.isSmoothed_=!0;this.lastSmoothChatMessageAddMs_=null;this.chatRateMs_=1E3;this.lastSmoothScrollClockTime_=this.lastSmoothScrollUpdate_=null;this.scrollTimeRemainingMs_=this.scrollPixelsRemaining_=0;this.smoothScrollRafHandle_= null;this.preinsertHeight_=0}, attached:function(){this.listen(window,"resize","maybeScrollToBottom_");this.listen(window,"keydown","onWindowKeyEvent_");this.listen(window,"keyup","onWindowKeyEvent_");lWa()||(this.listen(window.top,"blur","onTopWindowBlurEvent_"),window!=window.top&&this.listen(window,"blur","onFramedWindowBlurEvent_"));this.isSmoothScrollEnabled_()&&Polymer.dom(this.$["item-scroller"]).classList.add("animated");N("live_chat_aggregation")&&Polymer.dom(this.$.contents).appendChild(document.createElement("yt-live-chat-prototype-aggregation"))}, detached:function(){this.resetSmoothScroll_();this.unlisten(window,"resize","maybeScrollToBottom_");this.unlisten(window,"keydown","onWindowKeyEvent_");this.unlisten(window,"keyup","onWindowKeyEvent_");lWa()||(this.unlisten(window.top,"blur","onTopWindowBlurEvent_"),window!=window.top&&this.unlisten(window,"blur","onFramedWindowBlurEvent_"))}, onIronResize_:function(){this.maybeResizeAnimationContainer_()}, maybeResizeAnimationContainer_:function(){this.isSmoothScrollEnabled_()&&this.debounce("resize",function(){var a=this.$.items.clientHeight,b=this.$["item-offset"].clientHeight;0!=a&&(this.$["item-offset"].style.height=a+"px",(0==b||this.atBottom)&&this.scrollToBottom_())})}, isAttachedOrDataChanged_:function(a,b){var c=window!=window.top&&!lWa();a?b&&b.enablePauseChatKeyboardShortcuts&&(c&&this.listen(window.top,"mousemove","onModerationMouseMoveEvent_"),this.listen(window,"mousemove","onModerationMouseMoveEvent_")):(c&&this.unlisten(window.top,"mousemove","onModerationMouseMoveEvent_"),this.unlisten(window,"mousemove","onModerationMouseMoveEvent_"))}, clearList:function(){this.activeItems_=[];this.visibleItems=[];this.dockableMessages=[];this.isSmoothed_=!0;this.lastSmoothChatMessageAddMs_=null;this.chatRateMs_=1E3;this.lastSmoothScrollClockTime_=this.lastSmoothScrollUpdate_=null;this.scrollTimeRemainingMs_=this.scrollPixelsRemaining_=0;this.smoothScrollRafHandle_=null;this.preinsertHeight_=0;this.itemIdToDockDurationMap={};this.$["docked-messages"].clear();this.$["banner-manager"].reset();this.maybeResizeScrollContainer_([]);this.$.items.style.transform= "";this.atBottom||this.scrollToBottom_()}, dataChanged_:function(){this.clearList()}, handleLiveChatActions_:function(a){a.length&&(a.forEach(this.handleLiveChatAction_,this),this.maybeResizeScrollContainer_(a),this.flushActiveItems_(),this.async(this.maybeScrollToBottom_))}, handleLiveChatAction_:function(a){a.addChatItemAction?this.handleAddChatItemAction_(a.addChatItemAction):a.markChatItemAsDeletedAction?this.handleMarkChatItemAsDeletedAction_(a.markChatItemAsDeletedAction):a.markChatItemsByAuthorAsDeletedAction?this.handleMarkChatItemsByAuthorAsDeletedAction_(a.markChatItemsByAuthorAsDeletedAction):a.dimChatItemAction?this.handleDimChatItemAction_(a.dimChatItemAction):a.replaceChatItemAction?this.handleReplaceChatItemAction_(a.replaceChatItemAction):a.removeChatItemAction? this.handleRemoveChatItemAction_(a.removeChatItemAction):a.serverErrorMessage&&this.activeItems_.push({serverErrorMessage:{timestampUsec:this.currentTimestampUsec_(),message:a.serverErrorMessage.message,class:a.serverErrorMessage.class}})}, handleAddChatItemAction_:function(a){var b=a.item,c=Object.keys(b)[0],d=b[c],f=!1;this.forEachItem_(function(l,m,n){var r=Object.keys(b)[0];!(m=m[r])||m.id!=a.clientId&&m.id!=d.id||("visibleItems"==l?(this.visibleItems[n]=b,this.$.items.children[n].set("data",d)):this.activeItems_[n]=b,f=!0)}); if(c=this.get("stickinessParams.dockAtTopDurationMs",a)||0){var g=Array.prototype.find.call(Polymer.dom(this.$.items).children,function(l){return l.id==d.id}); g?this.maybeAddDockableMessage_(g):this.itemIdToDockDurationMap[d.id]=c}f||this.activeItems_.push(b)}, handleReplaceChatItemAction_:function(a){var b=a.replacementItem;this.forEachItem_(function(c,d,f){var g=Object.keys(d)[0];(d=d[g])&&d.id==a.targetItemId&&("visibleItems"==c?(this.splice(c,f,1,b),this.resetSmoothScroll_()):this.activeItems_[f]=b)})}, markAsDeleted_:function(a,b,c,d,f){b=[a,b,c].join(".");this.set(b+".deletedStateMessage",d);this.set(b+".showOriginalContentMessage",f);"visibleItems"==a&&this.resetSmoothScroll_()}, markAutoModRendererAsDeleted_:function(a,b,c,d,f){b=b.liveChatAutoModMessageRenderer.autoModeratedItem;b.liveChatTextMessageRenderer.deletedStateMessage=d;b.liveChatTextMessageRenderer.showOriginalContentMessage=f;this.splice(a,c,1,b);"visibleItems"==a&&this.resetSmoothScroll_()}, handleMarkChatItemAsDeletedAction_:function(a){this.forEachItem_(function(b,c,d){var f=Object.keys(c)[0],g=c[f];g&&g.id==a.targetItemId&&("liveChatAutoModMessageRenderer"==f?this.markAutoModRendererAsDeleted_(b,c,d,a.deletedStateMessage,a.showOriginalContentMessage):this.markAsDeleted_(b,d,f,a.deletedStateMessage,a.showOriginalContentMessage))})}, handleDimChatItemAction_:function(a){var b=a.clientAssignedId;b&&this.forEachItem_(function(c,d,f){var g=Object.keys(d)[0];(d=d[g])&&d.id==b&&(c=[c,f,g].join("."),this.set(c+".isDimmed",!0))})}, handleMarkChatItemsByAuthorAsDeletedAction_:function(a){this.forEachItem_(function(b,c,d){var f=Object.keys(c)[0],g=c[f];g&&g.authorExternalChannelId==a.externalChannelId&&("liveChatAutoModMessageRenderer"==f?this.markAutoModRendererAsDeleted_(b,c,d,a.deletedStateMessage,a.showOriginalContentMessage):this.markAsDeleted_(b,d,f,a.deletedStateMessage,a.showOriginalContentMessage))})}, handleRemoveChatItemAction_:function(a){this.forEachItem_(function(b,c,d){var f=Object.keys(c)[0];(c=c[f])&&c.id==a.targetItemId&&(this.splice(b,d,1),"visibleItems"==b&&this.resetSmoothScroll_())})}, onYtRendererstamperFinished_:function(){var a=Polymer.dom(this.$.items).children;Array.prototype.forEach.call(a,function(b){var c=b.id;this.itemIdToDockDurationMap[c]&&(this.maybeAddDockableMessage_(b),delete this.itemIdToDockDurationMap[c])}.bind(this))}, forEachItem_:function(a){this.visibleItems.forEach(a.bind(this,"visibleItems"));this.activeItems_.forEach(a.bind(this,"activeItems_"))}, handleAddTextMessageFromTemplateAction_:function(a,b,c){a=y.unsafeClone(a.addLiveChatTextMessageFromTemplateAction.template.liveChatTextMessageRenderer);b=c.client_message_id;a.id=b;a.timestampUsec=String(this.currentTimestampUsec_());c.message?a.message=zL(c.message):c.rich_message&&(a.message=this.formattedStringFromLiveChatRichMessageInput_(c.rich_message));this.handleLiveChatActions_([{addChatItemAction:{clientMessageId:b,item:{liveChatTextMessageRenderer:a}}}])}, formattedStringFromLiveChatRichMessageInput_:function(a){var b={runs:[]};a=a.text_segments;for(var c=0;cthis.data.maxItemsToDisplay&&this.activeItems_.splice(0,this.activeItems_.length-this.data.maxItemsToDisplay)}, showNewItems_:function(){var a=this.$.items.clientHeight>this.$["item-scroller"].clientHeight;this.$["item-offset"].style.height=this.$.items.clientHeight+"px";this.canScrollToBottom_()&&a&&(this.scrollPixelsRemaining_+=this.$.items.clientHeight-this.preinsertHeight_,this.scrollToBottom_(),this.$.items.style.transform="translateY("+Math.floor(this.scrollPixelsRemaining_)+"px)",this.lastSmoothChatMessageAddMs_||(this.lastSmoothChatMessageAddMs_=performance.now()),a=performance.now()-this.lastSmoothChatMessageAddMs_, this.chatRateMs_=.9*this.chatRateMs_+.1*a,this.isSmoothed_&&400>this.chatRateMs_&&(this.isSmoothed_=!1),!this.isSmoothed_&&450this.scrollPixelsRemaining_&&0a-this.lastSmoothScrollUpdate_&&1E3>performance.now()-this.lastSmoothScrollClockTime_&&0=a.scrollHeight-a.clientHeight-this.SCROLLED_TO_BOTTOM_EPSILON;this.flushActiveItems_()}, onContextMenuOpened_:function(){this.contextMenuOpen=!0}, onContextMenuClosed_:function(){this.contextMenuOpen=!1}, onShow_:function(){this.maybeScrollToBottom_()}, maybeResizeScrollContainer_:function(a){this.isSmoothScrollEnabled_&&jb(a,function(b){return!!b.replaceChatItemAction})&&(this.$["item-offset"].style.height=this.$.items.clientHeight+"px",this.maybeScrollToBottom_())}, computeAllowScroll_:function(a,b){return!(a||b)}, maybeScrollToBottom_:function(){this.canScrollToBottom_()&&this.scrollToBottom_()}, scrollToBottom_:function(){this.$["item-scroller"].scrollTop=Math.pow(2,24);this.atBottom=!0}, atBottomChanged_:function(a){a?this.hideShowMoreAsync_||(this.hideShowMoreAsync_=this.async(function(){this.$["show-more"].style.visibility="hidden"},200)):(this.hideShowMoreAsync_&&this.cancelAsync(this.hideShowMoreAsync_),this.hideShowMoreAsync_=null,this.$["show-more"].style.visibility="visible")}, onWindowKeyEvent_:function(a){this.handleKeyboardEvent_(a.type,a.keyCode)}, onKeyboardEventAction_:function(a){this.handleKeyboardEvent_(a.eventType,a.keyCode)}, handleKeyboardEvent_:function(a,b){b=we?gBa(b):ye&&xe?hBa(b):b;this.data.enablePauseChatKeyboardShortcuts&&18==b&&(this.moderationModeEnabled="keydown"==a)}, onTopWindowBlurEvent_:function(){!window||window!=window.top&&document.hasFocus()||(this.moderationModeEnabled=!1)}, onFramedWindowBlurEvent_:function(){window==window.top||window.top.document.hasFocus()||(this.moderationModeEnabled=!1)}, onModerationMouseMoveEvent_:function(a){this.moderationModeEnabled=a.altKey}, moderationModeEnabledChanged_:function(){Polymer.updateStyles()}, isSmoothScrollEnabled_:function(){return 0!=this.CHAT_SMOOTH_ANIMATION_TIME_MS}, handleChatSeekSuccess_:function(){this.clearList()}});var K_a;var L_a;var M_a;var N_a,O_a=function(){if(void 0!==N_a)return N_a;var a=document.createElement("template");a.innerHTML=""; return N_a=a};var P_a;var Q_a;var R_a;Polymer({is:"yt-live-chat-poll-editor-input",_template:function(){if(void 0!==R_a)return R_a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n \n \n \n [[charactersRemaining]]\n
\n
\n
\n [[getSimpleString(data.charCountErrorText)]]\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q_a){var d=document.createElement("template");d.innerHTML=""; Q_a=d}d=Q_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return R_a=a}, properties:{data:{type:Object},id:{type:Number,computed:"computeId(data.id)"},emojiManager:Object,inputData:{type:Object,computed:"computeInputData(data.inputData)"},isRemovable:{type:Boolean,reflectToAttribute:!0,value:!1,computed:"computeIsRemovable(data.isRemovable)"},hasPrefilledText:{type:Boolean,reflectToAttribute:!0,computed:"computeHasPrefilledText(data.hasPrefilledText)"},charactersRemaining:{type:Number,computed:"computeCharactersRemaining(data.maxCharacterLimit, characterCount)"},characterCount:{type:Number}, isInputDirty:{type:Boolean,value:!1},overCharacterLimit:{type:Boolean,reflectToAttribute:!0,computed:"computeOverCharacterLimit(charactersRemaining)"},underCharacterLimit:{type:Boolean,computed:"computeUnderCharacterLimit(data, characterCount, hasPrefilledText)"},showErrorMessage:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeShowErrorMessage(data.charCountErrorText, overCharacterLimit, isInputDirty, characterCount)"}},behaviors:[W.YtRendererBehavior],listeners:{"yt-live-chat-text-input-field-renderer-character-count-changed":"handleTextInputCharCountChanged_"}, computeId:function(){return this.data.id}, computeInputData:function(){return this.data.inputData}, computeHasPrefilledText:function(){return this.data.hasPrefilledText}, computeIsRemovable:function(){return!!this.data&&!!this.data.isRemovable}, computeShowErrorMessage:function(){return this.data&&this.data.charCountErrorText?this.overCharacterLimit||this.underCharacterLimit&&this.isInputDirty:!1}, getLiveChatRichMessageInput:function(){return this.$.input.liveChatRichMessageInput}, clearInput:function(){this.$.input.setLiveChatRichMessageInput(null)}, computeCharactersRemaining:function(){if(this.data&&void 0!==this.data.maxCharacterLimit&&void 0!==this.characterCount)return this.data.maxCharacterLimit-this.characterCount}, computeOverCharacterLimit:function(){return void 0!==this.charactersRemaining&&0>this.charactersRemaining}, computeUnderCharacterLimit:function(){return this.hasPrefilledText?!1:!!this.data&&this.data.minCharacterLimit>this.characterCount}, handleTextInputCharCountChanged_:function(a){a=a.detail&&a.detail.characterCount;void 0!==a&&(this.characterCount=a,0!==a&&(this.isInputDirty=!0))}, onInputFocusOut:function(){this.isInputDirty=!0}, onClickCloseButton_:function(){this.fire("yt-live-chat-poll-editor-input-closed",{id:this.id})}});var S_a;var T_a;var U_a={minPollOptions:2,maxPollOptions:4,minPollOptionChars:1,maxPollOptionChars:35,maxPollQuestionChars:100,optionPlaceholderText:{simpleText:""},questionPlaceholderText:{simpleText:""},customOptionPlaceholderText:[],pollOptionData:{}}; Polymer({is:"yt-live-chat-poll-editor-panel-renderer",_template:function(){if(void 0!==T_a)return T_a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n
\n \n \n
\n \n \n \n \n
\n
\n
\n
\n [[getSimpleString(pollEditorInfoWithDefaults.pollQuestionCharCountErrorText)]]\n
\n
\n [[pollQuestionCharacterCount]]/[[pollEditorInfoWithDefaults.maxPollQuestionChars]]\n
\n
\n [[pollQuestionCharactersRemaining]]\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S_a){var d=document.createElement("template");d.innerHTML=""; S_a=d}d=S_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return T_a=a}, properties:{data:{type:Object,observer:"dataChanged"},id:{type:String,computed:"computeId(data.id)",reflectToAttribute:!0},emojiManager:Object,pollOptionsData:{type:Array,value:function(){return[]}}, pollQuestionData:{type:Object,computed:"computePollQuestionData(pollEditorInfoWithDefaults)"},pollQuestionCharacterCount:{type:Number,value:0},pollQuestionCharactersRemaining:{type:Number,computed:"computePollQuestionCharactersRemaining(pollEditorInfoWithDefaults.maxPollQuestionChars, pollQuestionCharacterCount)"},overQuestionCharacterLimit:{type:Boolean,reflectToAttribute:!0,computed:"computeOverQuestionCharacterLimit(pollQuestionCharacterCount, pollEditorInfoWithDefaults)"},pollEditorInfoWithDefaults:{type:Object, computed:"computePollEditorInfoWithDefaults(data.pollEditorInfo)"},currentNumPollOptions:{type:Number,computed:"computeCurrentNumPollOptions(pollOptionsData.splices)",value:0},hasMaxNumPollOptions:{type:Boolean,computed:"computeHasMaxNumPollOptions(pollEditorInfoWithDefaults, currentNumPollOptions)",reflectToAttribute:!0},shouldInitializePoll_:{type:Boolean,computed:"computeShouldInitializePoll_(pollEditorInfoWithDefaults, pollOptionsData)"},isValidPoll:{type:Boolean,observer:"isValidPollChanged"}, createPollRequestInFlight:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Boolean,observer:"selectedChanged"},showQuestionErrorMessage:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeShowQuestionErrorMessage(pollEditorInfoWithDefaults, overQuestionCharacterLimit)"}},behaviors:[W.YtRendererBehavior,Y],observers:["shouldInitializePollChanged(shouldInitializePoll_)"],listeners:{"picker-cancelled":"onPickerCancelled","yt-service-request-completed":"handleServiceRequestCompleted_", "yt-live-chat-poll-editor-input-closed":"handlePollEditorInputClosed_","yt-live-chat-text-input-field-renderer-character-count-changed":"handleTextInputChanged_","yt-service-request-sent":"handleServiceRequestSent_"},stampDom:{"data.pollEditorInfo.addOptionButton":{id:"add-option-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.closeButton":{id:"close-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.startButton":{id:"start-button",mapping:{buttonRenderer:"yt-button-renderer"}}, pollQuestionData:{id:"poll-question",mapping:{liveChatTextInputFieldRenderer:{component:"yt-live-chat-text-input-field-renderer",properties:{emojiManager:"[[emojiManager]]"},attributes:{id:"poll-question-input","is-valid-with-no-input-text":!0}}}},pollOptionsData:{id:"poll-options",mapping:{liveChatPollOptionInput:{component:"yt-live-chat-poll-editor-input",properties:{emojiManager:"[[emojiManager]]"}}}}},dataChanged:function(){this.isValidPoll=this.getIsValidPoll_();this.data&&this.data.startButton&& this.data.startButton.buttonRenderer&&this.set("data.startButton.buttonRenderer.isDisabled",!this.isValidPoll)}, computeId:function(){return this.data&&this.data.id||""}, computePollEditorInfoWithDefaults:function(){if(this.data&&this.data.pollEditorInfo)return Object.assign(U_a,this.data.pollEditorInfo)}, computeShouldInitializePoll_:function(){return!!this.pollEditorInfoWithDefaults&&!this.pollOptionsData.length}, computePollQuestionData:function(){if(this.pollEditorInfoWithDefaults)return{liveChatTextInputFieldRenderer:{placeholder:this.pollEditorInfoWithDefaults.questionPlaceholderText,maxCharacterLimit:this.pollEditorInfoWithDefaults.maxPollQuestionChars}}}, computeOverQuestionCharacterLimit:function(){return this.pollEditorInfoWithDefaults?this.pollQuestionCharacterCount>this.pollEditorInfoWithDefaults.maxPollQuestionChars:!1}, computePollQuestionCharactersRemaining:function(){if(this.pollEditorInfoWithDefaults)return this.pollEditorInfoWithDefaults.maxPollQuestionChars-this.pollQuestionCharacterCount}, computeCurrentNumPollOptions:function(){return this.pollOptionsData.length}, computeHasMaxNumPollOptions:function(){return!this.pollEditorInfoWithDefaults||this.currentNumPollOptions>=this.pollEditorInfoWithDefaults.maxPollOptions}, computeShowQuestionErrorMessage:function(){return this.pollEditorInfoWithDefaults&&this.overQuestionCharacterLimit&&!!this.pollEditorInfoWithDefaults.pollQuestionCharCountErrorText}, shouldInitializePollChanged:function(){if(this.shouldInitializePoll_)for(var a=0;ab.maxPollQuestionChars)return!1;b=Polymer.dom(this.root).querySelectorAll("yt-live-chat-poll-editor-input");return Array.from(b).every(function(g,l){g=g.characterCount;!g&&f[l]&&(g=a.getSimpleString(f[l]).length);return g>=c&&g<=d})}, isValidPollChanged:function(){this.data&&this.data.startButton&&this.data.startButton.buttonRenderer&&this.set("data.startButton.buttonRenderer.isDisabled",!this.isValidPoll)}, addPollOptionData_:function(){var a=this.pollEditorInfoWithDefaults,b=a.maxPollOptionChars,c=a.optionPlaceholderText,d=a.customOptionPlaceholderText,f=a.pollOptionData;this.currentNumPollOptions>=a.maxPollOptions||(a={liveChatPollOptionInput:{inputData:{placeholder:d[this.currentNumPollOptions]||c,maxCharacterLimit:b},maxCharacterLimit:b,minCharacterLimit:a.minPollOptionChars,hasPrefilledText:!!d[this.currentNumPollOptions],isRemovable:this.currentNumPollOptions>=a.minPollOptions}},f.charCountErrorText&&( a.liveChatPollOptionInput.charCountErrorText=f.charCountErrorText),f.charsRemainingAltLabel&&(a.liveChatPollOptionInput.charsRemainingAltLabel=f.charsRemainingAltLabel),f.removeOptionAltText&&(a.liveChatPollOptionInput.removeOptionAltText=f.removeOptionAltText),this.push("pollOptionsData",a),f=Array.from(Polymer.dom(this.$["poll-options"]).children),f.forEach(function(g,l){return g.set("data.id",l)}),f[f.length-1].$.input.focus())}, getPollOptionInputValues_:function(){var a=this,b=[],c=Polymer.dom(this.root).querySelectorAll("yt-live-chat-poll-editor-input"),d=this.get("data.pollEditorInfo.customOptionPlaceholderText")||[];Array.from(c).forEach(function(f,g){var l=null;(f=f.getLiveChatRichMessageInput())&&f.textSegments.length?l=cP(f):d[g]&&(l=a.formattedStringToLiveChatRichMessageInput_(d[g]));b.push(l)}); return b}, requestCreateAndStartPoll_:function(a){var b=this.getPollOptionInputValues_();if(!b.some(function(d){return!d})){b={optionText:b}; var c=Polymer.dom(this.$["poll-question"]).firstChild;c&&c.liveChatRichMessageInput&&(b.questionText=cP(c.liveChatRichMessageInput));this.sendServiceRequestAction([a,b])}}, selectedChanged:function(){if(this.selected){var a=Polymer.dom(this.$["start-button"]).firstElementChild;a&&a.$$("#button").focus()}}, handleTextInputChanged_:function(a){"poll-question-input"===a.target.id&&(this.pollQuestionCharacterCount=a.detail.characterCount);this.isValidPoll=this.getIsValidPoll_()}, handleStartButtonAction_:function(a){"yt-service-request"==a.detail.actionName&&(a.stopPropagation(),(a=a.detail.args[1])&&this.requestCreateAndStartPoll_(a))}, handleServiceRequestSent_:function(){this.createPollRequestInFlight=!0}, handleServiceRequestCompleted_:function(a){this.createPollRequestInFlight=!1;(a=a.detail&&a.detail.data)&&a.success&&this.fire("picker-cancelled")}, onCloseClick_:function(){this.fire("picker-cancelled")}, onAddOptionButtonClick_:function(){this.addPollOptionData_();this.isValidPoll=this.getIsValidPoll_()}, handlePollEditorInputClosed_:function(a){var b=this.pollOptionsData.findIndex(function(c){return c.liveChatPollOptionInput.id===a.detail.id}); this.splice("pollOptionsData",b,1);this.isValidPoll=this.getIsValidPoll_()}, onPickerCancelled:function(){this.reset_()}, reset_:function(){if(this.pollEditorInfoWithDefaults){for(;this.currentNumPollOptions>this.pollEditorInfoWithDefaults.minPollOptions;)this.pop("pollOptionsData");var a=Polymer.dom(this.$["poll-question"]).firstChild;a&&a.setLiveChatRichMessageInput(null);if(a=Polymer.dom(this.root).querySelectorAll("yt-live-chat-poll-editor-input")){a=k(Array.from(a));for(var b=a.next();!b.done;b=a.next())b.value.clearInput()}this.isValidPoll=this.getIsValidPoll_()}}, formattedStringToLiveChatRichMessageInput_:function(a){return a.simpleText?{text_segments:[a.simpleText]}:{text_segments:a.runs}}});var V_a;var W_a;Polymer({is:"yt-live-chat-product-button-renderer",_template:function(){if(void 0!==W_a)return W_a;var a=document.createElement("template");a.innerHTML="\n \n \n
\n \n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V_a){var d=document.createElement("template");d.innerHTML=""; V_a=d}d=V_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return W_a=a}, hostAttributes:{role:"menuitem",tabindex:-1},properties:{data:Object,iconId:{type:String,computed:"computeIconId_(data)",reflectToAttribute:!0},icon:{type:String,computed:"computeIcon_(data)",reflectToAttribute:!0},disabled:{type:Boolean,computed:"computeDisabled_(data.isDisabled)",reflectToAttribute:!0},command:{type:Object,computed:"computeCommand_(data.command, disabled)"}},behaviors:[dP.YtEndpointBehavior,W.YtRendererBehavior],computeIconId_:function(a){return a&&a.icon&&a.icon.iconType?a.icon.iconType.toLowerCase(): ""}, computeIcon_:function(a){return a&&a.icon&&a.icon.iconType?"yt-icons:"+a.icon.iconType.toLowerCase():""}, computeDisabled_:function(a){return!!a}, computeCommand_:function(a,b){return b?void 0:a}, onClick_:function(){this.data&&!this.disabled&&this.logExplicitClick(this.data)}});var X_a;var Y_a;Polymer({is:"yt-live-chat-product-picker-renderer",_template:function(){if(void 0!==Y_a)return Y_a;var a=document.createElement("template");a.innerHTML=" \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X_a){var d=document.createElement("template");d.innerHTML=""; X_a=d}d=X_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Y_a=a}, hostAttributes:{role:"menu",tabindex:0},properties:{data:Object,id:{type:String,computed:"computeId_(data)",reflectToAttribute:!0},selected:{type:Boolean,reflectToAttribute:!0}},observers:["observeSelected_(selected)"],behaviors:[NO.YtActionHandlerBehavior,W.YtRendererBehavior,Y],stampDom:{"data.buttons":{id:"buttons",mapping:{liveChatProductButtonRenderer:"yt-live-chat-product-button-renderer"}},"data.closeButton":{id:"close-button",mapping:{liveChatProductButtonRenderer:"yt-live-chat-product-button-renderer"}}}, actionMap:{"yt-live-chat-close-buy-flow":"onCloseBuyFlow_"},computeId_:function(a){return a.id||""}, onCloseClick_:function(){this.fire("picker-cancelled")}, observeSelected_:function(a){a&&this.focus();a=this.querySelectorAll("yt-live-chat-product-button-renderer");a.length&&a[0].focus()}, onCloseBuyFlow_:function(){this.fire("picker-cancelled")}});var Z_a;var $_a;Polymer({is:"yt-live-chat-text-actions-error-message-renderer",_template:function(){if(void 0!==$_a)return $_a;var a=document.createElement("template");a.innerHTML="\n \n\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z_a){var d=document.createElement("template");d.innerHTML=""; Z_a=d}d=Z_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return $_a=a}, properties:{data:Object},dismiss:function(){this.fire("yt-live-chat-error-message-dismiss")}, edit:function(){this.fire("yt-live-chat-error-message-edit",this.data.originalRichMessage)}});Polymer({COUNTDOWN_RADIUS_:10,is:"yt-live-chat-message-input-renderer",_template:function(){if(void 0!==P_a)return P_a;var a=document.createElement("template");a.innerHTML="
[[characterCount]]/[[maxCharacterLimit]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(O_a().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===M_a){var d=document.createElement("template");d.innerHTML=""; M_a=d}d=M_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return P_a=a}, properties:{data:{type:Object,observer:"dataChanged_"},characterCount:{type:Number,value:0,observer:"characterCountChanged_"},maxCharacterLimit:{type:Number,value:0},emojiManager:Object,participantsManager:Object,sendDisabled:{type:Number,computed:"computeSendDisabled_(characterCount, maxCharacterLimit, countdownActive)"},countdownRatio:{type:Number,value:0},countdownStrokeDashOffset:{type:Number,computed:"computeCountdownStrokeDashOffset_(countdownRatio)"},countdownActive:{type:Boolean,computed:"computeCountdownActive_(countdownRatio)"}, errorMessage:{type:Object,observer:"errorMessageChanged_"},hasInteractionMessage:{type:Boolean,computed:"toBool(data.interactionMessage)",reflectToAttribute:!0},genericErrorMessage:{type:Object}},behaviors:[W.YtRendererBehavior,V.YtActionSenderBehavior,UWa,Y],stampDom:{"data.sendButton":{id:"send-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.pickers":{id:"pickers",mapping:{emojiPickerRenderer:{component:"yt-emoji-picker-renderer",properties:{emojiManager:"[[emojiManager]]"}},liveChatProductPickerRenderer:{component:"yt-live-chat-product-picker-renderer"}, liveChatPollEditorPanelRenderer:{component:"yt-live-chat-poll-editor-panel-renderer",properties:{emojiManager:"[[emojiManager]]"}}}},"data.pickerButtons":{id:"picker-buttons",mapping:{liveChatIconToggleButtonRenderer:{component:"yt-live-chat-icon-toggle-button-renderer",properties:{disabled:"[[hasInteractionMessage]]"}},buttonRenderer:{component:"yt-button-renderer",params:{buttonTooltipPosition:"top",sendServiceEndpointWhenDisabled:!0}}}},"data.interactionMessage":{id:"interaction-message",mapping:{messageRenderer:{component:"yt-live-chat-message-renderer", params:{subtextOnBottom:!0}}}},errorMessage:{id:"error-message",mapping:{liveChatErrorMessageRenderer:"yt-live-chat-error-message-renderer",liveChatTextActionsErrorMessageRenderer:"yt-live-chat-text-actions-error-message-renderer"}}},listeners:{"yt-live-chat-send-message":"sendMessage","yt-live-chat-icon-toggle-button-renderer-toggle":"handlePickerButtonToggle_","yt-emoji-select":"onEmojiSelect_","yt-service-request-completed":"onSendCompleted_","yt-service-request-error":"onSendError_","yt-live-chat-error-message-dismiss":"onErrorMessageDismiss_", "yt-live-chat-error-message-edit":"onErrorMessageEdit_"},created:function(){this.lastTimeoutTimeMs_=this.timeoutMs_=this.timeoutDurationMs_=this.numSentMessages_=0;this.pendingMessageId_=""}, dataChanged_:function(){this.data.sendButton&&this.data.sendButton.buttonRenderer&&(this.data.sendButton.buttonRenderer.isDisabled=this.sendDisabled)}, sendMessage:function(){var a=this,b,c,d,f,g,l,m,n;return za(function(r){if(1==r.nextAddress){if(a.sendDisabled)return r.return();if(!a.data.sendButton||!a.data.sendButton.buttonRenderer)return r.jumpTo(0);a.$.input.completeEmojis();b=a.data.sendButton.buttonRenderer.serviceEndpoint;if(!b)return r.return();c=b.sendLiveChatMessageEndpoint.clientIdPrefix||"";d={client_message_id:c+String(a.numSentMessages_++),rich_message:cP(a.$.input.liveChatRichMessageInput)};f=YYa;g=A("LIVE_CHAT_SEND_MESSAGE_ACTION"); if(!f||!g)return r.jumpTo(3);var u;(u=window.grecaptcha)?u=u.execute(f.siteKey,{action:g,fast:N("live_chat_verify_recaptcha_token")}):(Um(Error("Could not find grecaptcha library when fetching a ReCAPTCHA token\n from RecaptchaService.")),u=void 0);l=u;return(m=N("live_chat_verify_recaptcha_token"))?q(r,l,5):r.jumpTo(3)}3!=r.nextAddress&&(n=r.yieldResult,d.recaptcha_token=n);a.pendingMessageId_=d.client_message_id;a.sendServiceRequestAction([b,d]);a.$.input.setLiveChatRichMessageInput(null); oa(r)})}, handleSendButtonAction_:function(a){"yt-service-request"==a.detail.actionName&&(a.stopPropagation(),this.sendMessage())}, onSendCompleted_:function(a,b){(a=b.data.timeoutDurationUsec)&&this.handleTimeout_(Number(a)/1E3);this.errorMessage=b.data.errorMessage;this.pendingMessageId_=""}, onSendError_:function(){this.pendingMessageId_&&this.sendAction("yt-dim-chat-item-action",[{dimChatItemAction:{clientAssignedId:this.pendingMessageId_}}]);this.pendingMessageId_="";this.genericErrorMessage&&(this.errorMessage={liveChatErrorMessageRenderer:{errorText:this.genericErrorMessage}})}, handlePickerButtonToggle_:function(a){a=a.detail.targetId;this.togglePicker_(a);"emoji"==a&&this.$.input.focus()}, onEmojiSelect_:function(a){this.$.input.focus();this.$.input.insertEmoji(a.detail)}, characterCountChanged_:function(a){if(this.maxCharacterLimit){a=a/this.maxCharacterLimit*100;var b=Polymer.dom(this.$.count);b.classList.toggle("early-warning",75<=a);b.classList.toggle("warning",90<=a);b.classList.toggle("error",100b);(b=this.$["send-button"])&&b.children.length&&(b.children[0].disabled=a);return a}, handleTimeout_:function(a){this.timeoutDurationMs_=this.timeoutMs_=a;this.countdownRatio=1;0==this.lastTimeoutTimeMs_&&window.requestAnimationFrame(this.updateTimeout_.bind(this))}, updateTimeout_:function(a){this.lastTimeoutTimeMs_&&(this.timeoutMs_=Math.max(0,this.timeoutMs_-(a-this.lastTimeoutTimeMs_)),this.countdownRatio=this.timeoutMs_/this.timeoutDurationMs_);this.isAttached&&this.timeoutMs_?(this.lastTimeoutTimeMs_=a,window.requestAnimationFrame(this.updateTimeout_.bind(this))):this.lastTimeoutTimeMs_=0}, onErrorMessageDismiss_:function(){this.errorMessage=void 0}, onErrorMessageEdit_:function(a){this.$.input.setLiveChatRichMessageInput(a.detail);this.$.input.focusAtEnd();this.errorMessage=void 0}, errorMessageChanged_:function(){this.async(function(){this.sendAction("yt-live-chat-maybe-scroll-to-bottom")})}, toBool:function(a){return!!a}});var a0a;var b0a;Polymer({is:"yt-live-chat-ninja-message-renderer",_template:function(){if(void 0!==b0a)return b0a;var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a0a){var d=document.createElement("template");d.innerHTML=""; a0a=d}d=a0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return b0a=a}, properties:{data:Object},behaviors:[Y],stampDom:{"data.button":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}}});var c0a;var d0a;var e0a;var f0a;Polymer({is:"yt-live-chat-participant-renderer",_template:function(){if(void 0!==f0a)return f0a;var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e0a){var d=document.createElement("template");d.innerHTML=""; e0a=d}d=e0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return f0a=a}, properties:{data:Object},behaviors:[W.YtRendererBehavior,Y]});Polymer({is:"yt-live-chat-participant-list-renderer",_template:function(){if(void 0!==d0a)return d0a;var a=document.createElement("template");a.innerHTML="
\n
\n [[getSimpleString(data.title)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c0a){var d=document.createElement("template");d.innerHTML=""; c0a=d}d=c0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return d0a=a}, properties:{data:Object,participantsManager:Object},behaviors:[Y,W.YtRendererBehavior],stampDom:{"data.backButton":{id:"back-button",mapping:{buttonRenderer:"yt-button-renderer"}},"participantsManager.participants":{id:"participants",mapping:{liveChatParticipantRenderer:"yt-live-chat-participant-renderer",liveChatTextMessageRenderer:"yt-live-chat-participant-renderer",liveChatLegacyPaidMessageRenderer:"yt-live-chat-participant-renderer",liveChatPaidMessageRenderer:"yt-live-chat-participant-renderer"}, reuseComponents:!0}},observers:["updateParticipantManagerListeners_(isAttached, participantsManager)"],monitorScroll:!0,created:function(){this.activeParticipantsManager_=null}, updateParticipantManagerListeners_:function(a,b){a?(this.activeParticipantsManager_&&(this.unlisten(this.activeParticipantsManager_,"participants-changed","onParticipantsChanged_"),this.activeParticipantsManager_=null),b&&(this.listen(b,"participants-changed","onParticipantsChanged_"),this.activeParticipantsManager_=b,this.onParticipantsChanged_())):this.activeParticipantsManager_&&(this.unlisten(this.activeParticipantsManager_,"participants-changed","onParticipantsChanged_"),this.activeParticipantsManager_= null)}, onParticipantsChanged_:function(){this.notifyPath("participantsManager.participants")}, onBackButtonClick_:function(){this.fire("yt-participants-back-button")}, focus:function(){this.invalidate(!0);this.async(function(){var a=kk(this);a&&a.focus()})}});var g0a;var h0a;Polymer({is:"yt-live-chat-pinned-message-renderer",_template:function(){if(void 0!==h0a)return h0a;var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g0a){var d=document.createElement("template");d.innerHTML=""; g0a=d}d=g0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return h0a=a}, behaviors:[Y],stampDom:{"data.renderer":{id:"message",mapping:{liveChatLegacyPaidMessageRenderer:{component:"yt-live-chat-legacy-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatMembershipItemRenderer:{component:"yt-live-chat-membership-item-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatPaidMessageRenderer:{component:"yt-live-chat-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatPaidStickerRenderer:{component:"yt-live-chat-paid-sticker-renderer",params:{authorPhotoSize:40}}},reuseComponents:!0}},properties:{data:{type:Object,value:null,observer:"dataChanged_"},emojiManager:Object},listeners:{"yt-service-request-completed":"onServiceRequestCompleted_"},dataChanged_:function(a){this.hidden=!a;if(a&&(a=a.renderer)){var b=Object.keys(a)[0];(a=a[b])&&a.authorPhoto&&(a.authorPhoto.webThumbnailDetailsExtensionData={isPreloaded:!0})}}, onFadeClick_:function(){this.fire("yt-live-chat-clear-pinned-message")}, onServiceRequestCompleted_:function(a,b){var c=this;b.actions&&b.actions.forEach(function(d){d.markChatItemAsDeletedAction&&c.fire("yt-live-chat-clear-pinned-message")})}});var i0a;var j0a;pP.YtLiveChatReplayBehaviorImpl_={properties:{playerProgressSec:{type:Number,readOnly:!0},data:{type:Object,observer:"handleParentDataChange_"},isSeeking:{type:Boolean,value:!1,readOnly:!0},playerState:{type:Number,readOnly:!0},isAdPlaying:{type:Boolean,value:!1,readOnly:!0}},observers:["observeReplayState_(isAdPlaying, isSeeking, playerState)"],behaviorActionMap_:{"yt-live-player-video-progress":"handlePlayerVideoProgress_","yt-live-player-ad-start":"handlePlayerAdStart_","yt-live-player-ad-end":"handlePlayerAdEnd_", "yt-live-player-state-change":"handlePlayerStateChange_","yt-live-chat-seek-success":"handleChatSeekSuccess_","yt-live-chat-seek-fail":"handleChatSeekFail_","yt-live-chat-reload-success":"handleReloadSuccess_","ytg-player-video-progress":"handleGamingPlayerVideoProgress_"},attached:function(){this.replayBuffer_=new $Ya;this.currentPlayerState_={};this.registerActionMap(this.behaviorActionMap_)}, detached:function(){this.unregisterActionMap(this.behaviorActionMap_);this.replayBuffer_=null}, addReplayChatItemAction:function(a){this.replayBuffer_&&this.replayBuffer_.addReplayChatItemAction(a)}, handlePlayerVideoProgress_:function(a){this.playerProgressChanged_(a)}, handleGamingPlayerVideoProgress_:function(a,b,c){this.playerProgressChanged_(a,b,c)}, handlePlayerAdStart_:function(){this._setIsAdPlaying(!0)}, handlePlayerAdEnd_:function(){this._setIsAdPlaying(!1)}, handlePlayerStateChange_:function(a){this._setPlayerState(a)}, observeReplayState_:function(a,b,c){this.data&&this.data.isReplay&&(a||b||2==c||3==c?this.sendOptionalAction("yt-live-chat-pause-replay"):1==c&&this.sendOptionalAction("yt-live-chat-resume-replay"))}, preprocessSeekResponseActions_:function(a){this.replayBuffer_.clear();a.forEach(function(b){b.replayChatItemAction&&(this.addReplayChatItemAction(b.replayChatItemAction),b.replayChatItemAction.actions&&this.preprocessActions_(b.replayChatItemAction.actions))},this)}, playerProgressChanged_:function(a,b,c){if((this.data.isReplay||c)&&!this.isAdPlaying){this.sendOptionalAction("yt-live-chat-replay-progress",[a]);this.currentPlayerState_={};b&&(this.currentPlayerState_.videoId=b);c&&(this.currentPlayerState_.watchPartyId=c);b=1E3*a;this.currentPlayerState_.playerOffsetMs=Math.floor(b).toString();c=this.$$("yt-live-chat-replay-continuation");var d=this.$$("yt-player-seek-continuation");this._setPlayerProgressSec(a);d&&d.maybeFireSeekContinuation(a,this.replayBuffer_.lastVideoOffsetTimeMsec)?( this._setIsSeeking(!0),this.replayBuffer_.clear(),Polymer.dom(this).setAttribute("loading","")):this.isSeeking_||(c&&this.replayBuffer_.lastVideoOffsetTimeMsec&&(c.timeRemainingMsecs=this.replayBuffer_.lastVideoOffsetTimeMsec-b),a=aZa(this.replayBuffer_,b),this.immediatelyApplyLiveChatActions(a))}}, handleChatSeekSuccess_:function(){this._setIsSeeking(!1);var a=aZa(this.replayBuffer_,1E3*this.playerProgressSec);this.immediatelyApplyLiveChatActions(a);Polymer.dom(this).removeAttribute("loading")}, handleChatSeekFail_:function(){this._setIsSeeking(!1);Polymer.dom(this).removeAttribute("loading")}, handleReloadSuccess_:function(){Polymer.dom(this).removeAttribute("loading")}, handleParentDataChange_:function(a,b){b&&b.isReplay&&this.replayBuffer_.clear()}}; pP.YtLiveChatReplayBehavior=[NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,pP.YtLiveChatReplayBehaviorImpl_];var k0a;var l0a;Polymer({is:"yt-live-chat-restricted-participation-renderer",_template:function(){if(void 0!==l0a)return l0a;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n
\n
[[getSimpleString(data.message)]]
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(O_a().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k0a){var d=document.createElement("template");d.innerHTML=""; k0a=d}d=k0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return l0a=a}, properties:{data:Object},behaviors:[UWa,W.YtRendererBehavior,Y],stampDom:{"data.buttons":{id:"picker-buttons",mapping:{buttonRenderer:"yt-button-renderer",liveChatIconToggleButtonRenderer:"yt-live-chat-icon-toggle-button-renderer"}},"data.inlineAfterMessageButton":{id:"message-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.panels":{id:"pickers",mapping:{liveChatProductPickerRenderer:"yt-live-chat-product-picker-renderer"}}},listeners:{"yt-live-chat-icon-toggle-button-renderer-toggle":"handleToggle_"}, handleToggle_:function(a){a.target.disabled||this.togglePicker_(a.detail.targetId)}});var m0a;var n0a;var o0a;var p0a;Polymer({is:"yt-live-chat-ticker-sponsor-item-renderer",_template:function(){if(void 0!==p0a)return p0a;var a=document.createElement("template");a.innerHTML="
\n
\n \n [[getSimpleString(data.detailText)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(SYa().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===o0a){var d=document.createElement("template");d.innerHTML=""; o0a=d}d=o0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return p0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},hidden:{type:Boolean,value:!1,computed:"truthy(isDeleted)",reflectToAttribute:!0}},behaviors:[W.YtRendererBehavior,UYa],dataChanged_:function(a){a&&(this.$.content.style.color=this.colorFromDecimal(a.detailTextColor),this.ariaLabel=this.getSimpleString(a.detailText),this.startCountdown(a.durationSec,a.fullDurationSec),this.async(this.setContainerWidth))}});Polymer({is:"yt-live-chat-ticker-renderer",_template:function(){if(void 0!==n0a)return n0a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===m0a){var d=document.createElement("template");d.innerHTML=""; m0a=d}d=m0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return n0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},highlightId:{type:String,value:null,observer:"highlightIdChanged_"},isScrolledLeft:{type:Boolean,value:!0},isScrolledRight:Boolean,items:{type:Array,value:function(){return[]}}, isReplayPaused:{type:Boolean,value:!1,readOnly:!0}},behaviors:[Y,W.YtRendererBehavior,NO.YtActionHandlerBehavior],stampDom:{items:{id:"items",mapping:{liveChatTickerPaidMessageItemRenderer:{component:"yt-live-chat-ticker-paid-message-item-renderer",properties:{shouldAnimateIn:"[[shouldAnimateIn]]",isAnimationPaused:"[[isReplayPaused]]"}},liveChatTickerPaidStickerItemRenderer:{component:"yt-live-chat-ticker-paid-sticker-item-renderer",properties:{shouldAnimateIn:"[[shouldAnimateIn]]",isAnimationPaused:"[[isReplayPaused]]"}}, liveChatTickerSponsorItemRenderer:{component:"yt-live-chat-ticker-sponsor-item-renderer",properties:{shouldAnimateIn:"[[shouldAnimateIn]]",isAnimationPaused:"[[isReplayPaused]]"}}},reuseComponents:!0}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-remove-chat-item-action":"handleLiveChatAction_","yt-mark-chat-item-as-deleted-action":"handleLiveChatAction_","yt-mark-chat-items-by-author-as-deleted-action":"handleLiveChatAction_","yt-live-chat-seek-success":"handleChatSeekSuccess_", "yt-live-chat-pause-replay":"handlePauseReplay_","yt-live-chat-resume-replay":"handleResumeReplay_"},listeners:{mouseenter:"onMouseEnter_",mouseleave:"onMouseLeave_","yt-live-chat-ticker-remove-ticker-item":"onRemoveTickerItem_","yt-navigate":"onNavigate_"},observers:["itemsChanged_(items.length)"],created:function(){this.asyncHandle_=null;this.shouldAnimateIn=!1;this.scrollClampRaf_=this.lastFrameTimestamp_=null;this.scrollStartTime_=this.scrollRatePixelsPerSecond_=0;this.scrollStopHandle_=null}, attached:function(){this.keepScrollClamped_()}, detached:function(){this.scrollClampRaf_&&window.cancelAnimationFrame(this.scrollClampRaf_);this.stopScrolling_();this.shouldAnimateIn=!1}, dataChanged_:function(){this.clearList()}, clearList:function(){window.cancelAnimationFrame(this.scrollClampRaf_||0);this.cancelAsync(this.scrollStopHandle_||0);window.cancelAnimationFrame(this.asyncHandle_||0);this.items=[];this.asyncHandle_=null;this.shouldAnimateIn=!1;this.scrollClampRaf_=this.lastFrameTimestamp_=null;this.scrollStartTime_=this.scrollRatePixelsPerSecond_=0;this.scrollStopHandle_=null}, handleLiveChatActions_:function(a){a.length&&(a.forEach(this.handleLiveChatAction_,this),this.updateHighlightedItem_(),this.shouldAnimateIn=!0)}, handleLiveChatAction_:function(a){a.addLiveChatTickerItemAction?this.unshift("items",a.addLiveChatTickerItemAction.item):a.markChatItemAsDeletedAction?this.handleMarkChatItemAsDeletedAction_(a.markChatItemAsDeletedAction):a.removeChatItemAction?this.removeTickerItemById_(a.removeChatItemAction.targetItemId):a.markChatItemsByAuthorAsDeletedAction&&this.handleMarkChatItemsByAuthorAsDeletedAction_(a.markChatItemsByAuthorAsDeletedAction)}, maybeClampScroll_:function(){if(this.highlightId){var a=this.$$("#"+this.highlightId),b=a.offsetLeft;a=b+a.offsetWidth;var c=this.$.items,d=c.scrollLeft;c=d+c.offsetWidth-24;b=d+24-b;0=this.$.items.scrollWidth-this.$.container.clientWidth}, handleChatSeekSuccess_:function(){this.clearList()}, handlePauseReplay_:function(){this._setIsReplayPaused(!0)}, handleResumeReplay_:function(){this._setIsReplayPaused(!1)}});var q0a;var r0a;Polymer({is:"yt-live-chat-upsell-dialog-renderer",_template:function(){if(void 0!==r0a)return r0a;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===q0a){var d=document.createElement("template");d.innerHTML=""; q0a=d}d=q0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return r0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},hasHeader:{type:Boolean,computed:"computeHasHeader_(data)"}},behaviors:[Y,W.YtRendererBehavior,fYa],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}}},dataChanged_:function(a){this.hidden=!a.isVisible;a.isVisible||this.impressionLog()}, onButtonClick_:function(){this.fire("yt-close-upsell-dialog")}, computeHasHeader_:function(a){return!!a.headerBackgroundImage}});var s0a;var t0a;var TP=function(){var a=O.apply(this,arguments)||this;a.selectedAmountIndex=1;return a}; p(TP,O);e=TP.prototype;e.onAmountTap=function(a){this.selectedAmountIndex=this.$.amounts.indexForElement(a.currentTarget)}; e.onCheckboxTap=function(){this.updateDonationPrivacyInEndpoint_()}; e.onCloseTap=function(){this.hasAttribute("live-chat")&&(this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow"),this.ytLiveChatErrorMessageBehavior.setErrorRenderer(null))}; e.onDonateButtonTap=function(){if(this.hasAttribute("live-chat")){var a=this.data.payFromLiveChat;a.ypcGetCartEndpoint&&this.ytActionSenderBehavior.sendAction("yt-live-chat-start-buy-flow",[a,{},this.donationCallback_.bind(this)])}else this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[this.is]),(a=ZM(this))&&a.getPlayerPromise().then(function(b){b.pauseVideo()}.bind(this))}; e.donationCallback_=function(a){a.success?(this.hasAttribute("live-chat")&&a.response&&a.response.data&&a.response.data.actions&&this.ytActionSenderBehavior.sendAction("yt-live-chat-open-popup",[a.response.data.actions[0]]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[this.is]),this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow")):a.errorMessageRenderer&&this.ytLiveChatErrorMessageBehavior.setErrorRenderer(a.errorMessageRenderer)}; e.selectedAmountIndexChanged_=function(){this.isCustomAmountSelected()&&this.$["custom-amount-input"].focus()}; e.computeButtonRenderers=function(){return this.data?this.data.suggestedAmounts.map(function(a){return{style:"STYLE_SUGGESTIVE",text:a.label}}):[]}; e.updateAmountInEndpoint_=function(){var a=this.getAmountMicros_();if(a){var b=this.hasAttribute("live-chat")?this.get("payFromLiveChat",this.data):this.get("donateButton.buttonRenderer.command",this.data);if(b.ypcGetCartEndpoint)b.ypcGetCartEndpoint.donationAmountMicros=a;else if(b.urlEndpoint){var c=new fq(b.urlEndpoint.url);Wq(c,"amount",a);b.urlEndpoint.url=c.toString()}}}; e.updateDonationPrivacyInEndpoint_=function(){var a=this.hasAttribute("live-chat")?this.get("payFromLiveChat.ypcGetCartEndpoint",this.data):this.get("donateButton.buttonRenderer.command.ypcGetCartEndpoint",this.data);a&&(a.productData={donationData:{isAnonymousDonation:!this.$["privacy-checkbox"].checked}})}; e.getAmountMicros_=function(){return this.getSelectedButtonAmount_()||1E6*Number(this.$["custom-amount-input"].value)}; e.getSelectedButtonAmount_=function(){return this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)}; e.isSelected_=function(a){return a===this.selectedAmountIndex}; e.isCustomAmountSelected=function(){return-1==this.selectedAmountIndex?!1:!this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)}; e.shouldHideCheckbox=function(a){return!a}; e.validateAmount=function(){var a=this.isAmountValid(this.customAmount),b=""===this.customAmount;this.isCustomAmountSelected()&&!a?this.disableButton_():-1===this.selectedAmountIndex?this.disableButton_():this.enableButton_();this.setInputError_(!a&&!b)}; e.isAmountValid=function(a){if(""===a)return!1;a=1E6*Number(a);var b=this.get("minAmountMicros",this.data),c=this.get("maxAmountMicros",this.data);return b&&ac?!1:!0}; e.setInputError_=function(a){a?this.$["custom-amount-input"].setAttribute("invalid",""):this.$["custom-amount-input"].removeAttribute("invalid")}; e.enableButton_=function(){this.set("data.donateButton.buttonRenderer.isDisabled",!1)}; e.disableButton_=function(){this.set("data.donateButton.buttonRenderer.isDisabled",!0)}; h.Object.defineProperties(TP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===t0a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
[[getSimpleString(data.pickerTitle)]]
\n \n \n \n
\n
\n
\n \n \n
\n
\n [[getSimpleString(data.campaignTitle)]]\n
\n
\n [[getSimpleString(data.campaignSubtitle)]]\n
\n
\n
\n
\n [[getSimpleString(data.campaignDescription)]]\n
\n
\n
\n
\n
\n
\n [[getSimpleString(data.campaignDescription)]]\n
\n
\n
\n
\n
\n
\n
\n
\n [[getSimpleString(data.nonprofitTitle)]]\n \n \n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n\n \n\n
\n\n
\n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s0a){var d=document.createElement("template");d.innerHTML=""; s0a=d}d=s0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t0a=a}a=t0a;return a}}}); var UP=TP;UP.prototype.validateAmount=UP.prototype.validateAmount;UP.prototype.updateDonationPrivacyInEndpoint_=UP.prototype.updateDonationPrivacyInEndpoint_;UP.prototype.updateAmountInEndpoint_=UP.prototype.updateAmountInEndpoint_;w([P(xO.YtLiveChatErrorMessageBehavior),x("design:type",Object)],UP.prototype,"ytLiveChatErrorMessageBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],UP.prototype,"ytActionSenderBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],UP.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],UP.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],UP.prototype,"data",void 0);w([R({observer:"selectedAmountIndexChanged_"}),x("design:type",Object)],UP.prototype,"selectedAmountIndex",void 0);w([R(),x("design:type",String)],UP.prototype,"customAmount",void 0); w([yE("data","selectedAmountIndex","customAmount"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],UP.prototype,"updateAmountInEndpoint_",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],UP.prototype,"updateDonationPrivacyInEndpoint_",null);w([yE("data","selectedAmountIndex","customAmount"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],UP.prototype,"validateAmount",null); UP=w([U({is:"ytd-donation-amount-picker-renderer"})],UP);var u0a;var v0a;var VP=function(){var a=O.apply(this,arguments)||this;a.alignAuto=!1;a.collapsed=!0;a.canCollapse=!0;a.collapsedHeight=80;a.disableExpand=!1;a.alwaysCollapsible=!1;a.reversed=!1;a.shouldUseNumberOfLines=!1;a.recomputeOnResize=!1;a.canCollapseJobId_=0;return a}; p(VP,O);e=VP.prototype;e.alwaysCollapsibleChanged=function(a){a&&(this.canCollapse=!0)}; e.reversedChanged_=function(a,b){if(a&&!b||b&&!a){a=Polymer.dom(this.root);b=a.childNodes;for(var c=document.createDocumentFragment(),d=a.childNodes.length-1;0<=d;d--)Polymer.dom(c).appendChild(b[d]);a.appendChild(c)}}; e.ready=function(){var a=this;this.async(function(){return a.initChildrenObserver_()},1)}; e.detached=function(){this.detachObserver_()}; e.toggle=function(a,b){this.canCollapse&&(this.collapsed=b,a&&a.stopPropagation())}; e.reset=function(){this.childrenChanged_()}; e.onIronResize=function(){this.recomputeOnResize&&this.childrenChanged_()}; e.computeIsMoreVisible_=function(a,b){return a&&b}; e.computeShouldUseNumberOfLines_=function(a){return!!a&&CSS.supports("-webkit-line-clamp","1")}; e.computeIsLessVisible_=function(a,b){return a&&!b}; e.observeCollapsedHeightAndMaxLines_=function(){var a=this.collapsedHeight,b=this.maxNumberOfLines;this.shouldUseNumberOfLines?this.updateStyles({"--ytd-expander-max-lines":""+b,"--ytd-expander-collapsed-height":""}):this.updateStyles({"--ytd-expander-collapsed-height":a+"px","--ytd-expander-max-lines":""})}; e.handleMoreTap_=function(a){this.disableExpand||(this.fire("yt-expander-more-tapped"),this.toggle(a,!1))}; e.handleLessTap_=function(a){this.fire("yt-expander-less-tapped");this.toggle(a,!0)}; e.initChildrenObserver_=function(){var a=this;this.observer_=new MutationObserver(function(){return a.childrenChanged_()}); this.observer_.observe(this.$.content,{subtree:!0,childList:!0,attributes:!0});this.childrenChanged_()}; e.childrenChanged_=function(){var a=this;this.alwaysCollapsible?this.canCollapse=this.alwaysCollapsible:this.canCollapseJobId_||(this.canCollapseJobId_=window.requestAnimationFrame(function(){Dk(function(){a.canCollapseJobId_=0;a.calculateCanCollapse_()})}))}; e.calculateCanCollapse_=function(){this.canCollapse=this.shouldUseNumberOfLines?this.alwaysCollapsible||this.$.content.offsetHeightthis.collapsedHeight}; e.detachObserver_=function(){this.observer_&&this.observer_.disconnect()}; h.Object.defineProperties(VP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v0a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u0a){var d=document.createElement("template");d.innerHTML=""; u0a=d}d=u0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v0a=a}a=v0a;return a}}}); var WP=VP;WP.prototype.observeCollapsedHeightAndMaxLines_=WP.prototype.observeCollapsedHeightAndMaxLines_;WP.prototype.onIronResize=WP.prototype.onIronResize;w([P(iI),x("design:type",Object)],WP.prototype,"ironResizableBehavior",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],WP.prototype,"alignAuto",void 0);w([R({notify:!0,reflectToAttribute:!0}),x("design:type",Object)],WP.prototype,"collapsed",void 0);w([R({notify:!0}),x("design:type",Object)],WP.prototype,"canCollapse",void 0); w([R(),x("design:type",Object)],WP.prototype,"collapsedHeight",void 0);w([R(),x("design:type",Object)],WP.prototype,"disableExpand",void 0);w([R({observer:"alwaysCollapsibleChanged"}),x("design:type",Object)],WP.prototype,"alwaysCollapsible",void 0);w([R({observer:"reversedChanged_"}),x("design:type",Object)],WP.prototype,"reversed",void 0);w([R(),x("design:type",Number)],WP.prototype,"maxNumberOfLines",void 0); w([R({reflectToAttribute:!0,computed:"computeShouldUseNumberOfLines_(maxNumberOfLines)"}),x("design:type",Object)],WP.prototype,"shouldUseNumberOfLines",void 0);w([R(),x("design:type",Object)],WP.prototype,"recomputeOnResize",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WP.prototype,"onIronResize",null); w([yE("maxNumberOfLines","collapsedHeight"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WP.prototype,"observeCollapsedHeightAndMaxLines_",null);WP=w([U({is:"ytd-expander"})],WP);var w0a={YtBooleanLogicBehavior:{bindIf:function(a,b,c){return a?b:c}, bindIfDefined:function(a,b){return void 0!==a?a:b}, booleanString:function(a){return(!!a).toString()}, equals:function(a){for(var b=arguments[0],c=1;cb}, isLessThan:function(a,b){return a=b-this.PARTICIPANT_TIME_USEC_&&this.addParticipant(c)}},this); this.checkForStaleParticipants_()}, trimOldParticipants_:function(){for(var a=1E3*Date.now(),b=this.participants.length-1;0<=b;b--){var c=this.participants[b];c=c[Object.keys(c)[0]];c.timestampUsec&&c.timestampUsec
\n \n \n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A0a){var d=document.createElement("template");d.innerHTML=""; A0a=d}d=A0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return B0a=a}, behaviors:[W.YtRendererBehavior,YP.YtEventForwardingBehavior,Y],properties:{data:Object,positionType:{type:String,reflectToAttribute:!0},hasButtons_:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeHasButtons_(data)"},boundOnTap_:{type:Function,value:function(){return this.onTap_.bind(this)}}}, observers:["observeImpressionEndpoints_(data.promoConfig.impressionEndpoints)"],stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnTap_]]"}}}},"data.acceptButton":{id:"accept-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnTap_]]"}}}}},computeHasButtons_:function(a){return!(!a.dismissButton&&!a.acceptButton)}, computeStyle_:function(a){return a||"BUBBLE_HINT_STYLE_UNKNOWN"}, observeImpressionEndpoints_:function(){var a=this;this.data&&this.data.promoConfig&&this.data.promoConfig.impressionEndpoints&&this.data.promoConfig.impressionEndpoints.forEach(function(b){b.clickTrackingParams&&delete b.clickTrackingParams;a.sendServiceRequestAction([b])})}, onTap_:function(){this.sendAction("yt-close-popup-action",["yt-tooltip-renderer"])}});var C0a=new xl("yt-live-chat"); Polymer({is:"yt-live-chat-renderer",_template:function(){if(void 0!==j0a)return j0a;var a=document.createElement("template");a.innerHTML="
\n\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cZa){var d=document.createElement("template");d.innerHTML=""; cZa=d}d=cZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===i0a&&(d=document.createElement("template"),d.innerHTML="", i0a=d);d=i0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return j0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},hideTimestamps:{type:Boolean,value:function(){return!C0a.get("show-timestamps")}, observer:"hideTimestampsChanged_",reflectToAttribute:!0},hasTicker:{type:Boolean,computed:"toBool(data.ticker)",reflectToAttribute:!0},emojiManager:{type:Object,value:function(){return new QO(fk("live_chat_unicode_emoji_json_url"))}}, participantsManager:{type:Object,value:function(){return document.createElement("yt-live-chat-participants-manager")}}, selectedTab:{type:Number,value:0,notify:!0},messageBuyFlowRenderer:Object,stickerBuyFlowRenderer:Object,donationFlowRenderer:Object,actionPanelRenderer:Object,hasActionPanelRenderer:{type:Boolean,computed:"toBool(actionPanelRenderer)",reflectToAttribute:!0},isClosingActionPanel:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"isClosingActionPanelChanged"},selectedPanel:{type:Number,value:0,observer:"selectedPanelChanged_"},hasPickerOpen:{type:Boolean,value:!1,reflectToAttribute:!0},dialog:Object, hidden:{type:Boolean,reflectToAttribute:!0,computed:"computeIsChatHidden_(data)"}},behaviors:[WZa,pP.YtLiveChatReplayBehavior,w0a.YtBooleanLogicBehavior,Y,{getScrollbarWidth:function(){null==x0a&&(x0a=this.calculateScrollbarWidth_());return x0a}, calculateScrollbarWidth_:function(){var a=document.createElement("div");a.style.height="100px";a.style.overflow="scroll";a.style.top="-9999px";a.style.width="100px";Polymer.dom(this.root).appendChild(a);var b=a.offsetWidth-a.clientWidth;Polymer.dom(this.root).removeChild(a);return b}}, NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,UZa,W.YtRendererBehavior,z0a],listeners:{"yt-participants-back-button":"onParticipantsBackButton_","yt-live-chat-pinned-message-update":"onUpdatePinnedMessage_","yt-navigate":"onYtNavigate_","yt-action":"onYtAction_","yt-close-upsell-dialog":"onYtCloseUpsellDialog_","yt-load-reload-continuation":"onReloadContinuation_","yt-live-chat-continuation-behavior-reload-success":"onReloadContinuationConclusion_","yt-live-chat-continuation-behavior-reload-failure":"onReloadContinuationConclusion_", "yt-live-chat-add-tooltip-target":"registerElementForSupportingTooltips_","yt-live-chat-clear-pinned-message":"clearPinnedMessage_","yt-live-chat-attach-visual-element":"attachVisualElement_"},observers:["actionsChanged_(data.actions, isAttached)"],queuedTooltips_:[],queuedActionPanel_:null,stampDom:{"data.itemList":{id:"item-list",mapping:{liveChatItemListRenderer:{component:"yt-live-chat-item-list-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}}}}, "data.ticker":{id:"ticker",mapping:{liveChatTickerRenderer:"yt-live-chat-ticker-renderer"}},"data.promotion":{id:"overlay-dialog",mapping:{upsellDialogRenderer:"yt-live-chat-upsell-dialog-renderer"}},"data.actionPanel":{id:"input-panel",mapping:{liveChatMessageInputRenderer:{component:"yt-live-chat-message-input-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]",genericErrorMessage:"[[data.clientMessages.genericError]]"}},liveChatRestrictedParticipationRenderer:"yt-live-chat-restricted-participation-renderer"}}, messageBuyFlowRenderer:{id:"buy-flow",mapping:{liveChatMessageBuyFlowRenderer:{component:"yt-live-chat-message-buy-flow-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}}}},stickerBuyFlowRenderer:{id:"super-sticker-buy-flow",mapping:{superStickerBuyFlowRenderer:"yt-live-chat-paid-sticker-panel-renderer"}},donationFlowRenderer:{id:"donation-flow",mapping:{donationAmountPickerRenderer:{component:"ytd-donation-amount-picker-renderer",attributes:{"live-chat":!0}}}}, dialog:{id:"dialog",mapping:{liveChatDialogRenderer:"yt-live-chat-dialog-renderer"}},actionPanelRenderer:{id:"action-panel",mapping:{liveChatActionPanelRenderer:"yt-live-chat-action-panel-renderer"},reuseComponents:!1}},actionMap:{"yt-live-chat-close-buy-flow":"closeBuyFlow_","yt-live-chat-actions":"handleLiveChatActions_","yt-show-live-chat-dialog-action":"handleShowLiveChatDialogAction_","yt-close-live-chat-action-panel-action":"handleCloseLiveChatActionPanelAction_","yt-live-chat-popup-config-ready":"onPopupConfigReady_", "yt-live-chat-picker-changed":"handlePickerChanged_"},created:function(){this.popoutWindowCheckIntervalId_=this.popoutWindow_=null;this.supportedTooltipTargets_=[];this.delayCloseActionPanelTimerId_=this.closeActionPanelTimerId_=null;this.tooltipTimerIds_=new Set}, ready:function(){Polymer.dom(this.root).appendChild(this.participantsManager);this.sharedTooltipAnimationDelay=0;this.sharedTooltipPosition="top"}, attached:function(){this.fire("resize");N("enable_native_live_chat_on_kevlar")&&(this.isPopupConfigReady=!0);this.async(function(){this.updateStyles({"--scrollbar-width":this.getScrollbarWidth()+"px"})})}, detached:function(){this.popoutWindow_=null;this.closePopoutWindow_();this.replayBuffer_=null;clearTimeout(this.closeActionPanelTimerId_);clearTimeout(this.delayCloseActionPanelTimerId_);for(var a=k(this.tooltipTimerIds_),b=a.next();!b.done;b=a.next())clearTimeout(b.value)}, dataChanged_:function(a){this.emojiManager&&a&&a.emojis&&this.emojiManager.load(a.emojis,this.emojiManager);if(this.participantsManager&&a&&(a.viewerName&&(this.participantsManager.viewerName=a.viewerName),a=this.get("participantsList.liveChatParticipantsListRenderer.participants",a)))for(var b=0;b .iron-selected");(a=a&&a.children[0])&&a.focus();this.async(function(){this.sendAction("yt-live-chat-scroll-to-bottom")})}}, hideTimestampsChanged_:function(a){C0a.set("show-timestamps",!a);this.updateStyles()}, isClosingActionPanelChanged:function(){!this.isClosingActionPanel&&this.queuedActionPanel_&&(this.set("actionPanelRenderer",this.queuedActionPanel_),this.queuedActionPanel_=null)}, computeIsChatHidden_:function(a){return a&&a.initialDisplayState?"LIVE_CHAT_DISPLAY_STATE_HIDDEN"==a.initialDisplayState:this.hidden}, handleLiveChatActions_:function(a){a.forEach(function(b){b.replayChatItemAction&&this.handleLiveChatActions_(b.replayChatItemAction.actions||[]);b.replaceLiveChatRendererAction?this.handleReplaceRendererAction_(b.replaceLiveChatRendererAction):b.showLiveChatDialogAction?this.handleShowLiveChatDialogAction_(b):b.showLiveChatSurveyCommand?this.handleShowLiveChatSurveyCommand_(b.showLiveChatSurveyCommand):b.showLiveChatTooltipCommand?this.handleShowLiveChatTooltipCommand_(b):b.showLiveChatActionPanelAction? this.handleShowLiveChatActionPanelAction_(b.showLiveChatActionPanelAction):b.closeLiveChatActionPanelAction&&this.handleCloseLiveChatActionPanelAction_(b)},this)}, handleShowLiveChatActionPanelAction_:function(a){a.panelToShow&&(this.isClosingActionPanel?this.queuedActionPanel_=a.panelToShow:this.set("actionPanelRenderer",a.panelToShow))}, handleCloseLiveChatActionPanelAction_:function(a,b){var c=this;b=void 0===b?!1:b;var d=this.get("liveChatActionPanelRenderer.id",this.actionPanelRenderer),f=this.get("closeLiveChatActionPanelAction.targetPanelId",a),g=this.get("closeLiveChatActionPanelAction.delayMs",a);d===f?0
\n\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D0a){var d=document.createElement("template");d.innerHTML=""; D0a=d}d=D0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);E0a=a}a=E0a;return a}}}); var $P=ZP;w([P(W.YtRendererBehavior),x("design:type",Object)],$P.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],$P.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],$P.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],$P.prototype,"shelf",void 0);w([R({reflectToAttribute:!0,computed:"computeMessageStyle(data.style.value)"}),x("design:type",Boolean)],$P.prototype,"componentStyle",void 0); $P=w([U({is:"ytd-message-renderer"})],$P);var F0a;var G0a;var H0a={};H0a.YtToggleButtonBehavior=[NO.YtActionHandlerBehavior,PXa,{_noAccessors:!0,properties:{data:Object},observers:["stateChanged_(data)","stateChanged_(data.isToggled)","stateChanged_(data.defaultText)","stateChanged_(data.toggledText)","stateChanged_(forceIconOnly)"],created:function(){this.toggleButtonActionMap_={"yt-update-toggle-button-text-action":"handleUpdateToggleButtonTextAction_","yt-update-toggle-button-state-command":"handleUpdateToggleButtonStateCommand_"}}, attached:function(){this.registerActionMap(this.toggleButtonActionMap_)}, detached:function(){this.unregisterActionMap(this.toggleButtonActionMap_)}, onYtToggleButtonTapHandler:function(){}, onYtButtonTapHandler:function(){if(!this.isModal_()){var a=this.data.isToggled;if(!this.data.preventAutoToggle){this.toggle();var b={toggled:this.data.isToggled,actions:{}};b.actions[this.buttonIcon]=this.data.isToggled;this.fire("yt-toggle-button",b)}b=this.data.defaultServiceEndpoint||null;var c=this.data.toggledServiceEndpoint||null;if(b&&c||b&&this.data.preventAutoToggle)a=a?c:b,this.sendServiceRequestAction([a]),this.fire("yt-execute-service-endpoint",{serviceEndpoint:a})}}, stateChanged_:function(){var a=this.data;if(a){var b=a.isToggled;this._setEndpoint(this.computeEndpoint_(a));this._setServiceEndpoint(this.computeServiceEndpoint_(a));this._setButtonIcon(this.computeButtonIcon_(a,b));this._setButtonText(this.computeButtonText_(a,b));this._setButtonAccessibility(this.computeAccessibility_(a,b));this._setButtonTooltip(this.computeTooltip_(a,b));this._setButtonClass(this.computeButtonClass_(a,b));this._setIconPositionType(this.computeIconPositionType_(a));this.updateRenderedElements(); this.elements_.button&&("yt-icon-button"===this.elements_.button.is?(this.elements_.button.toggleable=!0,this.elements_.button.pressed=b):this.elements_.button.setAttribute("aria-pressed",b))}}, toggle:function(a){this.set("data.isToggled",void 0!==a?a:!this.data.isToggled)}, isModal_:function(){return!!this.endpoint&&(!!this.endpoint.modalEndpoint||!!this.endpoint.shareEndpoint||!!this.endpoint.shareEntityEndpoint)}, computeEndpoint_:function(a){return a&&a.defaultNavigationEndpoint||null}, computeButtonIcon_:function(a,b){var c=a&&a.defaultIcon?a.defaultIcon.iconType.toLowerCase():null;a=a&&a.toggledIcon?a.toggledIcon.iconType.toLowerCase():c;return b?a:c}, handleUpdateToggleButtonStateCommand_:function(a){a=a.updateToggleButtonStateCommand;this.get("toggleButtonSupportedData.toggleButtonIdData.id",this.data)==a.buttonId&&this.toggle(a.toggled)}, computeButtonText_:function(a,b){return a?b&&a.toggledText||a.defaultText||null:null}, computeAccessibility_:function(a,b){return a?(b?this.get("toggledAccessibilityData.accessibilityData",a):this.get("accessibilityData.accessibilityData",a))||a.accessibility||null:null}, computeTooltip_:function(a,b){return a?b&&a.toggledTooltip||a.defaultTooltip||null:null}, computeButtonClass_:function(a,b){if(!a)return"";var c="",d=a.toggledStyle||a.style;if(b=b?d:a.style)b.styleType&&(b=b.styleType),c+=b.toLowerCase().replace(/_/g,"-")+" ";if(a=a.size)a.sizeType&&(a=a.sizeType),c+=a.toLowerCase().replace(/_/g,"-")+" ";return c.trim()}, computeIconPositionType_:function(a){return a&&a.iconPosition||null}, computeServiceEndpoint_:function(a){var b=a&&a.serviceEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:c&&a.command?a.command:null}, handleUpdateToggleButtonTextAction_:function(a){a=a.updateToggleButtonTextAction;this.get("toggleButtonSupportedData.toggleButtonIdData.id",this.data)==a.buttonId&&(this.set("data.defaultText",a.defaultText),this.set("data.toggledText",a.toggledText))}}];iP("sharingToggleButtonAndDefaultButton","toggleButtonRenderer",{component:"ytd-toggle-button-renderer",params:{noink:!0}});var aQ=function(){return O.apply(this,arguments)||this}; p(aQ,O);aQ.prototype.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; aQ.prototype.onYtButtonTapHandler=function(){if(!this.ytToggleButtonBehavior.isModal_()){var a=this.data.isToggled;if(!this.data.preventAutoToggle){this.ytToggleButtonBehavior.toggle();var b={toggled:this.data.isToggled,actions:{}};b.actions[this.ytToggleButtonBehavior.buttonIcon]=this.data.isToggled;this.fire("yt-toggle-button",b)}if(a=a?this.data.toggledServiceEndpoint:this.data.defaultServiceEndpoint){b=this.get("commandMetadata.webCommandMetadata.apiUrl",a);var c=this.get("commandMetadata.webCommandMetadata.sendPost", a);b&&c?this.ytActionSenderBehavior.sendServiceRequestAction([a]):this.ytActionSenderBehavior.sendInnerTubeActions([a],this)}}}; aQ.prototype.onYtNavigate=function(a){var b=this.ytdOpenPopupBehavior.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.ytdOpenPopupBehavior.openPopup(b))}; h.Object.defineProperties(aQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===G0a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F0a){var d=document.createElement("template");d.innerHTML=""; F0a=d}d=F0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);G0a=a}a=G0a;return a}}}); var bQ=aQ;bQ.prototype.onYtNavigate=bQ.prototype.onYtNavigate;w([P(V.YtActionSenderBehavior),x("design:type",Object)],bQ.prototype,"ytActionSenderBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],bQ.prototype,"ytdOpenPopupBehavior",void 0);w([P(H0a.YtToggleButtonBehavior),x("design:type",Object)],bQ.prototype,"ytToggleButtonBehavior",void 0);w([R(),x("design:type",Object)],bQ.prototype,"data",void 0);w([R({value:!0}),x("design:type",Boolean)],bQ.prototype,"showTooltips",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],bQ.prototype,"onYtNavigate",null);bQ=w([U({is:"ytd-toggle-button-renderer"})],bQ);var cQ={created:function(){this.playerListeners_=new Map}, getPlayerListenerKey_:function(a,b){return a+":"+Ra(b)}, getPlayerListener_:function(a,b,c){a=this.getPlayerListenerKey_(a,b);b=this.playerListeners_.get(a);c&&this.playerListeners_.delete(a);return b}, savePlayerListener_:function(a,b){var c=b.bind(this);this.playerListeners_.set(this.getPlayerListenerKey_(a,b),c);return c}, listenToPlayerEvent:function(a,b,c){c=this.savePlayerListener_(b,c);a.addEventListener(b,c)}, listenToPlayerEvents:function(a,b){b.forEach(function(c,d){this.listenToPlayerEvent(a,d,c)}.bind(this))}, unlistenFromPlayerEvent:function(a,b,c){c=this.getPlayerListener_(b,c,!0);a.removeEventListener(b,c)}, unlistenFromPlayerEvents:function(a,b){b.forEach(function(c,d){this.unlistenFromPlayerEvent(a,d,c)}.bind(this))}},I0a=function(){};var J0a;Polymer({is:"yt-payments-manager",_template:function(){if(void 0!==J0a)return J0a;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);return J0a=a}, behaviors:[NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,AO.YtComponentBehavior],actionMap:{"yt-live-chat-start-buy-flow":"handleLiveChatBuyFlow_"},handleLiveChatBuyFlow_:function(a,b,c){var d=mM();d&&yM(d,a)?nM(mM(),a,b).then(function(f){return{data:f}}).then(this.handleGetCartResponse_.bind(this,c),this.handleFlowError_.bind(this,c),this):this.getInterface(UM).requestDataForServiceEndpoint(a,b).then(this.handleGetCartResponse_.bind(this,c),this.handleFlowError_.bind(this,c),this)}, handleGetCartResponse_:function(a,b){if(b.data&&b.data.messageRenderer)this.handleFlowError_(a,b);else{var c=function(d){d.buyFlowResponse?this.handleBuyFlowResponse_(a,b,d.buyFlowResponse):d.error?this.handleFlowError_(a,d.error):this.handleFlowClosed_(a)}.bind(this); this.sendAction("yt-open-payments-dialog",[b,c])}}, handleBuyFlowResponse_:function(a,b,c){var d=this;this.sendAction("yt-wallet-dialog-completed");if(c.data&&c.data.messageRenderer)this.handleFlowError_(a,c);else if("undefined"==c.integratorData)Um(new Pl("Buy flow returned 'undefined' in place of integratorData",c.internalErrorDetails)),this.handleFlowError_(a,{});else if(null!=c.error)vm(new Pl("Buy flow returned error code",c.error,c.internalErrorDetails)),this.handleFlowError_(a,{});else{c={payments_payload:btoa(c.integratorData),buybucket_params:b.data.buybucketParams}; var f=mM(),g=b.data.completeTransactionEndpoint;(f&&yM(f,g)?nM(mM(),g,c).then(function(l){return{data:l}}):this.getInterface(UM).requestDataForServiceEndpoint(g,c)).then(function(l){d.handleCompleteTransactionSuccess_(a,g,l)},function(l){d.handleCompleteTransactionError_(a,g,l)})}}, handleFlowClosed_:function(){this.sendAction("yt-wallet-dialog-closed")}, handleFlowError_:function(a,b){var c={success:!1},d=function(f){return{liveChatErrorMessageRenderer:{errorText:{runs:[{text:f}]}}}}; b&&b.data&&b.data.messageRenderer?c.errorMessageRenderer=b.data.messageRenderer:b&&b.error&&b.error.message?c.errorMessageRenderer=d(b.error.message):b&&b.result&&b.result.error&&b.result.error.message&&(c.errorMessageRenderer=d(b.result.error.message));a(c)}, handleCompleteTransactionSuccess_:function(a,b,c){c.data||(c={data:c});var d=void 0;b&&b.ypcCompleteTransactionEndpoint&&(d=b.ypcCompleteTransactionEndpoint.serializedTransactionFlowLoggingParams);c.data.messageRenderer?(nO("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",d),this.handleFlowError_(a,c)):(PVa(d),a({success:!0,response:c}))}, handleCompleteTransactionError_:function(a,b,c){var d=void 0;b&&b.ypcCompleteTransactionEndpoint&&(d=b.ypcCompleteTransactionEndpoint.serializedTransactionFlowLoggingParams);nO("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",d);this.handleFlowError_(a,c)}});Polymer({is:"yt-native-buyflow-launcher",behaviors:[NO.YtActionHandlerBehavior],actionMap:{"yt-open-payments-dialog":"onStartWalletBuyFlow_"},onStartWalletBuyFlow_:function(a,b){TVa(pO.getInstance(),a.data.encryptedPurchaseParams.replace(/-/g,"+").replace(/_/g,"/"),this.onDialogSuccess_.bind(this,b),void 0,this.onDialogError_.bind(this,b),void 0,void 0,this.onDialogClose_.bind(this,b),a.data.serializedTransactionFlowLoggingParams,a.data.serializedPaymentsClientParams)}, onDialogSuccess_:function(a,b){a({success:!0,buyFlowResponse:b})}, onDialogClose_:function(a){a({success:!1,closed:!0})}, onDialogError_:function(a,b){a({success:!1,error:b})}});Polymer({is:"yt-live-chat-kevlar-container",_template:function(){if(void 0!==L_a)return L_a;var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K_a){var d=document.createElement("template");d.innerHTML=""; K_a=d}d=K_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return L_a=a}, properties:{data:{type:Object,observer:"dataChanged_"},computedData:{type:Object,computed:"computeChatData_(data, chatCollapsed)"},isChatHiddenByUser:{type:Boolean},chatCollapsed:{type:Boolean,value:!1,computed:"isChatCollapsed_(data, isChatHiddenByUser)",reflectToAttribute:!0}},stampDom:{computedData:{id:"chat",mapping:{liveChatRenderer:"yt-live-chat-renderer"}},"computedData.liveChatRenderer.showHideButton":{id:"show-hide-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}}},behaviors:[NO.YtActionHandlerBehavior, V.YtActionSenderBehavior,AO.YtComponentBehavior,aP.YtOpenPopupBehavior,Y,dP.YtEndpointBehavior,cQ],listeners:{"yt-navigate":"onYtNavigate_","yt-toggle-button":"onYtToggleButton_"},actionMap:{"yt-live-chat-open-popup":"onOpenPopup_"},created:function(){this.playerEvents_=new pj;this.playerEvents_.set("onAdStart",this.onAdStart_);this.playerEvents_.set("onAdEnd",this.onAdEnd_);this.playerEvents_.set("onStateChange",this.onPlayerStateChange_);this.playerEvents_.set("onVideoProgress",this.onVideoProgressChange_); this.player=null}, ready:function(){N("kevlar_watch_color_update")&&document.documentElement.setAttribute("watch-color-update","")}, attached:function(){this.isChatReplay(this.data)&&this.setupPlayerEvents_();N("load_recaptcha_v3_binary_on_kevlar")&&Un.getInstance().parkOrScheduleJob(function(){ZYa()},2,"eocs",16)}, detached:function(){this.disconnectFromPlayer()}, dataChanged_:function(a){this.isChatReplay(a)?this.setupPlayerEvents_():this.disconnectFromPlayer();if(a.liveChatRenderer&&a.liveChatRenderer.showHideButton&&a.liveChatRenderer.showHideButton.toggleButtonRenderer&&"boolean"===typeof this.isChatHiddenByUser){var b=a.liveChatRenderer.showHideButton.toggleButtonRenderer;if(this.isChatHiddenByUser&&!this.isChatsInitialStateCollapsed_(a)||!this.isChatHiddenByUser&&this.isChatsInitialStateCollapsed_(a))b.isToggled=!b.isToggled}else this.isChatHiddenByUser= void 0}, isChatsInitialStateCollapsed_:function(a){return"LIVE_CHAT_DISPLAY_STATE_COLLAPSED"===a.liveChatRenderer.initialDisplayState}, setupPlayerEvents_:function(){var a=this,b;return za(function(c){if(a.isListeningForPlayerProgress)return c.jumpTo(0);b=aN(a);a.isListeningForPlayerProgress=!0;return q(c,b.getPlayerPromise().then(a.onPlayerApiReady.bind(a)),0)})}, setPlayer:function(a){this.player&&this.unlistenFromPlayerEvents(this.player,this.playerEvents_);(this.player=a)&&this.listenToPlayerEvents(this.player,this.playerEvents_)}, onPlayerApiReady:function(a){this.setPlayer(a)}, disconnectFromPlayer:function(){this.setPlayer(null);this.isListeningForPlayerProgress=!1}, onAdStart_:function(){this.sendOptionalAction("yt-live-player-ad-start")}, onAdEnd_:function(){this.sendOptionalAction("yt-live-player-ad-end")}, onPlayerStateChange_:function(a){this.sendOptionalAction("yt-live-player-state-change",[a])}, onVideoProgressChange_:function(a){this.sendOptionalAction("yt-live-player-video-progress",[a])}, computeChatData_:function(a,b){return a&&a.liveChatRenderer&&b?{liveChatRenderer:{showHideButton:a.liveChatRenderer.showHideButton,initialDisplayState:a.liveChatRenderer.initialDisplayState}}:a}, isChatCollapsed_:function(a,b){return void 0!==b?b:a?a.conversationBarRenderer&&a.conversationBarRenderer.availabilityMessage?!0:a.liveChatRenderer?this.isChatsInitialStateCollapsed_(a):!1:!1}, isChatReplay:function(a){return!!(a&&a.liveChatRenderer&&a.liveChatRenderer.isReplay)}, onYtToggleButton_:function(){this.isChatHiddenByUser=!this.chatCollapsed}, onOpenPopup_:function(a){this.openPopup(a)}, onYtNavigate_:function(a,b){b.endpoint.ypcGetOffersEndpoint&&N("enable_native_live_chat_on_kevlar")&&(a.stopPropagation(),this.sendServiceRequestAction([b.endpoint]))}});var K0a=function(){return wE.apply(this,arguments)||this}; p(K0a,wE); var dQ=function(a,b,c){if(null!=b&&(L0a(b.viewableCommands)||L0a(b.endOfSessionCommands))){a.classList.add("GoogleActiveViewElement");a.setAttribute("id","YtKevlarVisibilityIdentifier");a.setAttribute("googleAvRs",c);var d="data-"+Kc("googleAvCxn");c="data-"+Kc("googleEOSAvCxn");d=b.viewableCommands&&M0a(a,b.viewableCommands,d);b=b.endOfSessionCommands&&M0a(a,b.endOfSessionCommands,c);if(d||b)zw.getInstance(),b=Tv(Vv,a),c=kw(lw,Rf,!1),c.r="ac",b&&(lw.dbg.adBlocksRegistered=Rf.__google_lidar_,b.activeviewPingSent|| Zsa([b],c,void 0),$sa([b],c),Dsa(b)),mta(zw.getInstance(),a)}},L0a=function(a){return!!a&&0a.getBoundingClientRect().top,hQ(this)}; e.onYtAutonavPauseUserEngagement_=function(a){var b=this;N("user_engagement_enable_autoplay_pause_feature")?isNaN(a.lowEngagementThresholdMs)||0>=a.lowEngagementThresholdMs||"LOW_USER_ENGAGEMENT_ACTION_PAUSE_AUTOPLAY"!==a.lowUserEngagementAction?$J("YOU_THERE_EVENT_TYPE_F_AUTONAV_INVALID_LACT_THRESHOLD"):this.ytComponentBehavior.getInterface(fQ).getTimeSinceActive()b;P0a(this);hQ(this)}; e.onYtUserActivity_=function(){var a=this;this.autonavPauseReasons_.userEngagement&&(xk(Bk,function(){$J("YOU_THERE_EVENT_TYPE_F_AUTONAV_PAUSE_DISABLED_BY_LACT_RESET",a.userEngagementCsn_)}),this.autonavPauseReasons_.userEngagement=!1,hQ(this)); this.autonavPauseReasons_.youthereLactExperiment&&(xk(Bk,function(){$J("YOU_THERE_EVENT_TYPE_AUTOPLAY_RESUMED",a.userEngagementCsn_);cl()}),this.autonavPauseReasons_.youthereLactExperiment=!1,hQ(this)); this.autonavPauseReasons_.longIdle&&!N("disable_kevlar_resume_autonav_after_user_activity")&&(this.autonavPauseReasons_.longIdle=!1,hQ(this))}; e.isInBackground_=function(){var a=window.document.visibilityState;return!(!a||"visible"===a)}; var hQ=function(a){for(var b=!1,c=k(Object.values(a.autonavPauseReasons_)),d=c.next();!d.done;d=c.next())d=d.value,b=b||d;b?LL.getInstance().pause(a.autonavPauseReasons_):LL.getInstance().unpause()},P0a=function(a){var b=!1; if(N("enable_autoplay_pause_by_lact")){b=a.ytComponentBehavior.getInterface(fQ);var c=1E3*ek("autoplay_pause_by_lact_sec"),d=ek("autoplay_pause_by_lact_sampling_fraction");(b=b.getTimeSinceActive()>=c&&Math.random()b&&(this.scrollTarget.scrollTop+=Math.ceil(a/b),this.autoScrollAnimationStart_=0),this.autoScrollPaused_=!1,this.autoScrollRafId_=window.requestAnimationFrame(this.boundAutoScrollHandler_))}; e.endAutoScroll_=function(){this.autoScrollPaused_=!0;window.cancelAnimationFrame(this.autoScrollRafId_)}; var jQ=R0a;jQ.prototype.observeAutoScrollEnabled_=jQ.prototype.observeAutoScrollEnabled_;w([R(),x("design:type",Object)],jQ.prototype,"scrollRate",void 0);w([R(),x("design:type",Object)],jQ.prototype,"scrollTarget",void 0);w([R(),x("design:type",Boolean)],jQ.prototype,"autoScrollEnabled",void 0);w([yE("autoScrollEnabled"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],jQ.prototype,"observeAutoScrollEnabled_",null);jQ=w([xE()],jQ);var S0a=[jQ.prototype];var kQ={}; kQ.YtdDismissableItemBehavior=[V.YtActionSenderBehavior,FP.YtdOpenPopupBehavior,{_noAccessors:!0,properties:{isDismissed:{type:Boolean,reflectToAttribute:!0,observer:"dismissableItemIsDismissedChanged_"},dismissedRenderer:Object},listeners:{"yt-service-request-sent":"dismissableItemOnYtServiceRequestSent_","yt-service-request-completed":"dismissableItemOnYtServiceRequestCompleted_"},observers:["dismissableItemDataChanged_(data)"],created:function(){this.followUpDialogPromiseReject_=this.followUpDialogPromiseResolve_=this.followUpDialogPromise_= null}, dismissableItemIsDismissedChanged_:function(a){N("kevlar_fluid_dismiss")&&(a?this.fire("yt-dismissable-item-dismissed"):this.fire("yt-dismissable-item-undismissed"))}, dismissableItemDataChanged_:function(){this.dismissableItemReset_()}, dismissableItemReset_:function(){var a=this;this.isDismissed&&(this.isDismissed=!1);this.dismissedRenderer&&(this.dismissedRenderer=void 0);this.followUpDialogPromiseReject_&&(Ti(this.followUpDialogPromise_,Ka),this.followUpDialogPromiseReject_());this.followUpDialogPromise_=new Ki(function(b,c){a.followUpDialogPromiseResolve_=b;a.followUpDialogPromiseReject_=c})}, dismissableItemOnYtServiceRequestSent_:function(a,b){b.actions&&this.dismissableItemProcessActions_(a,b.actions)}, dismissableItemProcessActions_:function(a,b){for(var c=0;cb&&(a=a.createObjectStore("ResponseStore",{keyPath:["key","clientName"]}),a.createIndex("byExpiration","expireTimestampMs",{unique:!1}),a.createIndex("byInterface","clientName",{unique:!1}))}, version:1}),rQ=function(a,b){oQ.call(this,a,b);this.clientName=a;this.defaultExpirationDelayMs=b}; p(rQ,oQ);e=rQ.prototype;e.get=function(a){return Ya(this,function c(){var d,f=this,g;return ya(c,function(l){return 1==l.nextAddress?q(l,qQ().open(),2):3!=l.nextAddress?(d=l.yieldResult,q(l,d.get("ResponseStore",[a,f.clientName]),3)):(g=l.yieldResult)?l.return(new pQ(g)):l.return(void 0)})})}; e.putInternal=function(a,b){return Ya(this,function d(){var f;return ya(d,function(g){if(1==g.nextAddress)return q(g,qQ().open(),2);f=g.yieldResult;return q(g,f.put("ResponseStore",b),0)})})}; e.remove=function(a){return Ya(this,function c(){var d,f=this;return ya(c,function(g){if(1==g.nextAddress)return q(g,qQ().open(),2);d=g.yieldResult;return g.return(d.delete("ResponseStore",[a,f.clientName]))})})}; e.removeAll=function(){return Ya(this,function b(){var c,d=this;return ya(b,function(f){if(1==f.nextAddress)return q(f,qQ().open(),2);c=f.yieldResult;return q(f,wia(c,"byInterface",IDBKeyRange.only(d.clientName)),0)})})}; e.clearExpired=function(){return Ya(this,function b(){var c;return ya(b,function(d){if(1==d.nextAddress)return q(d,qQ().open(),2);c=d.yieldResult;return q(d,wia(c,"byExpiration",IDBKeyRange.upperBound(Vk().toString())),0)})})}; e.has=function(){throw Error("Synchronous access to IDB keys not implemented")};function X0a(a){return Ya(this,function c(){var d;return ya(c,function(f){return 1==f.nextAddress?q(f,Y0a(a),2):(d=f.yieldResult)&&xM(d)?f.return(d):f.return()})})} function Y0a(a){return Ya(this,function c(){var d;return ya(c,function(f){if(1==f.nextAddress)return a?q(f,a.get("service:downloads_settings:fallback"),2):f.return();d=f.yieldResult;return!d||!xM(d)||!isNaN(Number(d.data.expireTimestampMs))&&d.isExpired()?f.return():f.return(d)})})} ;var sQ=function(a,b,c,d,f,g){var l=this;this.playerApi=a;this.store=b;this.getDownloadState=c;this.innerTubeTransportService=d;this.idbResponseStore=f;this.parsePromoPageData=g;a.addEventListener("localmediachange",function(m){m.videoId?Z0a(l,m.videoId):$0a(l)}); $0a(this);a1a(this)},b1a=function(a,b,c,d,f,g){sQ.instance=new sQ(a,b,c,d,f,g)},d1a=function(a,b){return Ya(a,function d(){var f=this; return ya(d,function(g){return 1==g.nextAddress?(c1a(f,b),q(g,f.playerApi.fetchLocalMediaById(b),2)):q(g,Z0a(f,b),0)})})},e1a=function(a,b){Ya(a,function d(){var f=this; return ya(d,function(g){return 1==g.nextAddress?q(g,f.deleteVideo(b),2):q(g,d1a(f,b),0)})})}; sQ.prototype.deleteVideo=function(a){return Ya(this,function c(){var d=this;return ya(c,function(f){return 1==f.nextAddress?q(f,d.playerApi.deleteLocalMediaById(a),2):q(f,Z0a(d,a),0)})})}; var f1a=function(a){return Ya(a,function c(){var d=this;return ya(c,function(f){return 1==f.nextAddress?q(f,d.playerApi.deleteAllLocalMedia(),2):q(f,d.store.dispatch(ZL({type:"RESET_LOCAL_MEDIA_INFO"})),0)})})}; sQ.prototype.isVideoDownloaded=function(a){return 1===dRa(this.getDownloadState(),a)}; sQ.prototype.hasDownloadedVideos=function(){return!!fRa(this.getDownloadState()).length}; sQ.prototype.getLocalPlayerResponse=function(a){return Ya(this,function c(){var d=this;return ya(c,function(f){return f.return(d.playerApi.getLocalPlayerResponse(a))})})}; var c1a=function(a,b){b={videoId:b,forOffline:!0};var c=lM(pMa);oM(a.innerTubeTransportService,b,c).then(function(d){a.parsePromoPageData({playerResponse:d},null)})},$0a=function(a){Ya(a,function c(){var d=this,f; return ya(c,function(g){if(1==g.nextAddress)return q(g,d.playerApi.getAllLocalMediaInfo(),2);f=g.yieldResult;d.store.dispatch(ZL({type:"INIT_LOCAL_MEDIA_INFO",payload:{allLocalMediaInfo:f}}));g1a(d);tQ.resolve();oa(g)})})},Z0a=function(a,b){return Ya(a,function d(){var f=this,g; return ya(d,function(l){if(1==l.nextAddress)return q(l,f.playerApi.getLocalMediaInfoById(b),2);g=l.yieldResult;f.store.dispatch(RQa(g));g1a(f);oa(l)})})},a1a=function(a){Ya(a,function c(){var d=this,f,g,l,m; return ya(c,function(n){if(1==n.nextAddress)return f=d,q(n,X0a(d.idbResponseStore),2);if((g=n.yieldResult)&&!(Number(g.data.refreshTimestampMs||0)d&&(a=A("REMAINING_DOVA_DEFERRED_CHUNKS",-1));0=this.offset_+a&&(this.atEnd=!1):this.atEnd=this.offset_+a>=b-20?!0:!1;this.atStart=20>=this.offset_}}, nextClick_:function(){this.fillRemainingListItems();Polymer.dom.flush();var a=this.$["scroll-container"].clientWidth,b=this.$.items.clientWidth;this.offset_+=(this.useFloorScrolling?Math.floor(a/this.minComponentWidth_)||1:Math.round(a/this.minComponentWidth_)||1)*this.minComponentWidth_;this.offset_+a>=b&&(this.offset_=b-a);this.reposition_()}, prevClick_:function(){var a=this.$["scroll-container"].clientWidth;this.offset_-=(this.useFloorScrolling?Math.floor(a/this.minComponentWidth_)||1:Math.round(a/this.minComponentWidth_)||1)*this.minComponentWidth_;0>this.offset_&&(this.offset_=0);this.reposition_()}, onIronResize_:function(){this.requestButtonsStateUpdate_()}, onItemsTransitionEnd_:function(a){Polymer.dom(a).rootTarget==this.$.items&&this.markDirty()}, observeShownItems_:function(){this.reset()}}];var W1a={};W1a.YtdPosterHoverAnimationBehavior=[Polymer.IronResizableBehavior,{listeners:{"iron-resize":"onIronPosterResize_"},created:function(){this.initialized_=!1;this.hoverAnimationManager_=null}, attached:function(){var a="rtl"==A("HTML_DIR");N("enable_web_poster_hover_animation")&&!a&&(this.listen(this,"poster-renderer-hover","onPosterRenderHover_"),this.listen(this,"poster-renderer-leave","onPosterRendererLeave_"))}, detached:function(){this.unlisten(this,"poster-renderer-hover","onPosterRenderHover_");this.unlisten(this,"poster-renderer-leave","onPosterRendererLeave_")}, initialize_:function(){var a,b;!this.initialized_&&0<(null===(b=null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?void 0:a.items)||void 0===b?void 0:b.length)&&this.data.items[0].hasOwnProperty("posterRenderer")&&(this.hoverAnimationManager_||(this.hoverAnimationManager_=new GVa(this,"ytd-grid-renderer"==this.is)),this.initialized_=!0,this.$["scroll-container"]&&(this.$["scroll-container"].style.height="313px"),this.updateNumberItemsPerLine_())}, updateNumberItemsPerLine_:function(){this.hoverAnimationManager_.numItemPerLine_=this.clientWidth/214}, onPosterRenderHover_:function(a){a.target.isHovering||(this.hoverAnimationManager_||this.initialize_(),LVa(this.hoverAnimationManager_,a,this.$.items.children,"hovering"))}, onPosterRendererLeave_:function(a){if(this.hoverAnimationManager_){var b=this.$.items.children;if(0!=b.length){var c=a.detail.mouseEvent;a=c.pageX;c=c.pageY;b=b[b.length-1].getBoundingClientRect();if(a>=b.right&&c>=b.top)this.onMouseLeavePosterHoverSection(null)}}}, onMouseLeavePosterHoverSection:function(a){if(this.hoverAnimationManager_){var b=this.hoverAnimationManager_;"steady-state"!=b.currentAnimateState_&&LVa(b,a,this.$.items.children,"after-hover")}}, resetSteadyState:function(){this.hoverAnimationManager_&&this.hoverAnimationManager_.resetSteadyState(this.$.items.children)}, onIronPosterResize_:function(){this.hoverAnimationManager_&&this.updateNumberItemsPerLine_()}}];var X1a=Jn(115994),Y1a=Jn(115993),OQ=function(a,b,c){var d=this,f=c.dragDownAction;this.layer=0;this.watchConfig={startPosition:0,draggingClass:"gesture-dragging",triggers:{down:{fade:!0,endOpacity:.6,endPosition:100,threshold:100,triggerAction:function(){return d.dragDownAction()}}}}; this.watchFullScreenConfig={startPosition:0,draggingClass:"gesture-dragging",triggers:{down:{disableFinish:!0,endOpacity:.6,endPosition:100,threshold:100,triggerAction:function(){return d.dragDownAction()}}}}; this.fullscreen=!1;if(N("kevlar_touch_gesture_ves")){var g=OL();TL(g,X1a,this.layer);TL(g,Y1a,this.layer);this.dragDownAction=function(){f();UL(g,{visualElement:d.fullscreen?X1a:Y1a})}}else this.dragDownAction=f; this.gesture=new SN(a,b,this.getConfig(!1));this.attach()}; OQ.prototype.attach=function(){this.gesture.attach()}; OQ.prototype.detach=function(){this.gesture.detach()}; OQ.prototype.update=function(a){this.fullscreen=a;a=this.getConfig(a);this.gesture.config=a}; OQ.prototype.getConfig=function(a){return a?this.watchFullScreenConfig:this.watchConfig};function Z1a(a,b){Ya(this,function d(){var f;return ya(d,function(g){if(1==g.nextAddress)return f=VRa(),sa(g,2),q(g,WRa(f),4);if(2!=g.nextAddress){var l;(null===(l=a.onSuccessCommand)||void 0===l?0:l.watchEndpoint)&&b.fire("yt-navigate",a.onSuccessCommand);return ta(g,0)}ua(g);oa(g)})})} ;var $1a=[[{listeners:{"yt-get-context-provider":"getContextProvider_"},attached:function(){this.getProvidedContext()&&this.getProvidedContext().start()}, detached:function(){this.getProvidedContext()&&this.getProvidedContext().pause()}, getContextProvider_:function(a){a.detail.contextProvider=this;a.stopPropagation()}, getProvidedContext:function(){return null}}, {created:function(){this.pageContext=null}, getProvidedContext:function(){return this.pageContext}}], [nWa.YtVisibilityObserverBehavior,{isVisibilityRoot:!0,resetVisibilityRoot:function(){Rg(this.visibilityObserverForChild_)}, disconnectVisibilityRoot:function(){this.visibilityObserverForChild_&&this.visibilityObserverForChild_.disconnect()}, reconnectVisibilityRoot:function(){this.visibilityObserverForChild_&&this.visibilityObserverForChild_.reconnect();N("kevlar_enable_vimio_logging")&&oNa()}}], {_noAccessors:!0,properties:{active:Boolean,data:Object,loading:Boolean},observers:["ytPageBehaviorActiveObserver_(active)"],created:function(){this.pageCount=0;this.readyResolver_=Qi();this.pageScrollElement=null}, ready:function(){this.readyResolver_.resolve()}, getReady:function(){return this.readyResolver_.promise}, loadPage:function(a){this.pageCount+=1;N("kevlar_attach_vimio_behavior")&&(this.disconnectVisibilityRoot(),this.reconnectVisibilityRoot());this.loadPage_(a)}, loadPage_:function(a){this.data=a}, ytPageBehaviorActiveObserver_:function(a){N("kevlar_attach_vimio_behavior")&&(a?this.reconnectVisibilityRoot():this.disconnectVisibilityRoot())}, setScrollTop:function(a){if(!this.setScrollTopJobId_){var b=this;this.setScrollTopJobId_=window.requestAnimationFrame(function(){b.setScrollTopJobId_=0;var c=b.getInterface(fQ);c&&c.ignoreNextScroll();this.getPageScrollingElement().scrollTop=a}.bind(this))}}, getPageScrollingElement:function(){return this.pageScrollElement||jg(document)}, getScrollTop:function(){return this.getPageScrollingElement().scrollTop}}];var a2a=["videoPrimaryInfoRenderer","title"],b2a=["videoSecondaryInfoRenderer","owner","videoOwnerRenderer","title"]; function PQ(a,b){var c=y.getValueByKeys(a,"contents","twoColumnWatchNextResults","results","results","contents"),d=y.getValueByKeys(a,"contents","twoColumnWatchNextResults","playlist","playlist")||null;(void 0===b?0:b)&&(d=null);var f=b=null;if(d)b=y.getValueByKeys(d,"titleText"),c=y.unsafeClone(y.getValueByKeys(d,"longBylineText")),f="",c&&(f=CL(c)),!d.isInfinite&&-1=this.getScrollTop()&&(this.player.isFullscreen()?this.player.toggleFullscreen():this.sendAction("yt-activate-miniplayer-from-watch-action"))}, hasPlaylist_:function(a,b){return this.loading?b:!!Object.keys(a).length}, updatePlayerWithAutonavState_:function(){this.player&&(this.autonavAllowed_()?this.player.setAutonavState(LL.getInstance().getState()):this.player.setAutonavState(1))}, autonavAllowed_:function(){return this.autonavCanceledSignal_?!1:!!this.get("contents.twoColumnWatchNextResults.autoplay.autoplay",this.data)}, autoplayDataChanged_:function(){this.autonavDisabled_=!this.autonavAllowed_();this.updatePlayerWithAutonavState_()}, youthereDataChanged_:function(a){if(a){a=k(a);for(var b=a.next();!b.done;b=a.next())b=b.value,b.youThereRenderer&&fUa(this.youThereManager_,b.youThereRenderer)}}, setPlaylistData_:function(a){return a||{}}, userEngagementConfigDataChanged_:function(a){if(a)if("LOW_USER_ENGAGEMENT_ACTION_LOWER_QUALITY"===a.lowUserEngagementAction){var b=this.youThereManager_;Mk()=this.watchWhileScrollThreshold_?(a.activate(this.getPlayer()),this.schedulePlayerSizeUpdate_()):a.active&&(!b||c=a&&.5624<=a}, computeIsExtraWideVideo_:function(a){return .5624>a}, computeShowFixieCommentHeader_:function(a,b,c){return!!N("kevlar_fixie_watch_layout")&&!!this.get("header.commentsHeaderRenderer",a)&&this.computeShowComments_(a,b,c)}, onYtAutonavStateChangedAction_:function(){this.updatePlayerWithAutonavState_()}, onDisableWatchAnchorOverflow_:function(){var a=this;this.noAnchorOverflow_||(this.noAnchorOverflow_=!0,Polymer.RenderStatus.afterNextRender(this,function(){var b=window.scrollY;a.setScrollTop(b+1);a.setScrollTop(b)}))}, onYtUserActivity_:function(){a:{var a=this.youThereManager_;if(a.youThereData_){if(a.ignoreFullscreenExitUserActivity_)break a;a.youThereData_.userActiveDuringFlowAction&&(N("web_handle_meta_commands")||!a.youThereData_.userActiveDuringFlowAction.commandExecutorCommand?UN(a,[a.youThereData_.userActiveDuringFlowAction]):UN(a,a.youThereData_.userActiveDuringFlowAction.commandExecutorCommand.commands));a.inYouThereFlow_&&($J("YOU_THERE_EVENT_TYPE_LACT_RESET",On(),a.youThereData_,a.clientPlaybackNonce_), cl());dUa(a,!0)}jUa(a,!1)}}, handleSignalActionPausePlayer_:function(){this.active&&$M(this).pause()}, handleSignalActionPlayPlayer_:function(){this.active&&$M(this).play()}, handleSignalActionAcknowledgeYouThere_:function(){var a=this.youThereManager_;$J("YOU_THERE_EVENT_TYPE_USER_RESPONDED",On(),a.youThereData_,a.clientPlaybackNonce_)}, incrementFullerscreenEduButtonCount_:function(a){var b=rK(a)||0;qK(a,b+1,31536E3);this.updateFullerscreenEduButtonSubtleModeState_()}, updateFullerscreenEduButtonSubtleModeState_:function(){var a=rK("yt-fullerscreen-edu-button-click-count")||0,b=rK("yt-fullerscreen-edu-button-shown-count")||0,c=ek("external_fullscreen_button_shown_threshold"),d=a>=ek("external_fullscreen_button_click_threshold")||b>=c;$M(this).getPlayerPromise().then(function(f){f.updateFullerscreenEduButtonSubtleModeState(d)})}, resetFullerscreenEduButtonForNewPlayback_:function(){this.fullerscreenEduButtonShownThisPlayback_=this.fullerscreenEduButtonClickedThisPlayback_=!1}, computePlaylistData_:function(a,b){return b}, onYtPlaylistDataUpdated_:function(){this.externalPlaylistData_=this.getInterface(rN).getPlaylistData()||{}}, schedulePanelMaxHeightUpdate_:function(){var a=this;this.panelMaxHeightUpdateJob_&&Bk.cancelJob(this.panelMaxHeightUpdateJob_);this.panelMaxHeightUpdateJob_=yk(Bk,function(){a.panelMaxHeightUpdateJob_=0;var b=!a.isTwoColumns_||a.theater||a.fullscreen?460:a.calculateNormalPlayerSize_().height;a.updateStyles({"--ytd-watch-flexy-panel-max-height":Math.min(b,502)+"px","--ytd-watch-flexy-chat-max-height":b+"px"})})}, computeHideAutoplay_:function(){return this.playlistData&&this.playlistData.isInfinite?!0:this.playlistData&&this.playlistData.totalVideos&&void 0!==this.playlistData.currentIndex?this.playlistData.currentIndex!==this.playlistData.totalVideos-1:!1}, onYtShowEngagementPanelScrimAction_:function(a){this.engagementPanelScrimOnClickCommands_=this.get("showEngagementPanelScrimAction.onClickCommands",a)||null;this.showEngagementPanelScrim_=!0}, onYtHideEngagementPanelScrimAction_:function(){this.engagementPanelScrimOnClickCommands_=null;this.showEngagementPanelScrim_=!1}, onEngagementPanelScrimClick_:function(){this.engagementPanelScrimOnClickCommands_&&this.sendInnerTubeActions(this.engagementPanelScrimOnClickCommands_,this)}, showEngagementPanelScrimChanged_:function(a){a?this.listen(this.$["engagement-panel-scrim"],"tap","onEngagementPanelScrimClick_"):this.unlisten(this.$["engagement-panel-scrim"],"tap","onEngagementPanelScrimClick_")}, handleLoopCommand_:function(a){a.loopCommand&&$M(this).getPlayerPromise().then(function(b){a.loopCommand.loop?(b.setLoopRange({startTimeMs:parseInt(a.loopCommand.startTimeMs,10),endTimeMs:parseInt(a.loopCommand.endTimeMs,10),postId:a.loopCommand.postId}),b.playVideo()):b.setLoopRange(null)})}, onGetCurrentVideoIdAction_:function(){if(this.active)return this.videoId}, onSecondaryMouseenter_:function(){this.secondaryHovered_=!0}, onSecondaryMouseleave_:function(){this.secondaryHovered_=!1}, onYtGetLocationCommand_:function(a){a.getLocationCommand&&this.active&&N("web_enable_client_location_service")&&Z1a(a.getLocationCommand,this)}, onYtScrollToWatchColumns_:function(){if("ytd-watch-flexy"===this.is){var a=this.querySelector("#columns");a&&!this.scrollToAnimation_.isAnimating_&&this.scrollToAnimation_.start(this.getScrollTop(),Math.max(0,a.offsetTop-56),500)}}, onYtScrollToWatchElement_:function(a){if("ytd-watch-flexy"===this.is&&this.contains(a)&&!this.scrollToAnimation_.isAnimating_){var b=a.offsetTop-24;a=a.offsetTop+a.offsetHeight+24;var c=this.getPageScrollingElement(),d=this.getScrollTop(),f=d+c.clientHeight-56;if(bf)b=a-c.clientHeight;else return;this.scrollToAnimation_.start(this.getScrollTop(),Math.max(0,b),500)}}}; f2a.YtdWatchBehavior=[W.YtRendererBehavior,cQ,Y,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,$1a,dP.YtEndpointBehavior,h2a];var i2a=function(){return O.apply(this,arguments)||this}; p(i2a,O);var j2a=i2a;j2a=w([U({is:"ytd-watch-items"})],j2a);var k2a;var l2a;var SQ=[OO.YtTaskEmitterBehavior,V.YtActionSenderBehavior,{_noAccessors:!0,listeners:{"yt-load-next-continuation":"onLoadNextContinuation_"},nextContinuation:void 0,pendingContinuationRequest_:void 0,listeningForNavigate_:!1,created:function(){this.continuationStartNavCount_=-1;this.getNextContinuation&&this.getNextContinuation instanceof Function&&(this.nextContinuation=this.getNextContinuation())}, detached:function(){this.stopListeningForNavigate_()}, canUseContextualNetworkManager_:function(){return N("polymer_task_manager_proxied_promise")&&this.shouldUseTaskManager()&&!!this.getNetworkManager()}, startListeningForNavigate_:function(){this.canUseContextualNetworkManager_()||this.listeningForNavigate_||(this.listen(document,"yt-navigate-start","onYtNavigateStart_"),this.listeningForNavigate_=!0)}, stopListeningForNavigate_:function(){this.canUseContextualNetworkManager_()||(this.unlisten(document,"yt-navigate-start","onYtNavigateStart_"),this.listeningForNavigate_=!1)}, onLoadNextContinuation_:function(a,b){a.stopPropagation();if(this.nextContinuation.requestPath){a=this.nextContinuation.requestPath;var c={};N("direct_innertube_click_tracking_reporting")&&(c={context:{clickTracking:{clickTrackingParams:this.nextContinuation.clickTrackingParams}}});this.makeNextContinuationRequest_(a,b,c)}else a={locationRetrieved:function(d,f){var g={};N("direct_innertube_click_tracking_reporting")&&f.clickTrackingParams&&Object.assign(g,{context:{clickTracking:{clickTrackingParams:f.clickTrackingParams}}}); this.makeNextContinuationRequest_(d,b,g)}.bind(this)},this.fire("yt-retrieve-location",a)}, makeNextContinuationRequest_:function(a,b,c){N("csi_wait_for_continuation")&&Wo("ncl");Xo("nct");this.continuationStartNavCount_=A("NAV_COUNT",void 0);this.pendingContinuationRequest_&&this.pendingContinuationRequest_.cancel();a=b(a);var d;this.canUseContextualNetworkManager_()&&(d=this.getNetworkManager());d||(d=this.getInterface(UM));c=this.nextContinuation.usePost?d.postData(a,c):d.fetchData(a,c);c.then(this.updateNextContinuationData_.bind(this,a));this.pendingContinuationRequest_=c;this.startListeningForNavigate_()}, updateNextContinuationData_:function(a,b){Xo("ncl");this.continuationStartNavCount_!=A("NAV_COUNT",void 0)&&Po("ncpm",1);this.pendingContinuationRequest_=void 0;if(b){var c={};this.nextContinuation&&(c=this.nextContinuation);if(b.response&&b.response.continuationContents&&b.response.continuationContents[c.continuationType]){a=b.response.continuationContents[c.continuationType];var d=c.header||"data.header",f=a[c.responseHeaderKey||"header"];f&&this.set(d,f);d=c.contentsArray||"data.contents";f=this.getContents_(a, c.responseContentsKey||"contents")||[];this.pathExists_(d)?(f.unshift(d),this.push.apply(this,f)):this.set(d,f);if(f){var g=this.getScreenLayer();f=On(g);g=Nn(g);var l=this.get("response.trackingParams",b);l&&f&&g&&(l=In(l),NJ(f,g,l),this.sendAction("yt-store-grafted-ve-action",[l]));this.fire("yt-next-continuation-data-updated",{continuationData:b,page:this,contentsArray:d})}this.set(c.continuationsArray||"data.continuations",a[c.responseContinuationsKey||"continuations"]||[])}else b.reload?vm(new Pl("Reloading from continuation is unsupported")): b.responseContext&&b.responseContext.errors||(delete b.xsrf_token,delete b.timing,delete b.endpoint,delete b.csn,b.responseContext&&delete b.responseContext.serviceTrackingParams,d={request:kl(a,{ctoken:"x",continuation:"x",itct:"x"}),responseKeys:Object.keys(b).sort()},b.response&&(d.responseContentKeys=Object.keys(b.response).sort()),this.nextContinuation&&this.nextContinuation.continuationType&&(d.continuationType=this.nextContinuation.continuationType.substr(0,256)),b=new Pl("Malformed continuation", d),0==a.indexOf("/comment_service_ajax")?vm(b):Um(b)),this.set(c.continuationsArray||"data.continuations",[])}else Um(new Pl("Missing continuation response",a))}, getContents_:function(a,b){b=b.split(".");return y.getValueByKeys(a,b)}, pathExists_:function(a){var b=this;a=a.toString().split(".");for(var c=0;c\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k2a){var d=document.createElement("template");d.innerHTML=""; k2a=d}d=k2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);l2a=a}a=l2a;return a}}}); var UQ=TQ;UQ.prototype.onLoadReloadContinuation_=UQ.prototype.onLoadReloadContinuation_;UQ.prototype.onRetrieveLocation_=UQ.prototype.onRetrieveLocation_;w([P(SQ),x("design:type",Object)],UQ.prototype,"ytNextContinuationBehavior",void 0);w([P(mP),x("design:type",Object)],UQ.prototype,"ytVisibilityBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],UQ.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],UQ.prototype,"ytRendererstamperBehavior",void 0); w([P(AO.YtComponentBehavior),x("design:type",Object)],UQ.prototype,"ytComponentBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],UQ.prototype,"data",void 0);w([R({computed:"computeHasContinuation_(data.continuations)"}),x("design:type",Boolean)],UQ.prototype,"hasContinuation_",void 0);w([R({observer:"isLoadingChanged_"}),x("design:type",Boolean)],UQ.prototype,"isLoading_",void 0); w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],UQ.prototype,"onRetrieveLocation_",null);w([S("yt-load-reload-continuation"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Function]),x("design:returntype",void 0)],UQ.prototype,"onLoadReloadContinuation_",null);UQ=w([U({is:"ytd-backstage-comments-renderer"})],UQ);var m2a;var n2a;iP("menuRenderer","menuRenderer","ytd-menu-renderer");var VQ=function(){return O.apply(this,arguments)||this}; p(VQ,O);e=VQ.prototype; e.configureRendererStamper=function(){return{"data.topLevelButtons":{id:"top-level-buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]",forceIconButton:"[[forceIconButton]]",styleActionButton:"[[styleActionButton]]"}},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]",forceIconButton:"[[forceIconButton]]",styleActionButton:"[[styleActionButton]]"}},accountLinkButtonRenderer:{component:"ytd-account-link-button-renderer"}, downloadButtonRenderer:{component:"ytd-download-button-renderer",properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]",forceIconButton:"[[forceIconButton]]",styleActionButton:"[[styleActionButton]]"}}}}}}; e.ready=function(){var a=this,b=this.$.button;this.persistentMenu?(this.menuFocused=!0,this.overlayOpen=!1):(b.addEventListener("focus",function(){a.onMenuFocus()}),b.addEventListener("blur",function(){a.onMenuBlur()})); this.ytdOpenPopupBehavior.popupPositionTarget=b}; e.detached=function(){this.icon="yt-icons:more_vert"}; e.computeMenuActive=function(a,b){return a||b}; e.onPopupOpened=function(){this.overlayOpen=!0;this.fire("yt-menu-overlay-changed",this.overlayOpen);null==this.menuFocused&&(this.menuFocused=!1)}; e.onPopupClosed=function(){this.overlayOpen=!1;this.fire("yt-menu-overlay-changed",this.overlayOpen)}; e.onPopupCanceled=function(){this.overlayOpen=!1;this.fire("yt-menu-overlay-changed",this.overlayOpen)}; e.onMenuFocus=function(){this.menuFocused=!0;null==this.overlayOpen&&(this.overlayOpen=!1)}; e.onMenuBlur=function(){this.menuFocused=!1}; e.computeAccessibilityLabel=function(a){return this.get("accessibility.accessibilityData.label",a)}; e.isHidden=function(a){return null==a?!0:null!=a.fetchMenuCommand?!1:null==a.items}; e.onOverflowTap=function(){if(this.data.fetchMenuCommand)this.ytActionSenderBehavior.sendServiceRequestAction([this.data.fetchMenuCommand]);else{var a=this.createMenuRendererVe();this.ytdOpenPopupBehavior.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data},veData:a}})}}; e.createMenuRendererVe=function(){var a=this.data.trackingParams,b=On(),c=Nn();return a&&b&&c?(a=In(a),c=Jn(7591),NJ(b,a,c),c):null}; h.Object.defineProperties(VQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===n2a){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===m2a){var d=document.createElement("template");d.innerHTML=""; m2a=d}d=m2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);n2a=a}a=n2a;return a}}}); var WQ=VQ;WQ.prototype.onPopupCanceled=WQ.prototype.onPopupCanceled;WQ.prototype.onPopupClosed=WQ.prototype.onPopupClosed;WQ.prototype.onPopupOpened=WQ.prototype.onPopupOpened;w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],WQ.prototype,"ytdOpenPopupBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],WQ.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],WQ.prototype,"ytActionSenderBehavior",void 0); w([P(Y),x("design:type",Object)],WQ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],WQ.prototype,"data",void 0);w([R({value:"yt-icons:more_vert"}),x("design:type",String)],WQ.prototype,"icon",void 0);w([R({reflectToAttribute:!0,computed:"computeMenuActive(menuFocused, overlayOpen)"}),x("design:type",Boolean)],WQ.prototype,"menuActive",void 0);w([R(),x("design:type",Boolean)],WQ.prototype,"menuFocused",void 0); w([R({value:function(){return N("desktop_persistent_menu")&&window.matchMedia("(any-pointer: coarse)").matches}}), x("design:type",Boolean)],WQ.prototype,"persistentMenu",void 0);w([R({value:"bottom"}),x("design:type",String)],WQ.prototype,"buttonTooltipPosition",void 0);w([R(),x("design:type",Boolean)],WQ.prototype,"noInkOnDropdownButton",void 0);w([R(),x("design:type",Boolean)],WQ.prototype,"overlayOpen",void 0);w([R({value:!0}),x("design:type",Boolean)],WQ.prototype,"forceIconButton",void 0);w([R(),x("design:type",Boolean)],WQ.prototype,"styleActionButton",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WQ.prototype,"onPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WQ.prototype,"onPopupClosed",null);w([S("yt-popup-canceled"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WQ.prototype,"onPopupCanceled",null);WQ=w([U({is:"ytd-menu-renderer"})],WQ);var o2a;var p2a;var XQ=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-account-linking-state-changed-command":"handleAccountLinkingStateChangedCommand","yt-signal-action-show-account-link-dialog":"handleShowAccountLinkDialog"};return a}; p(XQ,O);XQ.prototype.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{forceIconButton:!0}}}}}}; XQ.prototype.handleAccountLinkingStateChangedCommand=function(a){var b;if(a.accountLinkingStateChangedCommand){var c=null===(b=this.data)||void 0===b?void 0:b.providerKey,d=a.accountLinkingStateChangedCommand.providerKey;c&&d&&c.id===d.id&&c.subject===d.subject&&(a=a.accountLinkingStateChangedCommand.linked,void 0!==a&&(this.set("data.linked",a),this.setPlayerAccountLinkState(a)))}}; XQ.prototype.setPlayerAccountLinkState=function(a){var b=new dJ;kKa(b,jKa(new eJ,a));var c=ZM(this);c&&c.getPlayerPromise().then(function(d){d.setAccountLinkState(Me(b.serializeBinary(),4));d.updateAccountLinkingConfig(a)})}; XQ.prototype.handleShowAccountLinkDialog=function(){var a=this.get("button.buttonRenderer.command");a&&this.get("button.buttonRenderer.command.signalServiceEndpoint.actions.0.openPopupAction.popup.gamingAccountLinkSettingRenderer")&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; h.Object.defineProperties(XQ.prototype,{button:{configurable:!0,enumerable:!0,get:function(){if(this.data){if(this.data.linked&&this.data.linkedButton)return this.data.linkedButton;if(!this.data.linked&&this.data.unlinkedButton)return this.data.unlinkedButton}}}}); h.Object.defineProperties(XQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===p2a){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===o2a){var d=document.createElement("template");d.innerHTML="";o2a=d}d= o2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);p2a=a}a=p2a;return a}}}); var YQ=XQ;w([P(Y),x("design:type",Object)],YQ.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],YQ.prototype,"ytRendererBehavior",void 0);w([P([NO.YtActionHandlerBehavior]),x("design:type",Object)],YQ.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],YQ.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],YQ.prototype,"data",void 0); w([zE("data","data.linked"),x("design:type",Object),x("design:paramtypes",[])],YQ.prototype,"button",null);YQ=w([U({is:"ytd-account-link-button-renderer"})],YQ);var q2a;var r2a=zL(mL("DOWNLOAD",{},"Download")),s2a=zL(mL("DOWNLOADING",{},"Downloading")),t2a=zL(mL("DOWNLOADED",{},"Downloaded")),u2a=zL(mL("RETRY",{},"Retry")),ZQ=function(){var a=O.apply(this,arguments)||this;a.downloadStatus=0;return a}; p(ZQ,O);ZQ.prototype.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; ZQ.prototype.dataChanged=function(){var a,b;if(!this.data.text){var c=nQ(bM.getState(),null===(b=null===(a=this.data.serviceEndpoint)||void 0===a?void 0:a.offlineVideoEndpoint)||void 0===b?void 0:b.videoId);this.updateButton(c)}}; ZQ.prototype.updateButton=function(a){if(this.data){switch(a){case 0:a=r2a;var b="OFFLINE_DOWNLOAD";break;case 4:a=u2a;b="OFFLINE_DOWNLOAD";break;case 1:a=t2a;b="OFFLINE_PIN";break;case 2:a=s2a;b="DOWN_ARROW";break;case 3:a=s2a;b="DOWN_ARROW";break;default:a=r2a,b="OFFLINE_DOWNLOAD";}var c=Object.assign({},this.data);c.text=a;c.icon={iconType:b};c.size="SIZE_DEFAULT";c.style="STYLE_DEFAULT";this.set("data",c)}}; h.Object.defineProperties(ZQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===q2a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(kP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);q2a=a}a=q2a;return a}}}); var $Q=ZQ;$Q.prototype.updateButton=$Q.prototype.updateButton;$Q.prototype.dataChanged=$Q.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],$Q.prototype,"ytRendererBehavior",void 0);w([P(IQ),x("design:type",Object)],$Q.prototype,"ytdReduxBehavior",void 0);w([P(gP.YtButtonBehavior),x("design:type",Object)],$Q.prototype,"ytButtonBehavior",void 0);w([R(),x("design:type",Object)],$Q.prototype,"data",void 0); w([R({selector:nQ,selectorArgs:["data.serviceEndpoint.offlineVideoEndpoint.videoId"]}),x("design:type",Number)],$Q.prototype,"downloadStatus",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$Q.prototype,"dataChanged",null);w([yE("downloadStatus"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],$Q.prototype,"updateButton",null);$Q=w([U({is:"ytd-download-button-renderer"})],$Q);var v2a;var w2a;var aR=function(){var a=O.apply(this,arguments)||this;a.enableUnifiedVerifiedBadge=N("enable_unified_verified_badge");return a}; p(aR,O);aR.prototype.basicPaletteChanged=function(){this.data&&this.data.colorData&&this.data.colorData.basicColorPaletteData&&fP(this,this.data.colorData.basicColorPaletteData)}; aR.prototype.colorChanged=function(){if(this.data&&this.data.color){var a=this.get("basicColorPaletteData.backgroundColor",this.data.color),b=this.get("basicColorPaletteData.foregroundTitleColor",this.data.color),c={};a?(a=dO(a),c["--ytd-author-comment-badge-background-color"]=a):(c["--ytd-author-comment-badge-icon-background-color"]="transparent",c["--ytd-author-comment-badge-background-color"]="transparent");b?(b=dO(b),c["--ytd-author-comment-badge-name-color"]=b,c["--ytd-author-comment-badge-icon-color"]= b):c["--ytd-author-comment-badge-name-color"]="var(--yt-primary-text-color)";0\n \n \n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===v2a){var d=document.createElement("template");d.innerHTML=""; v2a=d}d=v2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);w2a=a}a=w2a;return a}}}); var bR=aR;bR.prototype.colorChanged=bR.prototype.colorChanged;bR.prototype.basicPaletteChanged=bR.prototype.basicPaletteChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],bR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],bR.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],bR.prototype,"enableUnifiedVerifiedBadge",void 0); w([R({reflectToAttribute:!0}),zE("data.icon.iconType"),x("design:type",Object),x("design:paramtypes",[])],bR.prototype,"iconType",null);w([R({reflectToAttribute:!0}),zE("data.authorUnifiedVerified"),x("design:type",Object),x("design:paramtypes",[])],bR.prototype,"verified",null);w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Object),x("design:paramtypes",[])],bR.prototype,"creator",null); w([yE("data.colorData.basicColorPaletteData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],bR.prototype,"basicPaletteChanged",null);w([yE("data.color"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],bR.prototype,"colorChanged",null);bR=w([U({is:"ytd-author-comment-badge-renderer"})],bR);var x2a;var y2a;var cR=function(){return O.apply(this,arguments)||this}; p(cR,O);e=cR.prototype;e.addTooltips=function(){for(var a=Polymer.dom(this.root).querySelectorAll(".badge"),b=0,c;c=a[b++];){var d=this.repeatElement.itemForElement(c);c=Polymer.dom(c);c.lastChild&&"paper-tooltip"===c.lastChild.is&&c.removeChild(c.lastChild);if(d=d.metadataBadgeRenderer&&d.metadataBadgeRenderer.tooltip){var f=ho("paper-tooltip");Polymer.dom(f).textContent=d;f.setAttribute("position","top");c.appendChild(f)}}}; e.badgesChanged=function(a){var b=this.addTooltips.bind(this);Un.getInstance().parkOrScheduleJob(b,0,"eocs",16);this.updateComputedBadges(a,this.topStandaloneBadge)}; e.topStandaloneBadgeChanged=function(a){this.updateComputedBadges(this.badges,a,this.bottomStandaloneBadge)}; e.bottomStandaloneBadgeChanged=function(a){this.updateComputedBadges(this.badges,this.topStandaloneBadge,a)}; e.computeStyle=function(a){N("enable_html5_teal_ad_badge")&&"BADGE_STYLE_TYPE_AD"===a&&(a="badge-style-type-ad-alternate");return a?a.toLowerCase().replace(/_/g,"-"):""}; e.updateComputedBadges=function(a,b,c){this.computedBadges=(b=b?[b]:c)?b:a}; h.Object.defineProperties(cR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===y2a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x2a){var d=document.createElement("template");d.innerHTML=""; x2a=d}d=x2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);y2a=a}a=y2a;return a}}}); var dR=cR;w([R({observer:"badgesChanged"}),x("design:type",Array)],dR.prototype,"badges",void 0);w([R({observer:"topStandaloneBadgeChanged"}),x("design:type",Object)],dR.prototype,"topStandaloneBadge",void 0);w([R({observer:"bottomStandaloneBadgeChanged"}),x("design:type",Array)],dR.prototype,"bottomStandaloneBadge",void 0);w([R(),x("design:type",Object)],dR.prototype,"computedBadges",void 0);w([AE("#repeat"),x("design:type",Object)],dR.prototype,"repeatElement",void 0); dR=w([U({is:"ytd-badge-supported-renderer"})],dR);var z2a;var A2a;var eR=function(){var a=O.apply(this,arguments)||this;a.DEFAULT_TOOLTIP_OFFSET="10";a.TOOLTIP_OFFSET_NO_BANNER="-8";a.badges=null;a.noEndpoints=!1;a.wrapText=!1;a.forceVerified=!1;a.tooltipPosition="top";a.height=0;a.lineHeight=0;return a}; p(eR,O);e=eR.prototype;e.registerTargetId=function(){var a=this.get("badges.0.metadataBadgeRenderer.targetId");a&&N("enable_unified_verified_badge")&<a(a,this)}; e.created=function(){this.ytActionHandlerBehavior.actionMap={"yt-window-resized":"handleWindowResized"}}; e.attached=function(){var a=this;this.observer=new MutationObserver(function(b,c){a.handleResized();c.disconnect()}); this.observer.observe(this.textEl,{childList:!0})}; e.detached=function(){this.observer&&this.observer.disconnect()}; e.handleWindowResized=function(){this.handleResized()}; e.onChannelNameChanged=function(){this.verified?this.handleResized():(this.textEl.style.removeProperty("width"),this.textContainerEl.style.removeProperty("padding"),this.textContainerEl.style.removeProperty("margin-right"),this.textContainerEl.style.removeProperty("margin-left"))}; e.onHeightChanged=function(){if(this.verified){var a=Math.ceil(this.height*Math.tan(30*Math.PI/180))+"px";"rtl"===A("HTML_DIR")?this.textContainerEl.style.marginLeft=a:this.textContainerEl.style.marginRight=a}}; e.onLineHeightChanged=function(){this.verified&&(24<=this.lineHeight||0===this.lineHeight&&24<=this.height)&&(this.textContainerEl.style.padding="rtl"===A("HTML_DIR")?"0 6px 0 2px":"0 2px 0 6px")}; e.handleResized=function(){var a=this;this.verified&&yk(Bk,function(){a.fitBackgroundToText();var b=getComputedStyle(a).lineHeight;b&&(b=b.match(/\d+/))&&b.length&&(a.lineHeight=Number(b[0]));a.height=a.lineHeight&&!a.wrapText?a.lineHeight:a.textEl.offsetHeight})}; e.fitBackgroundToText=function(){if(this.verified&&this.wrapText){this.textEl.style.width="unset";var a=document.createRange(),b=Polymer.dom(this.textEl.root).children;0
\n
\n \n \n
\n \n [[tooltipText]]\n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z2a){var d=document.createElement("template");d.innerHTML=""; z2a=d}d=z2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);A2a=a}a=A2a;return a}}}); var fR=eR;fR.prototype.onLineHeightChanged=fR.prototype.onLineHeightChanged;fR.prototype.onHeightChanged=fR.prototype.onHeightChanged;fR.prototype.onChannelNameChanged=fR.prototype.onChannelNameChanged;fR.prototype.registerTargetId=fR.prototype.registerTargetId;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],fR.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],fR.prototype,"badges",void 0);w([R(),x("design:type",Object)],fR.prototype,"channelName",void 0); w([R(),x("design:type",Object)],fR.prototype,"noEndpoints",void 0);w([R(),x("design:type",Boolean)],fR.prototype,"wrapText",void 0);w([R(),x("design:type",Boolean)],fR.prototype,"forceVerified",void 0);w([R(),x("design:type",String)],fR.prototype,"tooltipPosition",void 0);w([R(),x("design:type",String)],fR.prototype,"tooltip",void 0);w([R(),x("design:type",Boolean)],fR.prototype,"hasChannelArt",void 0);w([AE("#text-container"),x("design:type",HTMLElement)],fR.prototype,"textContainerEl",void 0); w([AE("#text"),x("design:type",O)],fR.prototype,"textEl",void 0);w([AE("#verified-tooltip"),x("design:type",HTMLElement)],fR.prototype,"verifiedTooltip",void 0);w([R(),x("design:type",Number)],fR.prototype,"height",void 0);w([R(),x("design:type",Number)],fR.prototype,"lineHeight",void 0);w([R({reflectToAttribute:!0}),zE("badges","forceVerified"),x("design:type",Boolean),x("design:paramtypes",[])],fR.prototype,"verified",null); w([zE("badges","verified"),x("design:type",Boolean),x("design:paramtypes",[])],fR.prototype,"hideBadges",null);w([zE("channelName"),x("design:type",Object),x("design:paramtypes",[])],fR.prototype,"formattedName",null);w([zE("badges","verified","formattedName"),x("design:type",String),x("design:paramtypes",[])],fR.prototype,"tooltipText",null);w([zE("hasChannelArt"),x("design:type",String),x("design:paramtypes",[])],fR.prototype,"tooltipOffset",null); w([yE("badges"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],fR.prototype,"registerTargetId",null);w([yE("channelName"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],fR.prototype,"onChannelNameChanged",null);w([yE("height"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],fR.prototype,"onHeightChanged",null); w([yE("lineHeight","height"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],fR.prototype,"onLineHeightChanged",null);fR=w([U({is:"ytd-channel-name"})],fR);var B2a;var C2a;var gR=function(){var a=O.apply(this,arguments)||this;a.isOpen_=!1;a.inPopupContainer=!1;a.isCommentboxLoading_=!1;a.triggerHintJobId_=0;a.actionMap={"yt-create-comment-action":"onCreateCommentAction_","yt-create-poll-action":"onCreatePollAction","yt-add-video-link-action":"onAddVideoLinkAction","yt-show-scheduling-panel-command":"onShowSchedulingPanelCommand"};return a}; p(gR,O);e=gR.prototype; e.configureRendererStamper=function(){return{"data.accessRestrictionsSelector":{id:"access-restrictions-selector",mapping:{dropdownRenderer:{component:"ytd-flat-dropdown-renderer",classListBinding:"[[dropdownRendererClasses_]]"}}},"data.videoLinkButton":{id:"video-link-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.pollButton":{id:"poll-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.imageButton":{id:"image-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.postOptionsMenu":{id:"option-menu", mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:arrow_drop_down"}}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){var a=this.$["placeholder-area"],b=this.onOpen_.bind(this);a.addEventListener("tap",b);a.addEventListener("keypress",b)}; e.onYtServiceRequestSent_=function(a,b){if(!N("kevlar_command_handler")&&b.actions)for(var c=0;c\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B2a){var d=document.createElement("template");d.innerHTML=""; B2a=d}d=B2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);C2a=a}a=C2a;return a}}}); var hR=gR;hR.prototype.onPopupClosed_=hR.prototype.onPopupClosed_;hR.prototype.onYtNavigate_=hR.prototype.onYtNavigate_;hR.prototype.onIronSelect_=hR.prototype.onIronSelect_;hR.prototype.onYtVideoLinkSelected_=hR.prototype.onYtVideoLinkSelected_;hR.prototype.onYtVideoLinkButtonCancel_=hR.prototype.onYtVideoLinkButtonCancel_;hR.prototype.onYtCommentboxLoadingEnd_=hR.prototype.onYtCommentboxLoadingEnd_;hR.prototype.onYtCommentboxLoadingStart_=hR.prototype.onYtCommentboxLoadingStart_; hR.prototype.onYtCommentboxDismiss_=hR.prototype.onYtCommentboxDismiss_;hR.prototype.onYtServiceRequestSent_=hR.prototype.onYtServiceRequestSent_;w([P(Y),x("design:type",Object)],hR.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],hR.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],hR.prototype,"ytActionHandlerBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],hR.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],hR.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],hR.prototype,"isOpen_",void 0);w([R({computed:"computeCreationDisabled_(data.postCreationDisabledText)"}),x("design:type",Boolean)],hR.prototype,"creationDisabled_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],hR.prototype,"enableCreationBox",void 0); w([R({reflectToAttribute:!0,computed:"computeIsCreationDialog_(data.purpose)"}),x("design:type",Boolean)],hR.prototype,"isCreationDialog",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],hR.prototype,"inPopupContainer",void 0);w([R({reflectToAttribute:!0,computed:"computeIsCreationDialogWithHeader_(data)"}),x("design:type",Boolean)],hR.prototype,"isCreationDialogWithHeader_",void 0);w([R(),x("design:type",Object)],hR.prototype,"accessRestriction_",void 0); w([R({computed:"computeDropdownRendererClasses_(isCreationDialogWithHeader_)"}),x("design:type",Array)],hR.prototype,"dropdownRendererClasses_",void 0);w([R(),x("design:type",Object)],hR.prototype,"isCommentboxLoading_",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],hR.prototype,"onYtServiceRequestSent_",null); w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hR.prototype,"onYtCommentboxDismiss_",null);w([S("yt-commentbox-loading-start"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hR.prototype,"onYtCommentboxLoadingStart_",null); w([S("yt-commentbox-loading-end"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hR.prototype,"onYtCommentboxLoadingEnd_",null);w([S("yt-video-link-button-cancel"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hR.prototype,"onYtVideoLinkButtonCancel_",null); w([S("yt-video-link-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hR.prototype,"onYtVideoLinkSelected_",null);w([S("iron-select"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hR.prototype,"onIronSelect_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hR.prototype,"onYtNavigate_",null); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],hR.prototype,"onPopupClosed_",null);hR=w([U({is:"ytd-backstage-post-dialog-renderer"})],hR);var D2a;var E2a;var iR=function(){var a=O.apply(this,arguments)||this;a.data=null;a.disabled=!1;return a}; p(iR,O);e=iR.prototype;e.configureRendererStamper=function(){return{"data.entries":{id:"entries",mapping:{dropdownItemRenderer:"ytd-dropdown-item-renderer",privacyDropdownItemRenderer:"ytd-privacy-dropdown-item-renderer",navigationDropdownItemRenderer:"ytd-navigation-dropdown-item-renderer"}}}}; e.reset=function(){this.$.entries.selected=-1;this.$.entries.forceSynchronousItemUpdate();this.$.entries.select(this.getInitiallySelectedItem_(this.data));this.label=this.computeInitialLabel_(this.data)}; e.dataChanged_=function(){this.reset()}; e.valueChanged_=function(){var a;if(this.value&&null!==(a=this.data)&&void 0!==a&&a.entries)for(var b=k(this.data.entries),c=b.next();!c.done;c=b.next()){c=c.value;for(var d in c){var f=c[d];if(this.getItemValue_(f)===this.value){this.label=this.ytComponentBehavior.getSimpleString(f.label);return}}}}; e.computeInitialLabel_=function(a){if(!a||!a.entries)return null;for(var b=k(a.entries),c=b.next();!c.done;c=b.next()){c=c.value;for(var d in c)if(c[d].isSelected)return this.ytComponentBehavior.getSimpleString(c[d].label)}return a.label?a.label:null}; e.getInitiallySelectedItem_=function(a){if(!a||!a.entries)return null;a=k(a.entries);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c in b)if(b[c].isSelected)return this.getItemValue_(b[c])}return null}; e.getItemValue_=function(a){return a.stringValue||a.int32Value||null}; h.Object.defineProperties(iR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===E2a){var a=document.createElement("template");a.innerHTML="\n \n
[[label]]
\n \n \n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D2a){var d=document.createElement("template");d.innerHTML=""; D2a=d}d=D2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);E2a=a}a=E2a;return a}}}); var jR=iR;w([P(AO.YtComponentBehavior),x("design:type",Object)],jR.prototype,"ytComponentBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],jR.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],jR.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],jR.prototype,"data",void 0);w([R({notify:!0,observer:"valueChanged_"}),x("design:type",Object)],jR.prototype,"value",void 0); w([R(),x("design:type",Object)],jR.prototype,"label",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],jR.prototype,"disabled",void 0);jR=w([U({is:"ytd-flat-dropdown-renderer"})],jR);var F2a;var G2a;var kR=function(){var a=O.apply(this,arguments)||this;a.boundCaptureFocus=a.onCaptureFocus.bind(a);return a}; p(kR,O);e=kR.prototype;e.attached=function(){document.addEventListener("focus",this.boundCaptureFocus,!0)}; e.detached=function(){document.removeEventListener("focus",this.boundCaptureFocus)}; e.onCaptureFocus=function(a){-1!==Polymer.dom(a).path.indexOf(this)&&this.item.focus()}; e.getIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; e.onSelect=function(){var a,b,c;if(null===(a=this.data)||void 0===a?0:a.onSelectCommand)(null===(c=null===(b=this.data.onSelectCommand.commandMetadata)||void 0===b?void 0:b.webCommandMetadata)||void 0===c?0:c.url)?this.fire("yt-navigate",{endpoint:this.data.onSelectCommand}):this.ytActionSenderBehavior.sendServiceRequestAction([this.data.onSelectCommand])}; h.Object.defineProperties(kR.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.data?CL(this.data.label):""}}, value:{configurable:!0,enumerable:!0,get:function(){return this.data?"string"===typeof this.data.stringValue?this.data.stringValue:"number"===typeof this.data.int32Value?this.data.int32Value:null:null}}}); h.Object.defineProperties(kR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===G2a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F2a){var d=document.createElement("template");d.innerHTML=""; F2a=d}d=F2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);G2a=a}a=G2a;return a}}}); var lR=kR;w([P(W.YtRendererBehavior),x("design:type",Object)],lR.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],lR.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],lR.prototype,"data",void 0);w([AE("#item"),x("design:type",HTMLElement)],lR.prototype,"item",void 0);w([zE("data.label"),x("design:type",String),x("design:paramtypes",[])],lR.prototype,"label",null); w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],lR.prototype,"value",null);lR=w([U({is:"ytd-privacy-dropdown-item-renderer"})],lR);var H2a;var I2a;var J2a,mR=function(){return O.apply(this,arguments)||this}; p(mR,O);mR.prototype.computeThumbnailWidth=function(a){if("BACKSTAGE_SURFACE_TYPE_STREAM"===a)return J2a.communityTabWidth}; h.Object.defineProperties(mR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===I2a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H2a){var d=document.createElement("template");d.innerHTML=""; H2a=d}d=H2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);I2a=a}a=I2a;return a}}}); var nR=J2a=mR;nR.communityTabWidth=638;w([P(W.YtRendererBehavior),x("design:type",Object)],nR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],nR.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],nR.prototype,"icon",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],nR.prototype,"surface",void 0);nR=J2a=w([U({is:"ytd-backstage-image-renderer"})],nR);var K2a;var L2a;var oR=function(){var a=O.apply(this,arguments)||this;a.errorMessage="";a.hasPreview=!1;a.isBackstagePost=!1;return a}; p(oR,O);e=oR.prototype;e.configureRendererStamper=function(){return{selectionCancel:{id:"selection-cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}},previewCancel:{id:"preview-cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.selectButton":{id:"select",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.detached=function(){this.removeOverlay()}; e.setPreview=function(a){Polymer.dom(this.root).querySelector("#preview-picker").imageData=a;this.hasPreview=!0;this.fire("yt-backstage-image-select-preview")}; e.cancel=function(){this.errorMessage="";this.overlay&&this.overlay.cancel();this.hasPreview=!1;var a=Polymer.dom(this.root).querySelector("#dropzone");a.classList.remove("dragover");a.classList.remove("error");this.fire("yt-backstage-image-select-cancel")}; e.setupOverlay=function(a){this.removeOverlay();if(a&&a.imageValidationInfo){var b=Polymer.dom(this.root).querySelector("#dropzone"),c=Polymer.dom(this.root).querySelector("#select");this.overlay=new CJ(a.uploadUrl,a.channelId,a.imageValidationInfo.maxFileSizeMb,a.imageValidationInfo.allowedMaxAspectRatio,b,c,!0);si(this.overlay,"yt.comments.ImageUploadOverlay.CHANGE_EVENT",this.onPreview,!1,this);si(this.overlay,"yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT",this.onImageError,!1,this);si(this.overlay, "yt.comments.ImageUploadOverlay.HOVER_EVENT",this.onDragOver,!1,this);si(this.overlay,"yt.comments.ImageUploadOverlay.INVALID_EVENT",this.onImageError,!1,this);si(this.overlay,"yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT",this.onImageAlert,!1,this)}}; e.removeOverlay=function(){this.overlay&&(vi(this.overlay,"yt.comments.ImageUploadOverlay.INVALID_EVENT",this.onImageError,!1,this),vi(this.overlay,"yt.comments.ImageUploadOverlay.HOVER_EVENT",this.onDragOver,!1,this),vi(this.overlay,"yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT",this.onImageError,!1,this),vi(this.overlay,"yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT",this.onImageAlert,!1,this),vi(this.overlay,"yt.comments.ImageUploadOverlay.CHANGE_EVENT",this.onPreview,!1, this),this.overlay.dispose(),this.overlay=void 0)}; e.onDragOver=function(a){var b=Polymer.dom(this.root).querySelector("#dropzone");this.toggleClass("dragover",a.value,b)}; e.onPreview=function(a){this.setPreview(a.value)}; e.onImageError=function(a){var b,c,d;if("yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT"===a.type)a=null===(b=this.data)||void 0===b?void 0:b.fileSizeError;else if("yt.comments.ImageUploadOverlay.INVALID_EVENT"===a.type)a=null===(c=this.data)||void 0===c?void 0:c.invalidError;else if("yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT"===a.type)a=null===(d=this.data)||void 0===d?void 0:d.invalidAspectRatioError;else return;this.errorMessage=CL(a);Polymer.dom(this.root).querySelector("#dropzone").classList.add("error")}; e.onImageAlert=function(a){this.onImageError(a)}; e.uploadPromise=function(){var a=this,b=this.overlay&&this.overlay.uploadPromise();if(b)return b.catch(function(){throw Error(a.data?CL(a.data.uploadFailureError):"")}.bind(this))}; h.Object.defineProperties(oR.prototype,{selectionCancel:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.cancelButton}}, previewCancel:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.cancelButton}}, icon:{configurable:!0,enumerable:!0,get:function(){var a,b;if(null!==(b=null===(a=this.data)||void 0===a?void 0:a.icon)&&void 0!==b&&b.iconType)return zO(this.data.icon.iconType)}}}); h.Object.defineProperties(oR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===L2a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K2a){var d=document.createElement("template");d.innerHTML=""; K2a=d}d=K2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);L2a=a}a=L2a;return a}}}); var pR=oR;w([P(Y),x("design:type",Object)],pR.prototype,"rendererStamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],pR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],pR.prototype,"data",void 0);w([R({observer:"setupOverlay"}),x("design:type",Object)],pR.prototype,"imageUploadEndpoint",void 0);w([R(),x("design:type",Object)],pR.prototype,"errorMessage",void 0);w([R(),x("design:type",CJ)],pR.prototype,"overlay",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],pR.prototype,"hasPreview",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],pR.prototype,"isBackstagePost",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],pR.prototype,"selectionCancel",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],pR.prototype,"previewCancel",null);w([zE("data.icon.iconType"),x("design:type",Object),x("design:paramtypes",[])],pR.prototype,"icon",null); pR=w([U({is:"ytd-backstage-image-select-renderer"})],pR);var M2a={imageHorizontalPosition:"IMAGE_HORIZONTAL_POSITION_LABEL",imageVerticalPosition:"IMAGE_VERTICAL_POSITION_LABEL",horizontalRepositionInstruction:"REPOSITION_IMAGE_HORIZONTALLY_LABEL",verticalRepositionInstruction:"REPOSITION_IMAGE_VERTICALLY_LABEL",reachTopOfImage:"REACH_TOP_OF_IMAGE_TEXT",reachBottomOfImage:"REACH_BOTTOM_OF_IMAGE_TEXT",reachLeftOfImage:"REACH_LEFT_OF_IMAGE_TEXT",reachRightOfImage:"REACH_RIGHT_OF_IMAGE_TEXT"};var N2a;var O2a;function qR(a,b){return Math.round(a/1E-5)===Math.round(b/1E-5)} var rR=function(){var a=O.apply(this,arguments)||this;a.a11yConfig=M2a;a.imageDisplayOffsetTop=0;a.imageDisplayOffsetLeft=0;a.pickerDisplayOffsetTop=0;a.pickerDisplayOffsetLeft=0;a.cropCoordinatesSaved=!1;a.previewSize=0;a.startPicker=!1;a.repositionOptional=!1;return a}; p(rR,O);e=rR.prototype;e.created=function(){Polymer.IronA11yAnnouncer.requestAvailability()}; e.ready=function(){this.keyboardInterfaceTarget=this.imageInBackground}; e.onArrowKeysDown=function(a){if(!this.cropCoordinatesSaved&&this.pickerSize&&this.imageHeight&&this.imageWidth&&this.displayScale){a.detail.keyboardEvent.preventDefault();var b=0,c=0,d="";switch(a.detail.keyboardEvent.key){case"ArrowUp":qR(this.imageDisplayOffsetTop+this.imageHeight,this.pickerDisplayOffsetTop+this.pickerSize)?d=this.a11yConfig.reachBottomOfImage:b=-.05*this.imageHeight;break;case"ArrowDown":qR(this.pickerDisplayOffsetTop,this.imageDisplayOffsetTop)?d=this.a11yConfig.reachTopOfImage: b=.05*this.imageHeight;break;case"ArrowLeft":qR(this.pickerDisplayOffsetLeft+this.pickerSize,this.imageDisplayOffsetLeft+this.imageWidth)?d=this.a11yConfig.reachRightOfImage:c=-.05*this.imageWidth;break;case"ArrowRight":qR(this.pickerDisplayOffsetLeft,this.imageDisplayOffsetLeft)?d=this.a11yConfig.reachLeftOfImage:c=.05*this.imageWidth;}d&&mL(d)&&this.fire("iron-announce",{text:mL(d)});if(c||b)this.imageHeight>this.imageWidth?(this.imageDisplayOffsetTop=Math.min(this.pickerDisplayOffsetTop,Math.max(this.pickerDisplayOffsetTop+ this.pickerSize-this.imageHeight,this.imageDisplayOffsetTop+b)),a=this.getPreviewPosition(this.pickerDisplayOffsetTop,this.pickerSize,this.imageDisplayOffsetTop,this.imageHeight),a=mL(this.a11yConfig.imageVerticalPosition,{x_percent:""+a,y_percent:""+(100-a)})):(this.imageDisplayOffsetLeft=Math.min(this.pickerDisplayOffsetLeft,Math.max(this.pickerDisplayOffsetLeft+this.pickerSize-this.imageWidth,this.imageDisplayOffsetLeft+c)),a=this.getPreviewPosition(this.pickerDisplayOffsetLeft,this.pickerSize, this.imageDisplayOffsetLeft,this.imageWidth),a=mL(this.a11yConfig.imageHorizontalPosition,{x_percent:""+a,y_percent:""+(100-a)})),a&&this.fire("iron-announce",{text:a})}}; e.getPreviewPosition=function(a,b,c,d){return Math.round(100*(a+.5*b-c)/d)}; e.displayImage=function(){var a=this.pickerContainer.getBoundingClientRect().width,b=this.pickerContainer.getBoundingClientRect().height,c=Math.min(this.picker.getBoundingClientRect().height,this.picker.getBoundingClientRect().width),d=this.imageInBackground.naturalWidth,f=this.imageInBackground.naturalHeight;this.displayScale=Math.max(c/d,c/f);this.imageWidth=d*this.displayScale;this.imageHeight=f*this.displayScale;this.pickerDisplayOffsetLeft=(a-c)/2;this.pickerDisplayOffsetTop=(b-c)/2;this.imageDisplayOffsetLeft= f>d?this.pickerDisplayOffsetLeft:(a-this.imageWidth)/2;this.imageDisplayOffsetTop=d>f?this.pickerDisplayOffsetTop:(b-this.imageHeight)/2;this.repositionOptional&&this.saveCropCoordinates()}; e.onImageDataChange=function(){this.imageData&&(this.pickerDisplayOffsetLeft=this.pickerDisplayOffsetTop=0,this.cropCoordinatesSaved=!1,vc(this.imageInBackground,this.imageData),vc(this.imageInPicker,this.imageData),vc(this.imageInPreviewClipper,this.imageData),vc(this.imageAsPreview,this.imageData))}; e.getSignedPosition=function(a,b,c){return"X"===b&&"rtl"===A("HTML_DIR")?"-"===c?a+"px":-1*a+"px":"-"===c?-1*a+"px":a+"px"}; e.pickerMove=function(a){if(this.startPicker&&!this.cropCoordinatesSaved&&this.pickerSize&&void 0!==this.pickerOffsetX&&void 0!==this.pickerOffsetY&&this.imageHeight&&this.imageWidth&&this.displayScale){var b=this.pickerOffsetX-a.clientX,c=this.pickerOffsetY-a.clientY;this.pickerOffsetX=a.clientX;this.pickerOffsetY=a.clientY;this.imageHeight>this.imageWidth?this.imageDisplayOffsetTop=Math.min(this.pickerDisplayOffsetTop,Math.max(this.pickerDisplayOffsetTop+this.pickerSize-this.imageHeight,this.imageDisplayOffsetTop- c)):this.imageDisplayOffsetLeft=Math.min(this.pickerDisplayOffsetLeft,Math.max(this.pickerDisplayOffsetLeft+this.pickerSize-this.imageWidth,this.imageDisplayOffsetLeft-b))}}; e.pickerMoveStart=function(a){this.startPicker=!0;this.pickerOffsetX=a.clientX;this.pickerOffsetY=a.clientY}; e.pickerMoveComplete=function(){this.startPicker=!1;this.pickerOffsetY=this.pickerOffsetX=void 0}; e.saveCropCoordinates=function(){this.cropCoordinatesSaved?(this.cropCoordinatesSaved=!1,this.previewSize=0,this.fire("yt-img-crop-reposition")):(this.startPicker=!1,this.generateCropPreview())}; e.getPreviewOffset=function(a,b,c,d){return b&&a&&c?("X"===d&&"rtl"===A("HTML_DIR")?c/b*a:c/b*a*-1)+"px":"0px"}; e.getSimpleText=function(a){return a?CL(a):""}; e.generateCropPreview=function(){if(this.imageWidth&&this.imageHeight&&this.pickerSize){this.cropCoordinatesSaved=!0;var a=this.cropOffsetTop/this.imageHeight,b=(this.cropOffsetLeft+this.pickerSize)/this.imageWidth,c=(this.cropOffsetTop+this.pickerSize)/this.imageHeight,d=this.cropOffsetLeft/this.imageWidth;this.previewSize=Polymer.dom(this.root).querySelector("#preview-clipper").getBoundingClientRect().width;this.fire("yt-img-crop-coordinates-update",{top:a,right:b,bottom:c,left:d})}}; h.Object.defineProperties(rR.prototype,{altLabelForImage:{configurable:!0,enumerable:!0,get:function(){if(!this.imageWidth||!this.imageHeight||!this.pickerSize)return"";if(this.imageHeight>this.imageWidth){var a=this.getPreviewPosition(this.pickerDisplayOffsetTop,this.pickerSize,this.imageDisplayOffsetTop,this.imageHeight);return mL(this.a11yConfig.imageVerticalPosition,{x_percent:""+a,y_percent:""+(100-a)})+"\n"+mL(this.a11yConfig.verticalRepositionInstruction)}a=this.getPreviewPosition(this.pickerDisplayOffsetLeft, this.pickerSize,this.imageDisplayOffsetLeft,this.imageWidth);return mL(this.a11yConfig.imageHorizontalPosition,{x_percent:""+a,y_percent:""+(100-a)})+"\n"+mL(this.a11yConfig.horizontalRepositionInstruction)}}, pickerSize:{configurable:!0,enumerable:!0,get:function(){return this.imageHeight&&this.imageWidth?this.imageHeight>this.imageWidth?this.imageWidth:this.imageHeight:0}}, imageOrientationStyle:{configurable:!0,enumerable:!0,get:function(){if(this.imageHeight&&this.imageWidth)return this.imageHeight===this.imageWidth?"SQUARE":this.imageHeight>this.imageWidth?"PORTRAIT":"LANDSCAPE"}}, editButton:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.previewInstruction&&this.instruction.previewInstruction.editButtonLabel)return{size:"SIZE_SMALL",style:"STYLE_SUGGESTIVE",text:this.instruction.previewInstruction.editButtonLabel,accessibilityData:{accessibilityData:{label:this.getSimpleText(this.instruction.previewInstruction.editButtonLabel)}}}}}, saveButton:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.editInstruction&&this.instruction.editInstruction.saveButtonLabel)return{style:"STYLE_PRIMARY",size:"SIZE_SMALL",text:this.instruction.editInstruction.saveButtonLabel,accessibilityData:{accessibilityData:{label:this.getSimpleText(this.instruction.editInstruction.saveButtonLabel)}}}}}, cropOffsetTop:{configurable:!0,enumerable:!0,get:function(){return void 0===this.imageDisplayOffsetTop||void 0===this.pickerDisplayOffsetTop?0:this.pickerDisplayOffsetTop-this.imageDisplayOffsetTop}}, cropOffsetLeft:{configurable:!0,enumerable:!0,get:function(){return void 0===this.imageDisplayOffsetLeft||void 0===this.pickerDisplayOffsetLeft?0:this.pickerDisplayOffsetLeft-this.imageDisplayOffsetLeft}}, pickerBackgroundStyle:{configurable:!0,enumerable:!0,get:function(){return dc({transform:"translateX("+this.getSignedPosition(this.imageDisplayOffsetLeft,"X",void 0)+") translateY("+this.getSignedPosition(this.imageDisplayOffsetTop,"Y",void 0)+")"})}}, pickerDisplayStyle:{configurable:!0,enumerable:!0,get:function(){return dc({width:this.pickerSize+"px",height:this.pickerSize+"px",transform:"translateX("+this.getSignedPosition(this.pickerDisplayOffsetLeft,"X",void 0)+") translateY("+this.getSignedPosition(this.pickerDisplayOffsetTop,"Y",void 0)+")"})}}, imageInPickerStyle:{configurable:!0,enumerable:!0,get:function(){return dc({transform:"translateX("+this.getSignedPosition(this.cropOffsetLeft,"X","-")+") translateY("+this.getSignedPosition(this.cropOffsetTop,"Y","-")+")"})}}, previewClipperStyle:{configurable:!0,enumerable:!0,get:function(){return dc({transform:"translateX("+this.getPreviewOffset(this.cropOffsetLeft,this.pickerSize,this.previewSize,"X")+") translateY("+this.getPreviewOffset(this.cropOffsetTop,this.pickerSize,this.previewSize,"Y")+")"})}}, pickerModeStyle:{configurable:!0,enumerable:!0,get:function(){return this.cropCoordinatesSaved?"preview":"edit"}}, learnMore:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.editInstruction)return this.instruction.editInstruction.learnMore}}, learnMoreUrl:{configurable:!0,enumerable:!0,get:function(){if(this.learnMore&&this.learnMore.runs&&this.learnMore.runs[0]&&this.learnMore.runs[0].navigationEndpoint&&this.learnMore.runs[0].navigationEndpoint.urlEndpoint)return this.learnMore.runs[0].navigationEndpoint.urlEndpoint.url}}}); h.Object.defineProperties(rR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O2a){var a=document.createElement("template");a.innerHTML="
\"[[altLabelForImage]]\"
\"\"
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N2a){var d=document.createElement("template");d.innerHTML=""; N2a=d}d=N2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O2a=a}a=O2a;return a}}}); var sR=rR;sR.prototype.onImageDataChange=sR.prototype.onImageDataChange;w([R(),x("design:type",Object)],sR.prototype,"imageData",void 0);w([R(),x("design:type",Object)],sR.prototype,"instruction",void 0);w([R(),x("design:type",Object)],sR.prototype,"a11yConfig",void 0);w([R(),x("design:type",Number)],sR.prototype,"imageWidth",void 0);w([R(),x("design:type",Number)],sR.prototype,"imageHeight",void 0);w([R(),x("design:type",Number)],sR.prototype,"displayScale",void 0); w([R(),x("design:type",Object)],sR.prototype,"imageDisplayOffsetTop",void 0);w([R(),x("design:type",Object)],sR.prototype,"imageDisplayOffsetLeft",void 0);w([R(),x("design:type",Object)],sR.prototype,"pickerDisplayOffsetTop",void 0);w([R(),x("design:type",Object)],sR.prototype,"pickerDisplayOffsetLeft",void 0);w([R(),x("design:type",Object)],sR.prototype,"cropCoordinatesSaved",void 0);w([R(),x("design:type",Object)],sR.prototype,"previewSize",void 0); w([R(),x("design:type",Object)],sR.prototype,"startPicker",void 0);w([R(),x("design:type",Number)],sR.prototype,"pickerOffsetX",void 0);w([R(),x("design:type",Number)],sR.prototype,"pickerOffsetY",void 0);w([R(),x("design:type",Object)],sR.prototype,"repositionOptional",void 0);w([AE("#picker-container"),x("design:type",HTMLElement)],sR.prototype,"pickerContainer",void 0);w([AE("#picker"),x("design:type",HTMLElement)],sR.prototype,"picker",void 0); w([AE("#image-in-picker-background"),x("design:type",HTMLImageElement)],sR.prototype,"imageInBackground",void 0);w([AE("#image-in-picker"),x("design:type",HTMLImageElement)],sR.prototype,"imageInPicker",void 0);w([AE("#image-in-preview-clipper"),x("design:type",HTMLImageElement)],sR.prototype,"imageInPreviewClipper",void 0);w([AE("#full-image-as-preview"),x("design:type",HTMLImageElement)],sR.prototype,"imageAsPreview",void 0); w([zE("pickerSize","imageWidth","imageHeight","pickerDisplayOffsetTop","imageDisplayOffsetTop"),x("design:type",String),x("design:paramtypes",[])],sR.prototype,"altLabelForImage",null);w([zE("imageHeight","imageWidth"),x("design:type",Number),x("design:paramtypes",[])],sR.prototype,"pickerSize",null);w([zE("imageHeight","imageWidth"),x("design:type",Object),x("design:paramtypes",[])],sR.prototype,"imageOrientationStyle",null); w([zE("instruction.previewInstruction.editButtonLabel"),x("design:type",Object),x("design:paramtypes",[])],sR.prototype,"editButton",null);w([zE("instruction.editInstruction.saveButtonLabel"),x("design:type",Object),x("design:paramtypes",[])],sR.prototype,"saveButton",null);w([zE("imageDisplayOffsetTop","pickerDisplayOffsetTop"),x("design:type",Number),x("design:paramtypes",[])],sR.prototype,"cropOffsetTop",null); w([zE("imageDisplayOffsetLeft","pickerDisplayOffsetLeft"),x("design:type",Number),x("design:paramtypes",[])],sR.prototype,"cropOffsetLeft",null);w([zE("imageDisplayOffsetLeft","imageDisplayOffsetTop"),x("design:type",cc),x("design:paramtypes",[])],sR.prototype,"pickerBackgroundStyle",null);w([zE("pickerDisplayOffsetLeft","pickerDisplayOffsetTop"),x("design:type",cc),x("design:paramtypes",[])],sR.prototype,"pickerDisplayStyle",null); w([zE("cropOffsetLeft","cropOffsetTop"),x("design:type",cc),x("design:paramtypes",[])],sR.prototype,"imageInPickerStyle",null);w([zE("cropOffsetLeft","cropOffsetTop","pickerSize","previewSize"),x("design:type",cc),x("design:paramtypes",[])],sR.prototype,"previewClipperStyle",null);w([yE("imageData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],sR.prototype,"onImageDataChange",null); w([zE("cropCoordinatesSaved"),x("design:type",String),x("design:paramtypes",[])],sR.prototype,"pickerModeStyle",null);w([zE("instruction.editInstruction.learnMore"),x("design:type",Object),x("design:paramtypes",[])],sR.prototype,"learnMore",null);w([zE("learnMore"),x("design:type",Object),x("design:paramtypes",[])],sR.prototype,"learnMoreUrl",null);sR=w([uO({is:"yt-img-crop-picker",noInjection:!0})],sR);var P2a;var Q2a;var tR=function(){var a=O.apply(this,arguments)||this;a.isLoading_=!1;a.selectedItemIndex_=-1;a.showPollChoiceBorder=N("enable_poll_choice_border_on_web");return a}; p(tR,O);e=tR.prototype;e.computeIsChannelOwner_=function(a){if(!a)return!0;a=a[0];return!(a&&(a.signinEndpoint||a.selectServiceEndpoint))}; e.computePollClass_=function(a){if(!a)return"";a=CL(a.totalVotes);return this.isChannelOwner_&&"0"==a[0]?"owner-no-vote":""}; e.styleWidth_=function(a){return dc({width:(a?100*a:0)+"%"})}; e.dataChanged_=function(a){if(a&&(this.isLoading_=!1,this.previousPollInfo_=null,a.choices)){a=a.choices;for(var b=0;b\n\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P2a){var d=document.createElement("template");d.innerHTML=""; P2a=d}d=P2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Q2a=a}a=Q2a;return a}}}); var uR=tR;uR.prototype.onYtServiceRequestCompleted_=uR.prototype.onYtServiceRequestCompleted_;uR.prototype.onYtServiceRequestSent_=uR.prototype.onYtServiceRequestSent_;uR.prototype.onYtCommentPollRevert_=uR.prototype.onYtCommentPollRevert_;uR.prototype.onPopupClosed_=uR.prototype.onPopupClosed_;w([P(Polymer.PaperItemBehavior),x("design:type",Object)],uR.prototype,"paperItemBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],uR.prototype,"ytActionSenderBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],uR.prototype,"ytRendererBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],uR.prototype,"ytdOpenPopupBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],uR.prototype,"data",void 0);w([R(),x("design:type",Object)],uR.prototype,"isLoading_",void 0);w([R({computed:"computeIsChannelOwner_(data.choices)"}),x("design:type",Boolean)],uR.prototype,"isChannelOwner_",void 0); w([R(),x("design:type",Object)],uR.prototype,"previousPollInfo_",void 0);w([R(),x("design:type",Object)],uR.prototype,"selectedItemIndex_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],uR.prototype,"showPollChoiceBorder",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],uR.prototype,"onPopupClosed_",null); w([S("yt-comment-poll-revert"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],uR.prototype,"onYtCommentPollRevert_",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],uR.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],uR.prototype,"onYtServiceRequestCompleted_",null);uR=w([U({is:"ytd-backstage-poll-renderer"})],uR);var R2a;var S2a;var T2a=function(){return O.apply(this,arguments)||this}; p(T2a,O); h.Object.defineProperties(T2a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===S2a){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.lengthText)]]
";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R2a){var d=document.createElement("template");d.innerHTML=""; R2a=d}d=R2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);S2a=a}a=S2a;return a}}}); var vR=T2a;w([P(AO.YtComponentBehavior),x("design:type",Object)],vR.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],vR.prototype,"data",void 0);vR=w([U({is:"ytd-child-video-renderer"})],vR);var U2a;var V2a;iP("itemSectionRenderer","playlistRenderer","ytd-playlist-renderer");var wR=function(){var a=O.apply(this,arguments)||this;a.displayItemCount=2;a.isBackstagePlaylist=!1;a.isPostCompactPlaylist=!1;return a}; p(wR,O);e=wR.prototype;e.computeFirstVideos=function(a,b){return void 0===a||void 0===b?[]:a.slice(0,b)}; e.dataChanged=function(a){a&&a.thumbnailRenderer&&(a=a.thumbnailRenderer,a.playlistVideoThumbnailRenderer&&this.set("data.thumbnail",a.playlistVideoThumbnailRenderer.thumbnail),a.playlistCustomThumbnailRenderer&&this.set("data.thumbnail",a.playlistCustomThumbnailRenderer.thumbnail))}; e.computeThumbnailHeight=function(a,b,c){return c?240:b?72:a?118:138}; e.computeThumbnailWidth=function(a,b,c,d){return c?"BIG1"===d?340:"BIG2"===d?320:"MEDIUM1"===d?300:"MEDIUM2"===d?280:360:b?128:a?210:246}; e.computeUseProminentThumbs=function(a){return a&&N("desktop_search_prominent_thumbs")}; h.Object.defineProperties(wR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===V2a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U2a){var d=document.createElement("template");d.innerHTML=""; U2a=d}d=U2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);V2a=a}a=V2a;return a}}}); var xR=wR;xR.prototype.dataChanged=xR.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],xR.prototype,"ytRendererBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],xR.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],xR.prototype,"data",void 0);w([R(),x("design:type",Object)],xR.prototype,"displayItemCount",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],xR.prototype,"isBackstagePlaylist",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],xR.prototype,"isPostCompactPlaylist",void 0);w([R({value:!1}),x("design:type",Boolean)],xR.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,computed:"computeUseProminentThumbs(isSearch)"}),x("design:type",Boolean)],xR.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return fk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],xR.prototype,"prominentThumbStyle",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],xR.prototype,"dataChanged",null);xR=w([U({is:"ytd-playlist-renderer"})],xR);var W2a;var X2a;var Y2a=function(){return O.apply(this,arguments)||this}; p(Y2a,O); h.Object.defineProperties(Y2a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===X2a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W2a){var d=document.createElement("template");d.innerHTML=""; W2a=d}d=W2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);X2a=a}a=X2a;return a}}}); var yR=Y2a;w([P(W.YtRendererBehavior),x("design:type",Object)],yR.prototype,"ytRendererBehavior",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],yR.prototype,"watchFeedThumbnail",void 0);w([R(),x("design:type",Object)],yR.prototype,"data",void 0);w([R(),x("design:type",Number)],yR.prototype,"size",void 0);yR=w([U({is:"ytd-playlist-custom-thumbnail-renderer"})],yR);var Z2a;var $2a;var a3a=function(){return O.apply(this,arguments)||this}; p(a3a,O); h.Object.defineProperties(a3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$2a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z2a){var d=document.createElement("template");d.innerHTML=""; Z2a=d}d=Z2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$2a=a}a=$2a;return a}}}); var zR=a3a;w([P(W.YtRendererBehavior),x("design:type",Object)],zR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],zR.prototype,"data",void 0);w([R(),x("design:type",Number)],zR.prototype,"width",void 0);zR=w([U({is:"ytd-playlist-video-thumbnail-renderer"})],zR);var b3a;var c3a;var d3a=function(){return O.apply(this,arguments)||this}; p(d3a,O); h.Object.defineProperties(d3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===c3a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===b3a){var d=document.createElement("template");d.innerHTML=""; b3a=d}d=b3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);c3a=a}a=c3a;return a}}}); var AR=d3a;w([P(W.YtRendererBehavior),x("design:type",Object)],AR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],AR.prototype,"data",void 0);w([R(),x("design:type",Number)],AR.prototype,"width",void 0);AR=w([U({is:"ytd-show-custom-thumbnail-renderer"})],AR);var e3a;var f3a;var BR=function(){return O.apply(this,arguments)||this}; p(BR,O);h.Object.defineProperties(BR.prototype,{overlayStyle:{configurable:!0,enumerable:!0,get:function(){return N("enable_programmed_playlist_redesign")&&this.data.text&&this.data.icon?!0:!1}}}); h.Object.defineProperties(BR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===f3a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e3a){var d=document.createElement("template");d.innerHTML=""; e3a=d}d=e3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);f3a=a}a=f3a;return a}}}); var CR=BR;w([P(W.YtRendererBehavior),x("design:type",Object)],CR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],CR.prototype,"data",void 0);w([R({reflectToAttribute:!0}),zE("data.icon","data.text"),x("design:type",Object),x("design:paramtypes",[])],CR.prototype,"overlayStyle",null);CR=w([U({is:"ytd-thumbnail-overlay-bottom-panel-renderer"})],CR);var g3a;var h3a;var DR=function(){return O.apply(this,arguments)||this}; p(DR,O);h.Object.defineProperties(DR.prototype,{text:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.ytRendererBehavior.getSimpleString(this.data.text)}}}); h.Object.defineProperties(DR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===h3a){var a=document.createElement("template");a.innerHTML="\n[[text]]\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g3a){var d=document.createElement("template");d.innerHTML=""; g3a=d}d=g3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);h3a=a}a=h3a;return a}}}); var ER=DR;w([P(W.YtRendererBehavior),x("design:type",Object)],ER.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],ER.prototype,"data",void 0);w([zE("data.text"),x("design:type",Object),x("design:paramtypes",[])],ER.prototype,"text",null);ER=w([U({is:"ytd-thumbnail-overlay-hover-text-renderer"})],ER);var i3a;var j3a;var k3a=function(){return O.apply(this,arguments)||this}; p(k3a,O); h.Object.defineProperties(k3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===j3a){var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.text)]]\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===i3a){var d=document.createElement("template");d.innerHTML=""; i3a=d}d=i3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);j3a=a}a=j3a;return a}}}); var FR=k3a;w([P(W.YtRendererBehavior),x("design:type",Object)],FR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],FR.prototype,"data",void 0);FR=w([U({is:"ytd-thumbnail-overlay-now-playing-renderer"})],FR);var l3a;var m3a;var n3a=function(){return O.apply(this,arguments)||this}; p(n3a,O); h.Object.defineProperties(n3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===m3a){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l3a){var d=document.createElement("template");d.innerHTML=""; l3a=d}d=l3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);m3a=a}a=m3a;return a}}}); var GR=n3a;w([P(W.YtRendererBehavior),x("design:type",Object)],GR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],GR.prototype,"data",void 0);GR=w([U({is:"ytd-thumbnail-overlay-playback-status-renderer"})],GR);var o3a;var p3a;var HR=function(){return O.apply(this,arguments)||this}; p(HR,O);HR.prototype.onDurationChanged=function(a){this.$.progress.style.width=a+"%"}; h.Object.defineProperties(HR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===p3a){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===o3a){var d=document.createElement("template");d.innerHTML=""; o3a=d}d=o3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);p3a=a}a=p3a;return a}}}); var IR=HR;IR.prototype.onDurationChanged=IR.prototype.onDurationChanged;w([P(AO.YtComponentBehavior),x("design:type",Object)],IR.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],IR.prototype,"data",void 0);w([yE("data.percentDurationWatched"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],IR.prototype,"onDurationChanged",null);IR=w([U({is:"ytd-thumbnail-overlay-resume-playback-renderer"})],IR);var q3a;var r3a;var JR=function(){var a=O.apply(this,arguments)||this;a.bottomPanel=!1;a.richGridOverlay=!1;a.watchFeedOverlay=!1;return a}; p(JR,O);JR.prototype.widthChanged=function(){this.watchFeedOverlay?this.style.width="":this.richGridOverlay||(this.style.width=this.width+"px")}; h.Object.defineProperties(JR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===r3a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===q3a){var d=document.createElement("template");d.innerHTML=""; q3a=d}d=q3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);r3a=a}a=r3a;return a}}}); var KR=JR;KR.prototype.widthChanged=KR.prototype.widthChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],KR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],KR.prototype,"data",void 0);w([R(),x("design:type",Number)],KR.prototype,"width",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],KR.prototype,"bottomPanel",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],KR.prototype,"richGridOverlay",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],KR.prototype,"watchFeedOverlay",void 0);w([yE("width","watchFeedOverlay"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],KR.prototype,"widthChanged",null);KR=w([U({is:"ytd-thumbnail-overlay-side-panel-renderer"})],KR);var s3a;var t3a;var LR=function(){var a=O.apply(this,arguments)||this;a.hasIcon=!1;return a}; p(LR,O);LR.prototype.dataChanged=function(){this.data&&(this.hasIcon=!!this.data.icon)}; h.Object.defineProperties(LR.prototype,{overlayStyle:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.style)return this.data.style}}, overlayType:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.type)return this.data.type.replace("THUMBNAIL_OVERLAY_TIME_STATUS_TYPE_","")}}}); h.Object.defineProperties(LR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===t3a){var a=document.createElement("template");a.innerHTML="\n [[getSimpleString(data.text)]]\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s3a){var d=document.createElement("template");d.innerHTML=""; s3a=d}d=s3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t3a=a}a=t3a;return a}}}); var MR=LR;MR.prototype.dataChanged=MR.prototype.dataChanged;w([P(AO.YtComponentBehavior),x("design:type",Object)],MR.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],MR.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],MR.prototype,"icon",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],MR.prototype,"hasIcon",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],MR.prototype,"dataChanged",null);w([R({reflectToAttribute:!0}),zE("data.style"),x("design:type",Object),x("design:paramtypes",[])],MR.prototype,"overlayStyle",null);w([R({reflectToAttribute:!0}),zE("data.type"),x("design:type",Object),x("design:paramtypes",[])],MR.prototype,"overlayType",null);MR=w([U({is:"ytd-thumbnail-overlay-time-status-renderer"})],MR);var u3a;var v3a;var NR=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-miniplayer-endpoint-changed":"checkMiniplayer_"};return a}; p(NR,O);NR.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; NR.prototype.configureRendererStamper=function(){return{"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayBottomPanelRenderer:"ytd-thumbnail-overlay-bottom-panel-renderer",thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]", bottomPanel:"[[bottomSidePanel]]",watchFeedOverlay:"[[watchFeedThumbnail]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer",thumbnailOverlayNowPlayingRenderer:"ytd-thumbnail-overlay-now-playing-renderer"}},hoverOverlays_:{id:"hover-overlays",mapping:{thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer"}},"data.thumbnailRenderer":{id:"playlist-thumbnails",mapping:{playlistVideoThumbnailRenderer:{component:"ytd-playlist-video-thumbnail-renderer", properties:{width:"[[width]]"}},playlistCustomThumbnailRenderer:{component:"ytd-playlist-custom-thumbnail-renderer",properties:{size:"[[customThumbnailSize]]",watchFeedThumbnail:"[[watchFeedThumbnail]]"}},showCustomThumbnailRenderer:{component:"ytd-show-custom-thumbnail-renderer",properties:{width:"[[width]]"}}}}}}; h.Object.defineProperties(NR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v3a){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u3a){var d=document.createElement("template");d.innerHTML=""; u3a=d}d=u3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v3a=a}a=v3a;return a}}}); var OR=NR;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],OR.prototype,"ytActionHandlerBehavior",void 0);w([P(Y),x("design:type",Object)],OR.prototype,"ytRendererstamperBehavior",void 0);w([P(U1a),x("design:type",Object)],OR.prototype,"ytdThumbnailBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],OR.prototype,"componentBehavior",void 0);w([R({value:!1}),x("design:type",Boolean)],OR.prototype,"watchFeedThumbnail",void 0); w([R(),x("design:type",Number)],OR.prototype,"customThumbnailSize",void 0);w([R(),x("design:type",Object)],OR.prototype,"data",void 0);OR=w([U({is:"ytd-playlist-thumbnail"})],OR);var w3a;var x3a;var PR=function(){var a=O.apply(this,arguments)||this;a.noEndpoints=!1;return a}; p(PR,O);e=PR.prototype;e.getMetadata=function(a){var b=[],c=a.shortViewCountText||a.viewCountText;c&&b.push(CL(c));a.publishedTimeText&&b.push(CL(a.publishedTimeText));a.upcomingEventData&&a.upcomingEventData.upcomingEventText&&b.push(EJ(CL(a.upcomingEventData.upcomingEventText),Number(a.upcomingEventData.startTime)));return b}; e.observeDataForBylineSeparator=function(){this.data&&this.toggleClass("byline-separated",0\n
\n \n
\n \n
\n
\n
\n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w3a){var d=document.createElement("template");d.innerHTML=""; w3a=d}d=w3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x3a=a}a=x3a;return a}}}); var QR=PR;QR.prototype.observeDataForBylineSeparator=QR.prototype.observeDataForBylineSeparator;w([R(),x("design:type",Object)],QR.prototype,"data",void 0);w([R(),x("design:type",Object)],QR.prototype,"noEndpoints",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],QR.prototype,"radioMeta",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],QR.prototype,"watchFeedBigThumbs",void 0); w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],QR.prototype,"richMeta",void 0);w([R(),x("design:type",Boolean)],QR.prototype,"noByline",void 0);w([R({computed:"isLongByline(data, radioMeta)"}),x("design:type",Boolean)],QR.prototype,"longByline",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],QR.prototype,"truncateMetadataLine",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],QR.prototype,"miniMode",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],QR.prototype,"observeDataForBylineSeparator",null);w([zE("longByline"),x("design:type",String),x("design:paramtypes",[])],QR.prototype,"longBylineClass",null);w([zE("data","longByline"),x("design:type",Object),x("design:paramtypes",[])],QR.prototype,"bylineText",null);QR=w([U({is:"ytd-video-meta-block"})],QR);function RR(a,b,c){a=k(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;if(d===b)break;for(var f=k(c),g=f.next();!g.done;g=f.next())if(d.tagName===g.value)return!0}return!1} ;var y3a;var z3a;iP("itemSectionRenderer","videoRenderer","ytd-video-renderer");var SR=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-hide-item-section-videos-by-id-command":"handleHideItemSectionVideosByIdCommand"};return a}; p(SR,O);e=SR.prototype; e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"},initialRenderPriority:!N("polymer_video_renderer_defer_menu")||N("desktop_persistent_menu")&&TN?void 0:0},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.attached=function(){this.toggleClass("blue-links",N("kevlar_video_blue_links"))}; e.dataChanged=function(){this.isHistory=-1!==window.location.pathname.indexOf("/feed/history");this.$["description-text"].toggleAttribute("ellipsis-truncate",!!this.data.topStandaloneBadge)}; e.onTextWrapperTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!RR(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})}; e.computeThumbnailWidth=function(a,b,c,d){return c?"BIG1"===d?340:"BIG2"===d?320:"MEDIUM1"===d?300:"MEDIUM2"===d?280:360:b?128:a?210:246}; e.handleHideItemSectionVideosByIdCommand=function(a){a.hideItemSectionVideosByIdCommand&&this.data&&this.data.videoId===a.hideItemSectionVideosByIdCommand.videoId&&(this.isHidden=!0)}; e.computeUseProminentThumbs=function(a){return a&&N("desktop_search_prominent_thumbs")}; e.getMetadataSnippetContainerClass=function(a){return a?"metadata-snippet-container-one-line":"metadata-snippet-container"}; h.Object.defineProperties(SR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===z3a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n

\n \n \n \n \n \n

\n
\n
\n \n \n
\n \n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y3a){var d=document.createElement("template");d.innerHTML=""; y3a=d}d=y3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z3a=a}a=z3a;return a}}}); var TR=SR;w([P(W.YtRendererBehavior),x("design:type",Object)],TR.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],TR.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],TR.prototype,"ytdDismissableItemBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],TR.prototype,"ytdLockupBehavior",void 0); w([P(HQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],TR.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],TR.prototype,"ytActionHandlerBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],TR.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],TR.prototype,"isBackstageVideo",void 0); w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],TR.prototype,"isPostCompactVideo",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],TR.prototype,"isHistory",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],TR.prototype,"isRichGridVideoPost",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],TR.prototype,"isHidden",void 0);w([R({value:!1}),x("design:type",Boolean)],TR.prototype,"isSearch",void 0); w([R({reflectToAttribute:!0,computed:"computeUseProminentThumbs(isSearch)"}),x("design:type",Boolean)],TR.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,computed:"computeIcon_(data.inlineTitleIcon)"}),x("design:type",String)],TR.prototype,"inlineTitleIcon",void 0);w([R({reflectToAttribute:!0,value:function(){return fk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],TR.prototype,"prominentThumbStyle",void 0);TR=w([U({is:"ytd-video-renderer"})],TR);var A3a;var B3a;var UR=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-upcoming-event-reminder-button-state-command":"handleUpdateUpcomingEventReminderButtonStateCommand"};return a}; p(UR,O);e=UR.prototype;e.configureRendererStamper=function(){return{"currentButtonStateRenderer.button":{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.onSeriesReminderStateEntityChange=function(){var a,b,c;(null===(a=this.eventReminderStateEntity)||void 0===a?0:a.key)&&"SPORTS_SERIES_REMINDER_STATE_ALL"===(null===(b=this.seriesReminderStateEntity)||void 0===b?void 0:b.state)&&"UPCOMING_EVENT_REMINDER_STATE_SINGLE"===(null===(c=this.eventReminderStateEntity)||void 0===c?void 0:c.state)&&this.ytdReduxBehavior.dispatch($L("upcomingEventReminderStateEntity",this.eventReminderStateEntity.key,Object.assign(Object.assign({},this.eventReminderStateEntity), {state:"UPCOMING_EVENT_REMINDER_STATE_NONE"})))}; e.onYtServiceRequestCompleted=function(){this.set("data.currentState",this.getButtonStateFromReminderState())}; e.onYtServiceRequestError=function(){var a;this.updateReminderStateEntitiesFromButtonState(null===(a=this.data)||void 0===a?void 0:a.currentState)}; e.handleUpdateUpcomingEventReminderButtonStateCommand=function(a){var b;if(a.updateUpcomingEventReminderButtonStateCommand){var c=null===(b=this.data)||void 0===b?void 0:b.targetId;c&&a.updateUpcomingEventReminderButtonStateCommand.targetId===c&&this.async(this.updateReminderStateEntitiesFromButtonState.bind(this,a.updateUpcomingEventReminderButtonStateCommand.state))}}; e.getButtonStateFromReminderState=function(){var a,b,c,d,f;return"SPORTS_SERIES_REMINDER_STATE_ALL"===(null===(a=this.seriesReminderStateEntity)||void 0===a?void 0:a.state)?"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SERIES":"UPCOMING_EVENT_REMINDER_STATE_SINGLE"===(null===(b=this.eventReminderStateEntity)||void 0===b?void 0:b.state)?"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SINGLE":"SPORTS_SERIES_REMINDER_STATE_NONE"===(null===(c=this.seriesReminderStateEntity)||void 0===c?void 0:c.state)&&"UPCOMING_EVENT_REMINDER_STATE_NONE"===( null===(d=this.eventReminderStateEntity)||void 0===d?void 0:d.state)?"UPCOMING_EVENT_REMINDER_BUTTON_STATE_NONE":null===(f=this.data)||void 0===f?void 0:f.currentState}; e.updateReminderStateEntitiesFromButtonState=function(a){var b,c;if(a){switch(a){case"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SERIES":a="UPCOMING_EVENT_REMINDER_STATE_NONE";var d="SPORTS_SERIES_REMINDER_STATE_ALL";break;case"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SINGLE":a="UPCOMING_EVENT_REMINDER_STATE_SINGLE";d="SPORTS_SERIES_REMINDER_STATE_NONE";break;case"UPCOMING_EVENT_REMINDER_BUTTON_STATE_NONE":a="UPCOMING_EVENT_REMINDER_STATE_NONE";d="SPORTS_SERIES_REMINDER_STATE_NONE";break;default:return;}(null===( b=this.eventReminderStateEntity)||void 0===b?0:b.key)&&this.ytdReduxBehavior.dispatch($L("upcomingEventReminderStateEntity",this.eventReminderStateEntity.key,Object.assign(Object.assign({},this.eventReminderStateEntity),{state:a})));(null===(c=this.seriesReminderStateEntity)||void 0===c?0:c.key)&&this.ytdReduxBehavior.dispatch($L("sportsSeriesReminderStateEntity",this.seriesReminderStateEntity.key,Object.assign(Object.assign({},this.seriesReminderStateEntity),{state:d})))}}; h.Object.defineProperties(UR.prototype,{currentButtonStateRenderer:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d=this.getButtonStateFromReminderState();if(d&&null!==(b=null===(a=this.data)||void 0===a?void 0:a.states)&&void 0!==b&&b.length)for(var f=k(this.data.states),g=f.next();!g.done;g=f.next())if(g=g.value,(null===(c=g.upcomingEventReminderButtonStateRenderer)||void 0===c?void 0:c.state)===d)return g.upcomingEventReminderButtonStateRenderer}}}); h.Object.defineProperties(UR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===B3a){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A3a){var d=document.createElement("template");d.innerHTML="";A3a=d}d=A3a;c.call(b, d.content.cloneNode(!0),a.content.firstChild);B3a=a}a=B3a;return a}}}); var VR=UR;VR.prototype.onYtServiceRequestError=VR.prototype.onYtServiceRequestError;VR.prototype.onYtServiceRequestCompleted=VR.prototype.onYtServiceRequestCompleted;VR.prototype.onSeriesReminderStateEntityChange=VR.prototype.onSeriesReminderStateEntityChange;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],VR.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],VR.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],VR.prototype,"ytRendererstamperBehavior",void 0);w([P(IQ),x("design:type",Object)],VR.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],VR.prototype,"data",void 0);w([R({selectorArgs:["data.upcomingEventData.reminderStateEntityKey"],selector:function(a,b){return aM(a.entities,"upcomingEventReminderStateEntity",b)}}), x("design:type",Object)],VR.prototype,"eventReminderStateEntity",void 0);w([R({selectorArgs:["eventReminderStateEntity.seriesReminderState"],selector:function(a,b){return aM(a.entities,"sportsSeriesReminderStateEntity",b)}}), x("design:type",Object)],VR.prototype,"seriesReminderStateEntity",void 0);w([zE("data.currentState","eventReminderStateEntity","seriesReminderStateEntity"),x("design:type",Object),x("design:paramtypes",[])],VR.prototype,"currentButtonStateRenderer",null);w([yE("seriesReminderStateEntity"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],VR.prototype,"onSeriesReminderStateEntityChange",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],VR.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],VR.prototype,"onYtServiceRequestError",null);VR=w([U({is:"ytd-upcoming-event-reminder-button-renderer"})],VR);var C3a;var D3a;var WR=function(){return O.apply(this,arguments)||this}; p(WR,O);WR.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{ellipsisTruncate:!0}}}}}}; h.Object.defineProperties(WR.prototype,{text:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.ytRendererBehavior.getSimpleString(this.data.responseText)}}}); h.Object.defineProperties(WR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===D3a){var a=document.createElement("template");a.innerHTML="[[text]]\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C3a){var d=document.createElement("template");d.innerHTML=""; C3a=d}d=C3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);D3a=a}a=D3a;return a}}}); var YR=WR;w([P(Y),x("design:type",Object)],YR.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],YR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],YR.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],YR.prototype,"shelfDismissal",void 0);w([zE("data.responseText"),x("design:type",Object),x("design:paramtypes",[])],YR.prototype,"text",null); YR=w([U({is:"ytd-notification-multi-action-renderer"})],YR);var E3a;var F3a;var ZR=function(){return O.apply(this,arguments)||this}; p(ZR,O);ZR.prototype.ready=function(){var a=this;this.$.undo.addEventListener("tap",function(){a.onUndoTap()})}; ZR.prototype.onUndoTap=function(){this.actionSenderBehavior.sendServiceRequestAction([this.data.undoEndpoint])}; h.Object.defineProperties(ZR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===F3a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E3a){var d=document.createElement("template");d.innerHTML=""; E3a=d}d=E3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);F3a=a}a=F3a;return a}}}); var $R=ZR;w([P(W.YtRendererBehavior),x("design:type",Object)],$R.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],$R.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],$R.prototype,"data",void 0);$R=w([U({is:"ytd-notification-text-renderer"})],$R);var G3a;var H3a;var aS=function(){var a=O.apply(this,arguments)||this;a.mouseOverDelayJobId_=0;a.hideImageDelayJobId_=0;a.fadeInImageDelayJobId_=0;a.startTimeMs_=-1;a.loadingStartTimeMs_=-1;a.loadingEndTimeMs_=-1;a.api_=null;a.hasVideoPreview_=!1;return a}; p(aS,O);e=aS.prototype;e.attached=function(){this.data&&(this.isAttachedAndDataSet_=!0,this.showThumbnail_())}; e.detached=function(){this.isAttachedAndDataSet_=!1;this.hideThumbnail_();this.data=void 0;this.csn=null}; e.dataChanged_=function(a){a&&this.isAttached&&!this.isAttachedAndDataSet_&&(this.isAttachedAndDataSet_=!0,this.showThumbnail_())}; e.showThumbnail_=function(){var a=this;this.csn=On();Xo("fmth");Bk.cancelJob(this.mouseOverDelayJobId_);this.data&&this.data.movingThumbnailDetails&&this.data.movingThumbnailDetails.thumbnails?this.mouseOverDelayJobId_=Ck(function(){a.loadingStartTimeMs_=rk();if(N("enable_live_video_preview"))a.startPlayback_();else{var b=a.$.thumbnail;b.complete?a.displayMouseOverImage_():a.listen(b,"load","displayMouseOverImage_")}},150):this.toggleClass("show",!0,this.$.play)}; e.hideThumbnail_=function(){this.data&&this.data.enableHoveredLogging&&!N("enable_live_video_preview")&&this.logEvent_("INTERACTION_LOGGING_GESTURE_TYPE_HOVER");this.removeVideoPreview_()}; e.onTap_=function(){this.removeVideoPreview_()}; e.startPlayback_=function(){var a=this;Bk.cancelJob(this.hideImageDelayJobId_);this.fadeInImageDelayJobId_=Ck(function(){a.toggleClass("loading",!0,a.$["player-container"]);a.acquireApi_(a.$["player-container"]).then(function(b){b.addEventListener("onStateChange",function(c){a.onPlayerStateChange_(c)})})},50)}; e.acquireApi_=function(a){var b=this;this.releaseApi_();var c=Qi(),d=this.getPlayerConfig_();d.args.jsapicallback=function(f){c.resolve(f)}; this.ytComponentBehavior.getInterface(YM).loadPlayer().then(function(){b.api_=jQa(a,d)}); return c.promise}; e.onPlayerStateChange_=function(a){var b=this,c=this.$["player-container"],d=this.$.play;1==a&&(this.loadingEndTimeMs_=rk(),this.startTimeMs_=rk(),this.hasVideoPreview_=!0,this.toggleClass("loading",!1,c),this.toggleClass("playing",!0,c),this.hideImageDelayJobId_=Ck(function(){b.toggleClass("playing",!1,c);b.toggleClass("fade-in",!0,d);b.releaseApi_()},2500))}; e.releaseApi_=function(){this.api_&&(this.api_.stopVideo&&this.api_.stopVideo(),this.api_.destroy&&this.api_.destroy(),this.api_=null)}; e.getPlayerConfig_=function(){var a=A("FILLER_DATA").player;a.attrs.id="video-preview";a.args.el="videopreview";a.args.mute="1";a.args.autoplay="1";a.args.controls="0";a.args.showinfo="0";a.args.enablecastapi="0";a.args.modestbranding="1";a.args.iv_load_policy="3";a.args.rel="0";a.args.player_wide="1";a.args.video_id=this.videoId;a.args.ss="1";a.args.showwatchlater="0";a.args.enablesizebutton="0";a.args.ps="desktop-polymer";a.args.vq="tiny";a.args.player_response=void 0;return a}; e.logEvent_=function(a){if(!(0>=this.loadingStartTimeMs_)){var b={isMovingThumbnail:this.hasVideoPreview_};if(this.hasVideoPreview_&&0
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===G3a){var d=document.createElement("template");d.innerHTML=""; G3a=d}d=G3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);H3a=a}a=H3a;return a}}}); var bS=aS;bS.prototype.onTap_=bS.prototype.onTap_;w([P(W.YtRendererBehavior),x("design:type",Object)],bS.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],bS.prototype,"ytComponentBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],bS.prototype,"data",void 0);w([R(),x("design:type",Object)],bS.prototype,"csn",void 0);w([R(),x("design:type",Object)],bS.prototype,"trackingParams",void 0); w([R(),x("design:type",String)],bS.prototype,"videoId",void 0);w([R(),x("design:type",Boolean)],bS.prototype,"isAttachedAndDataSet_",void 0);w([S("click"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],bS.prototype,"onTap_",null);bS=w([U({is:"ytd-moving-thumbnail-renderer"})],bS);var I3a;var J3a;var cS=function(){return O.apply(this,arguments)||this}; p(cS,O);e=cS.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("top-right-overlay")||this.setAttribute("top-right-overlay","true");this.tooltip.position="rtl"===A("HTML_DIR")?"right":"left"}; e.dataChanged=function(){this.popupOpen=!1}; e.computeAriaLabel=function(a){return a.accessibilityData.label}; e.onTap=function(a){a.stopPropagation();a.preventDefault();this.ytActionSenderBehavior.sendServiceRequestAction([this.data.command])}; e.onPopupOpened=function(){this.popupOpen=!0;this.eventForwardingBehavior.startForwardingEvents(["yt-navigate"],this.eventSink)}; e.onPopupClosed=function(){this.popupOpen=!1;this.eventForwardingBehavior.stopForwardingEvents()}; h.Object.defineProperties(cS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===J3a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===I3a){var d=document.createElement("template");d.innerHTML=""; I3a=d}d=I3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);J3a=a}a=J3a;return a}}}); var dS=cS;dS.prototype.onPopupClosed=dS.prototype.onPopupClosed;dS.prototype.onPopupOpened=dS.prototype.onPopupOpened;dS.prototype.onTap=dS.prototype.onTap;w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],dS.prototype,"eventForwardingBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],dS.prototype,"ytActionSenderBehavior",void 0);w([P(Polymer.IronButtonState),x("design:type",Object)],dS.prototype,"ironButtonState",void 0); w([P(AO.YtComponentBehavior),x("design:type",Object)],dS.prototype,"componentBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],dS.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:-1}),x("design:type",Number)],dS.prototype,"tabindex",void 0);w([R({reflectToAttribute:!0,computed:"computeAriaLabel(data.accessibility)"}),x("design:type",String)],dS.prototype,"ariaLabel",void 0);w([R({value:!1}),x("design:type",Boolean)],dS.prototype,"disableTooltips",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],dS.prototype,"popupOpen",void 0);w([R(),x("design:type",Element)],dS.prototype,"eventSink",void 0);w([AE("#tooltip"),x("design:type",Object)],dS.prototype,"tooltip",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],dS.prototype,"onTap",null);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],dS.prototype,"onPopupOpened",null); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],dS.prototype,"onPopupClosed",null);dS=w([U({is:"ytd-thumbnail-overlay-button-renderer"})],dS);var K3a;var L3a;var M3a=function(){return O.apply(this,arguments)||this}; p(M3a,O); h.Object.defineProperties(M3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===L3a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K3a){var d=document.createElement("template");d.innerHTML=""; K3a=d}d=K3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);L3a=a}a=L3a;return a}}}); var eS=M3a;w([P(W.YtRendererBehavior),x("design:type",Object)],eS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],eS.prototype,"data",void 0);eS=w([U({is:"ytd-thumbnail-overlay-endorsement-renderer"})],eS);var N3a;var O3a;var P3a=function(){return O.apply(this,arguments)||this}; p(P3a,O); h.Object.defineProperties(P3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O3a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n\n\n \n \n \n \n \n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N3a){var d=document.createElement("template");d.innerHTML=""; N3a=d}d=N3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O3a=a}a=O3a;return a}}}); var fS=P3a;w([P(W.YtRendererBehavior),x("design:type",Object)],fS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],fS.prototype,"data",void 0);fS=w([U({is:"ytd-thumbnail-overlay-pinking-renderer"})],fS);var Q3a;var R3a;var gS=function(){var a=O.apply(this,arguments)||this;a.disableTooltips=!1;a.isLoading_=!1;a.useExpandableTooltip=!1;a.toggled=!1;a.hovered=!1;a.mouseoverDelayJobId_=0;a.toggleDelayJobId_=0;a.expandAnimationDelayJobId_=0;return a}; p(gS,O);e=gS.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1");this.hasAttribute("top-right-overlay")||this.setAttribute("top-right-overlay","true");this.$.tooltip.position="rtl"==A("HTML_DIR")?"right":"left"}; e.detached=function(){this.useExpandableTooltip&&(this.isLoading_=this.hovered=!1,this.data&&!this.data.toggledServiceEndpoint&&this.set("data.isToggled",!1),this.mouseoverDelayJobId_&&Bk.cancelJob(this.mouseoverDelayJobId_),this.toggleDelayJobId_&&Bk.cancelJob(this.toggleDelayJobId_),this.expandAnimationDelayJobId_&&Bk.cancelJob(this.expandAnimationDelayJobId_),this.useExpandableTooltip=!1)}; e.dataChanged_=function(){this.popupOpen=this.isLoading_=!1;this.mouseoverDelayJobId_&&Bk.cancelJob(this.mouseoverDelayJobId_);this.toggleDelayJobId_&&Bk.cancelJob(this.toggleDelayJobId_);this.expandAnimationDelayJobId_&&Bk.cancelJob(this.expandAnimationDelayJobId_)}; e.computeIcon_=function(a,b,c){return(c?b:a).iconType}; e.computeAriaLabel_=function(a,b,c){return(c?b:a).accessibilityData.label}; e.computeTooltip_=function(a,b,c){return c?b:a}; e.computeToggled_=function(){return!(!this.data||!this.data.isToggled)}; e.onTap_=function(a){var b=this;a.stopPropagation();a.preventDefault();if(!this.isLoading_||this.useExpandableTooltip)if(a=this.data.isToggled?this.data.toggledServiceEndpoint:this.data.untoggledServiceEndpoint)this.isLoading_=!0,this.set("data.isToggled",!this.data.isToggled),this.ytActionSenderBehavior.sendServiceRequestAction([a]),this.useExpandableTooltip&&(this.toggleDelayJobId_=Ck(function(){b.hovered=!1;b.data&&!b.data.toggledServiceEndpoint&&(b.expandAnimationDelayJobId_=Ck(function(){b.set("data.isToggled", !1)},200))},2E3))}; e.onMouseenter_=function(){var a=this;this.useExpandableTooltip&&(this.mouseoverDelayJobId_=Ck(function(){a.hovered=!0},300))}; e.onMouseleave_=function(){Bk.cancelJob(this.mouseoverDelayJobId_);this.toggled||(this.hovered=!1)}; e.onPopupOpened_=function(){this.popupOpen=!0;this.ytEventForwardingBehavior.startForwardingEvents(["yt-navigate"],this.eventSink)}; e.onPopupClosed_=function(){this.popupOpen=!1;this.ytEventForwardingBehavior.stopForwardingEvents()}; e.onServiceRequestCompleted_=function(a,b){this.isLoading_=!1;if(!this.useExpandableTooltip||this.data.toggledServiceEndpoint&&this.data.untoggledServiceEndpoint)this.serviceRequestWasSuccessful_(b)||this.set("data.isToggled",!this.data.isToggled)}; e.serviceRequestWasSuccessful_=function(a){return(this.data.isToggled?this.data.toggledServiceEndpoint:this.data.untoggledServiceEndpoint).playlistEditEndpoint?"STATUS_SUCCEEDED"===a.data.status:!0}; h.Object.defineProperties(gS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===R3a){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q3a){var d=document.createElement("template");d.innerHTML=""; Q3a=d}d=Q3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);R3a=a}a=R3a;return a}}}); var hS=gS;hS.prototype.onServiceRequestCompleted_=hS.prototype.onServiceRequestCompleted_;hS.prototype.onPopupClosed_=hS.prototype.onPopupClosed_;hS.prototype.onPopupOpened_=hS.prototype.onPopupOpened_;hS.prototype.onMouseleave_=hS.prototype.onMouseleave_;w([P(Polymer.IronButtonState),x("design:type",Object)],hS.prototype,"ironButtonState",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],hS.prototype,"ytComponentBehavior",void 0); w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],hS.prototype,"ytEventForwardingBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],hS.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],hS.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeAriaLabel_(data.untoggledAccessibility, data.toggledAccessibility, data.isToggled)"}),x("design:type",String)],hS.prototype,"ariaLabel",void 0); w([R(),x("design:type",Object)],hS.prototype,"disableTooltips",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],hS.prototype,"popupOpen",void 0);w([R(),x("design:type",Object)],hS.prototype,"isLoading_",void 0);w([R(),x("design:type",Element)],hS.prototype,"eventSink",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],hS.prototype,"useExpandableTooltip",void 0); w([R({reflectToAttribute:!0,computed:"computeToggled_(data.isToggled)"}),x("design:type",Object)],hS.prototype,"toggled",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],hS.prototype,"hovered",void 0);w([S("mouseleave"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],hS.prototype,"onMouseleave_",null);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],hS.prototype,"onPopupOpened_",null); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],hS.prototype,"onPopupClosed_",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],hS.prototype,"onServiceRequestCompleted_",null);hS=w([U({is:"ytd-thumbnail-overlay-toggle-button-renderer"})],hS);var S3a;var T3a;var iS=function(){var a=O.apply(this,arguments)||this;a.eventSink=function(){return a}; a.actionMap={"yt-miniplayer-endpoint-changed":"checkMiniplayer_"};return a}; p(iS,O); iS.prototype.configureRendererStamper=function(){return{"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayBottomPanelRenderer:"ytd-thumbnail-overlay-bottom-panel-renderer",thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]",bottomPanel:"[[bottomSidePanel]]", richGridOverlay:"[[richGridThumbnail]]",watchFeedOverlay:"[[watchFeedThumbnail]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer",thumbnailOverlayNowPlayingRenderer:"ytd-thumbnail-overlay-now-playing-renderer",thumbnailOverlayPinkingRenderer:"ytd-thumbnail-overlay-pinking-renderer"},initialRenderPriority:N("defer_overlays")?0:void 0,waitForSignal:"eocs"},hoverOverlays_:{id:"hover-overlays",mapping:{thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer", thumbnailOverlayToggleButtonRenderer:{component:"ytd-thumbnail-overlay-toggle-button-renderer",properties:{disableTooltips:"[[disableTooltips]]",eventSink:"[[eventSink]]",useExpandableTooltip:"[[useExpandableTooltip]]"}},thumbnailOverlayButtonRenderer:{component:"ytd-thumbnail-overlay-button-renderer",properties:{disableTooltips:"[[disableTooltips]]",eventSink:"[[eventSink]]"}},thumbnailOverlayEndorsementRenderer:"ytd-thumbnail-overlay-endorsement-renderer"}},richThumbnail:{id:"mouseover-overlay", mapping:{movingThumbnailRenderer:{component:"ytd-moving-thumbnail-renderer",properties:{trackingParams:"[[data.trackingParams]]",videoId:"[[data.videoId]]"}}},renderPriority:2,waitForSignal:"eocs"}}}; iS.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; iS.prototype.computeRichThumbnail=function(a,b){if(a&&b&&!N("disable_moving_thumbs_handling"))return b}; h.Object.defineProperties(iS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===T3a){var a=document.createElement("template");a.innerHTML="\n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S3a){var d=document.createElement("template");d.innerHTML=""; S3a=d}d=S3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);T3a=a}a=T3a;return a}}}); var jS=iS;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],jS.prototype,"ytActionHandlerBehavior",void 0);w([P(Y),x("design:type",Object)],jS.prototype,"ytRendererstamperBehavior",void 0);w([P(U1a),x("design:type",Object)],jS.prototype,"ytdThumbnailBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],jS.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],jS.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],jS.prototype,"circular",void 0); w([R({computed:"computeRichThumbnail(finalHoveredState_,data.richThumbnail)"}),x("design:type",Object)],jS.prototype,"richThumbnail",void 0);w([R(),x("design:type",Object)],jS.prototype,"eventSink",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],jS.prototype,"queued",void 0);w([R({value:!1}),x("design:type",Boolean)],jS.prototype,"richGridThumbnail",void 0);w([R({value:!1}),x("design:type",Boolean)],jS.prototype,"useExpandableTooltip",void 0); w([R({value:!1}),x("design:type",Boolean)],jS.prototype,"watchFeedThumbnail",void 0);jS=w([U({is:"ytd-thumbnail"})],jS);var U3a;var V3a;var W3a=(NA.FIRSTDAYOFWEEK+1)%7;function X3a(a,b){return a.year===b.year&&a.month===b.month&&a.day===b.day} function kS(a,b){return a.year!==b.year?a.year.25*(d4a-c4a))a4a=[];else{for(var e4a=c4a;e4a=this.timeZones.length))return this.timeZones[this.selectedTimezoneIndex]}}, selectedTime:{configurable:!0,enumerable:!0,get:function(){return this.timeOfDayOptions[this.selectedTimeIndex]}}}); h.Object.defineProperties(mS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===V3a){var a=document.createElement("template");a.innerHTML="\n\n
\n \n \n \n
[[selectedTime.text]]
\n \n \n
\n \n \n \n
\n \n \n
[[getTimezoneFormat(selectedTimezone)]]
\n \n \n
\n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U3a){var d=document.createElement("template");d.innerHTML=""; U3a=d}d=U3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);V3a=a}a=V3a;return a}}}); var nS=mS;nS.prototype.onDateTimeTimezoneChange=nS.prototype.onDateTimeTimezoneChange;nS.prototype.onDatePicked=nS.prototype.onDatePicked;nS.prototype.updateDefaultSelectedValue=nS.prototype.updateDefaultSelectedValue;w([R(),x("design:type",Object)],nS.prototype,"data",void 0);w([R(),x("design:type",Object)],nS.prototype,"calendarConfig",void 0);w([R(),x("design:type",Object)],nS.prototype,"selectedDate",void 0);w([R(),x("design:type",Object)],nS.prototype,"selectedTimeIndex",void 0); w([R(),x("design:type",Object)],nS.prototype,"selectedTimezoneIndex",void 0);w([AE("#time-listbox"),x("design:type",Object)],nS.prototype,"timeListBox",void 0);w([AE("#timezone-listbox"),x("design:type",Object)],nS.prototype,"timezoneListBox",void 0);w([P(Y),x("design:type",Object)],nS.prototype,"rendererStamperBehavior",void 0);w([zE("data.timezoneOptions"),x("design:type",Object),x("design:paramtypes",[])],nS.prototype,"timeZones",null); w([yE("data","timeZones"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nS.prototype,"updateDefaultSelectedValue",null);w([zE("selectedTimezoneIndex","timeZones"),x("design:type",Object),x("design:paramtypes",[])],nS.prototype,"selectedTimezone",null);w([zE("selectedTimeIndex"),x("design:type",Object),x("design:paramtypes",[])],nS.prototype,"selectedTime",null); w([S("ytd-calendar-date-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],nS.prototype,"onDatePicked",null);w([yE("selectedTimezone","selectedTime","selectedDate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nS.prototype,"onDateTimeTimezoneChange",null);nS=w([U({is:"ytd-date-time-picker-renderer"})],nS);var n4a;var o4a;var oS=function(){var a=O.apply(this,arguments)||this;a.skipNextOpenDialog=!1;a.errorMessage="";return a}; p(oS,O);e=oS.prototype;e.attached=function(){var a=this,b=new MutationObserver(function(){0c;c++)b.push(NA.NARROWWEEKDAYS[(c+W3a)%7]);c=[];for(var d=new Date(a.start.year,a.start.month);d.getFullYear()\n \n
[[dateText]]
\n \n \n
\n
\n\n\n
\n
\n \n \n \n [[errorMessage]]\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n
\n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n4a){var d=document.createElement("template");d.innerHTML=""; n4a=d}d=n4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);o4a=a}a=o4a;return a}}}); var pS=oS;pS.prototype.onEscOrClickingOutside=pS.prototype.onEscOrClickingOutside;pS.prototype.scrollToDate=pS.prototype.scrollToDate;w([R(),x("design:type",Object)],pS.prototype,"calendarConfig",void 0);w([R(),x("design:type",Object)],pS.prototype,"skipNextOpenDialog",void 0);w([R(),x("design:type",Object)],pS.prototype,"errorMessage",void 0);w([AE("#textbox"),x("design:type",HTMLInputElement)],pS.prototype,"textbox",void 0); w([AE("#calendar-dialog"),x("design:type",Object)],pS.prototype,"dialog",void 0);w([AE("#calendar-main"),x("design:type",Object)],pS.prototype,"calendarMain",void 0);w([AE("#date-picker"),x("design:type",HTMLElement)],pS.prototype,"dropdownButton",void 0);w([zE("calendarConfig.selectedDate"),x("design:type",String),x("design:paramtypes",[])],pS.prototype,"dateText",null); w([zE("calendarConfig","calendarConfig.selectedDate"),x("design:type",Object),x("design:paramtypes",[])],pS.prototype,"renderData",null);w([yE("renderData","calendarConfig.selectedDate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],pS.prototype,"scrollToDate",null);w([S("iron-overlay-canceled"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],pS.prototype,"onEscOrClickingOutside",null); pS=w([uO({is:"ytd-calendar-date-picker",noInjection:!0})],pS);function p4a(a,b){b=b.months.findIndex(function(c){return c.year===a.year&&c.month===a.month}); return 0<=b?b:void 0} ;var q4a;var r4a;var qS=function(){var a=O.apply(this,arguments)||this;a.boundOnTapDismissButton=function(){a.dismissTapHandler()}; return a}; p(qS,O);qS.prototype.configureRendererStamper=function(){return{attachmentPreview:{id:"attachment-preview",mapping:{backstageImageRenderer:"ytd-backstage-image-renderer",videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}}}},dismissButton:{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapDismissButton]]"}}}}}}; qS.prototype.dismissTapHandler=function(){this.fire("yt-backstage-attachment-dismissed")}; qS.prototype.computeAttachmentType=function(a){return a?a.backstageImageRenderer?"image":a.videoRenderer?"video":"none":"none"}; h.Object.defineProperties(qS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===r4a){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===q4a){var d=document.createElement("template");d.innerHTML=""; q4a=d}d=q4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);r4a=a}a=r4a;return a}}}); var rS=qS;w([P(W.YtRendererBehavior),x("design:type",Object)],rS.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],rS.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],rS.prototype,"attachmentPreview",void 0);w([R(),x("design:type",Object)],rS.prototype,"dismissButton",void 0);w([R(),x("design:type",Object)],rS.prototype,"boundOnTapDismissButton",void 0); w([R({reflectToAttribute:!0,readOnly:!0,computed:"computeAttachmentType(attachmentPreview)"}),x("design:type",String)],rS.prototype,"attachmentType",void 0);rS=w([U({is:"ytd-backstage-dismissable-attachment"})],rS);var s4a;var t4a;var sS=function(){var a=O.apply(this,arguments)||this;a.selectedVideoId_=void 0;a.picker_=null;return a}; p(sS,O);e=sS.prototype;e.configureRendererStamper=function(){return{videoPreview:{id:"video-preview",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}}}},cancelButton:{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onLaunchVideoPicker=function(a){var b=CL(this.get("addVideoLinkAction.title",a));if(a=this.get("addVideoLinkAction.onePickHostId",a))this.picker_||(this.picker_=DTa(a).setTitle(b).addView(new hD().setSite("youtube.com")).addView(new gD().setType("video").setSite("youtube.com")).addView("youtube").setCallback(Ta(this.onPickVideo_,this)).build()),this.picker_.setVisible(!0)}; e.onPickVideo_=function(a){if(a)if("cancel"==a.action)this.fire("yt-video-link-button-cancel");else if("picked"===a.action){a=a.docs;if(!a||0===a.length)this.onGetVideoPreviewError_("No valid docs in response");this.selectedVideoId_=a[0].id;this.setVideoPreview_()}}; e.setVideoPreview_=function(){this.ytComponentBehavior.getInterfaceForTs("yt-network-manager").postData("/comment_service_ajax?action_get_video_preview=1",{video_id:this.selectedVideoId_}).then(this.onGetVideoPreviewSuccess_.bind(this),this.onGetVideoPreviewError_.bind(this))}; e.onGetVideoPreviewSuccess_=function(a){if(a&&a.videoPreview&&a.cancelButton)this.videoPreview=a.videoPreview,this.cancelButton=a.cancelButton,this.fire("yt-video-link-selected",{videoId:this.selectedVideoId_});else this.onGetVideoPreviewError_("Empty data from ajax")}; e.onGetVideoPreviewError_=function(){this.cancel()}; e.cancel=function(){this.videoPreview=this.cancelButton=this.selectedVideoId_=void 0;this.fire("yt-video-link-cancel")}; e.isValid=function(){return!(!this.videoPreview||!this.selectedVideoId_)}; h.Object.defineProperties(sS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===t4a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s4a){var d=document.createElement("template");d.innerHTML=""; s4a=d}d=s4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t4a=a}a=t4a;return a}}}); var tS=sS;w([P(Y),x("design:type",Object)],tS.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],tS.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],tS.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],tS.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],tS.prototype,"videoPreview",void 0); w([R(),x("design:type",Object)],tS.prototype,"cancelButton",void 0);tS=w([U({is:"ytd-backstage-video-link-attachment"})],tS);function uS(a){if(!a)return!1;try{if(a.host&&"YT-FORMATTED-STRING"===a.host.tagName&&"contenteditable-textarea"===a.host.id||a.nodeType===Node.ELEMENT_NODE&&"YTD-COMMENTBOX"===a.tagName)return!0}catch(b){return!1}return uS(a.parentNode)} function vS(a){return a?"A"===a.tagName&&a.href&&a.classList.contains("yt-simple-endpoint"):!1} function u4a(a){return a?"IMG"===a.tagName&&a.classList.contains("emoji"):!1} function v4a(a,b,c){if(!a)return null;var d=vS(a);if(d&&c)return b=a.pathname.substring(a.pathname.indexOf("/channel/")+9),document.createTextNode("@"+b);if(d&&!c)return document.createTextNode("");if(u4a(a))return c=a.alt,a=a.dataset.emojiId,!a&&b&&(b=TO(b,c))&&b.isCustomEmoji&&(a=b.emojiId),a?document.createTextNode(""):document.createTextNode(c);d=a.cloneNode(!1);for(var f=0;f=b&&a.setStart(a.startContainer,a.startOffset-b)}; e.updateSuggestions=function(a,b){var c=this;this.lastSuggestionRange_&&(this.lastSuggestionRange_.detach(),this.lastSuggestionRange_=null);var d=this.$.dropdown;if((b=F4a.exec(b))&&b.length&&(b=b[b.length-1].toLocaleLowerCase(),2\n\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D4a){var d=document.createElement("template");d.innerHTML=""; D4a=d}d=D4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);E4a=a}a=E4a;return a}}}); var zS=yS;zS.prototype.onKeyPress_=zS.prototype.onKeyPress_;zS.prototype.onKeyUp_=zS.prototype.onKeyUp_;zS.prototype.onKeyDown_=zS.prototype.onKeyDown_;w([P(Y),x("design:type",Object)],zS.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Array)],zS.prototype,"suggestions",void 0);w([R(),x("design:type",QO)],zS.prototype,"emojiManager",void 0);w([R(),x("design:type",Number)],zS.prototype,"verticalSuggestionsOffset",void 0); w([S("keydown"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],zS.prototype,"onKeyDown_",null);w([S("keyup"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent,Range]),x("design:returntype",void 0)],zS.prototype,"onKeyUp_",null);w([S("keypress"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],zS.prototype,"onKeyPress_",null);zS=w([U({is:"ytd-emoji-input"})],zS);var G4a;var H4a;var AS=function(){return O.apply(this,arguments)||this}; p(AS,O);AS.prototype.dataChanged=function(){this.active=!1}; AS.prototype.onTap=function(){this.fire("yt-select-emoji-suggestion",this.data)}; AS.prototype.identity=function(a){return a}; h.Object.defineProperties(AS.prototype,{imageSrc:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d;if(null!==(d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.image)||void 0===b?void 0:b.thumbnails)||void 0===c?void 0:c[0])&&void 0!==d&&d.url){var f=this.data.image.thumbnails[0].url;return f.startsWith("data:image/svg+xml")?Xb(f):$b(f)}}}}); h.Object.defineProperties(AS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===H4a){var a=document.createElement("template");a.innerHTML="\n \"[[data.alt]]\"\n [[data.text]]\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===G4a){var d=document.createElement("template");d.innerHTML=""; G4a=d}d=G4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);H4a=a}a=H4a;return a}}}); var BS=AS;BS.prototype.dataChanged=BS.prototype.dataChanged;w([R(),x("design:type",Object)],BS.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],BS.prototype,"active",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],BS.prototype,"dataChanged",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],BS.prototype,"imageSrc",null);BS=w([U({is:"ytd-emoji-suggestion"})],BS);var I4a;var J4a;var CS=function(){var a=O.apply(this,arguments)||this;a.hasMaxOptions=!1;return a}; p(CS,O);e=CS.prototype;e.configureRendererStamper=function(){return{"data.addOptionButton":{id:"add-option",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged_=function(a){this.pollOptions_=this.setPollOptions_(a)}; e.setPrefilledChoices=function(a){var b=this;this.set("pollOptions_",[]);var c;for(c=0;c=this.data.maxPollOptions;Polymer.RenderStatus.afterNextRender(this,function(){var d=b.pollOptions_;Polymer.dom(b.root).querySelectorAll(".poll-option-input").forEach(function(f,g){f.value=d[g]})})}; e.focusChanged_=function(){this.updateStyles()}; e.onInput_=function(){var a=this;this.debounce("onInput_",function(){a.isValid()?a.fire("yt-commentbox-post-enable"):a.fire("yt-commentbox-post-disable")},300)}; e.setPollOptions_=function(){for(var a,b=[],c=(null===(a=this.data)||void 0===a?0:a.minPollOptions)?this.data.minPollOptions:0,d=0;d .poll-option-input").focus()})}; e.onRemovePollOption_=function(a){this.setPollOptionsFromInputs_();this.data.minPollOptions&&this.pollOptions_.length==this.data.minPollOptions?(this.clearPollOptions(),this.fire("yt-poll-attachment-dismiss")):(a=this.$.repeat.indexForElement(a.target.parentNode),this.splice("pollOptions_",a,1),this.hasMaxOptions=!1,this.areAllOptionsValid_()&&(this.$.repeat.render(),this.fire("yt-commentbox-post-enable")))}; e.isValid=function(){this.setPollOptionsFromInputs_();return this.areAllOptionsValid_()}; e.areAllOptionsValid_=function(){if(this.data.minPollOptionChars)for(var a=0,b=this.pollOptions_.length;a
\n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===I4a){var d=document.createElement("template");d.innerHTML=""; I4a=d}d=I4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);J4a=a}a=J4a;return a}}}); var DS=CS;w([P(Y),x("design:type",Object)],DS.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],DS.prototype,"data",void 0);w([R(),x("design:type",Array)],DS.prototype,"pollOptions_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],DS.prototype,"hasMaxOptions",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],DS.prototype,"enableCreationBox",void 0);DS=w([U({is:"ytd-poll-attachment"})],DS);var K4a;var L4a;var M4a;var N4a;var ES=function(){var a=O.apply(this,arguments)||this;a.focusedSuggestionIndex=-1;return a}; p(ES,O);e=ES.prototype;e.created=function(){this.ytRendererBehavior.monitorScroll=!0}; e.clearFocusedSuggestion=function(){this.focusedSuggestionIndex=-1;this._setFocusedSuggestionId(void 0)}; e.setFocusedSuggestionIndex=function(a){!this.data||!this.data.suggestions||0>a||a>=this.data.suggestions.length||(this.focusedSuggestionIndex=a,a=this.getSuggestionId(a),this._setFocusedSuggestionId(a))}; e.advanceSuggestion=function(a){-1===this.focusedSuggestionIndex||-1!==a&&1!==a||(this.setFocusedSuggestionIndex(this.focusedSuggestionIndex+a),this.ensureSuggestionVisible(this.focusedSuggestionIndex))}; e.ensureSuggestionVisible=function(a){a=this.getSuggestionId(a);a=this.$$("[id="+a+"]");null!=a&&(a.offsetTopthis.scrollTop+this.clientHeight&&a.scrollIntoView(!1))}; e.getSuggestionId=function(a){return"user-mention-suggestion-"+a}; e.onSuggestionTap=function(a){var b=a.model.item.userMentionSuggestionRenderer;this.ytRendererBehavior.logExplicitClick(b);this.fire("yt-user-mention-suggestion-selected",{data:b,index:a.model.index})}; e.onSuggestionMouseMove=function(a){a.model.index!==this.focusedSuggestionIndex&&this.setFocusedSuggestionIndex(a.model.index)}; e.isSuggestionFocused=function(a,b){return a===b}; e.onDomChange=function(){this.ytRendererBehavior.markDirty()}; h.Object.defineProperties(ES,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===N4a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===M4a){var d=document.createElement("template");d.innerHTML=""; M4a=d}d=M4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);N4a=a}a=N4a;return a}}}); var FS=ES;FS.prototype.onDomChange=FS.prototype.onDomChange;w([P(W.YtRendererBehavior),x("design:type",Object)],FS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],FS.prototype,"data",void 0);w([R(),x("design:type",Object)],FS.prototype,"focusedSuggestionIndex",void 0);w([R({readOnly:!0,notify:!0}),x("design:type",String)],FS.prototype,"focusedSuggestionId",void 0); w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],FS.prototype,"onDomChange",null);FS=w([U({is:"yt-user-mention-suggestions-dropdown"})],FS);var GS=function(){var a=O.apply(this,arguments)||this;a.suggestionsResponse=null;a.activeMention=null;a.selectionChangeListener=a.onSelectionChange.bind(a);a.pendingQuery=null;a.flowNonce=null;return a}; p(GS,O);e=GS.prototype;e.beforeRegister=function(){this.ironA11yKeysBehavior.keyBindings={up:"focusPreviousSuggestion",down:"focusNextSuggestion","tab enter":"selectFocusedSuggestion",esc:"cancelActiveMention"}}; e.attached=function(){document.addEventListener("selectionchange",this.selectionChangeListener)}; e.detached=function(){document.removeEventListener("selectionchange",this.selectionChangeListener)}; e.hasSuggestions=function(a){return!!(a&&a.suggestions&&0c)){var d=b.textContent;!(d=d&&d.charAt(c-1))||0>"@\uFE6B\uFF20+\uFE62\uFF0B".indexOf(d)||(this.activeMention=wF(b,c-1,a.getEndNode(),a.getEndOffset()),this.flowNonce=Fn(),this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_MENTION_FLOW_STARTED"))}}}; e.updateActiveMention=function(){if(this.activeMention){var a=RE();a&&a.isCollapsed()&&(this.activeMention=wF(this.activeMention.getStartNode(),this.activeMention.getStartOffset(),a.getEndNode(),a.getEndOffset()))}}; e.requestSuggestions=function(a){if(this.activeMention){var b={suggestions_query:a};this.pendingQuery=a;this.ytActionSenderBehavior.sendServiceRequestAction([this.suggestionsEndpoint,b])}}; e.cancelActiveMention=function(){this.activeMention&&this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_MENTION_FLOW_STOPPED");this.suggestionsResponse=this.pendingQuery=this.activeMention=null;this.dropdown.clearFocusedSuggestion()}; e.focusPreviousSuggestion=function(a){this.hasSuggestions(this.suggestionsResponse)&&(this.dropdown.advanceSuggestion(-1),a.preventDefault())}; e.focusNextSuggestion=function(a){this.hasSuggestions(this.suggestionsResponse)&&(this.dropdown.advanceSuggestion(1),a.preventDefault())}; e.selectFocusedSuggestion=function(a){if(this.hasSuggestions(this.suggestionsResponse)){var b=this.suggestionsResponse.suggestions[this.dropdown.focusedSuggestionIndex];b.userMentionSuggestionRenderer&&(this.selectSuggestion(b.userMentionSuggestionRenderer,this.dropdown.focusedSuggestionIndex),a.preventDefault())}}; e.selectSuggestion=function(a,b){if(a){var c=this.activeMention;if(c){var d=document.createElement("a");Dg(d,"\xA0@"+a.displayName+"\xA0");uc(d,"/channel/"+a.channelId);d.classList.add("yt-formatted-string","yt-simple-endpoint");d.setAttribute("spellcheck","false");c.replaceContentsWithNode(d);a=document.createTextNode(" ");d.parentNode.insertBefore(a,d.nextSibling);window.getSelection().collapse(a,1);this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_SUGGESTION_SELECTED",{suggestionSelected:{suggestionIndex:b}}); this.cancelActiveMention();this.fire("yt-mention-inserted")}}}; e.getPositionTarget=function(a){return a&&a.getBrowserRangeObject()}; e.onDomChange=function(){this.ironDropdown.refit();this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_CONTENT_UPDATED")}; e.onFocusedSuggestionIdChanged=function(a){var b=this.getContentChildren("")[0];b&&(a.detail.value?b.setAttribute("aria-activedescendant",a.detail.value):b.removeAttribute("aria-activedescendant"))}; e.onDropdownOpened=function(){this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_BOX_OPENED")}; e.logGELEvent=function(a,b){a={eventType:a,flowNonce:this.flowNonce,source:"USER_MENTION_AUTO_COMPLETE_SOURCE_BACKSTAGE_POST"};b&&(a=Object.assign(a,b));wm("userMentionAutoCompleteBoxEvent",a)}; h.Object.defineProperties(GS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===L4a){var a=document.createElement("template");a.innerHTML="\n\n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K4a){var d=document.createElement("template");d.innerHTML=""; K4a=d}d=K4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);L4a=a}a=L4a;return a}}}); var HS=GS;HS.prototype.onDomChange=HS.prototype.onDomChange;HS.prototype.onUserMentionSuggestionSelected=HS.prototype.onUserMentionSuggestionSelected;HS.prototype.onServiceRequestError=HS.prototype.onServiceRequestError;HS.prototype.onServiceRequestCompleted=HS.prototype.onServiceRequestCompleted;HS.prototype.onServiceRequestSent=HS.prototype.onServiceRequestSent;HS.prototype.onInput=HS.prototype.onInput; w([P(V.YtActionSenderBehavior),x("design:type",Object)],HS.prototype,"ytActionSenderBehavior",void 0);w([P(Polymer.IronA11yKeysBehavior),x("design:type",Object)],HS.prototype,"ironA11yKeysBehavior",void 0);w([R(),x("design:type",Object)],HS.prototype,"suggestionsEndpoint",void 0);w([R(),x("design:type",Object)],HS.prototype,"suggestionsResponse",void 0);w([R(),x("design:type",Object)],HS.prototype,"activeMention",void 0);w([AE("#dropdown"),x("design:type",FS)],HS.prototype,"dropdown",void 0); w([AE("#iron-dropdown"),x("design:type",Object)],HS.prototype,"ironDropdown",void 0);w([S("input"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],HS.prototype,"onInput",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HS.prototype,"onServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HS.prototype,"onServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HS.prototype,"onServiceRequestError",null); w([S("yt-user-mention-suggestion-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HS.prototype,"onUserMentionSuggestionSelected",null);w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HS.prototype,"onDomChange",null);HS=w([U({is:"yt-user-mention-autosuggest-input"})],HS);var O4a;var P4a;var Q4a=function(){return O.apply(this,arguments)||this}; p(Q4a,O); h.Object.defineProperties(Q4a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===P4a){var a=document.createElement("template");a.innerHTML="\n\n
\n
[[data.displayName]]
\n \n \n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O4a){var d=document.createElement("template");d.innerHTML=""; O4a=d}d=O4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);P4a=a}a=P4a;return a}}}); var IS=Q4a;w([P(W.YtRendererBehavior),x("design:type",Object)],IS.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],IS.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],IS.prototype,"focused",void 0);IS=w([U({is:"yt-user-mention-suggestion-renderer"})],IS);var JS=null; Polymer({is:"ytd-commentbox",_template:function(){if(void 0!==C4a)return C4a;var a=document.createElement("template");a.innerHTML="\n\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B4a){var d=document.createElement("template");d.innerHTML=""; B4a=d}d=B4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return C4a=a}, behaviors:[Polymer.IronA11yKeysBehavior,Y,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior],keyBindings:{left:"leftKeyPressed_",right:"rightKeyPressed_",end:"endKeyPressed_",backspace:"maybeBackspaceChip_","delete":"maybeDeleteChip_","ctrl+enter meta+enter":"submitIfNotBackstagePost_","ctrl+backspace alt+backspace":"maybeBackspaceChipWordMode_","ctrl+delete alt+delete":"maybeDeleteChipWordMode_"},properties:{data:{type:Object,observer:"dataChanged_"},receivedFocusPreviously_:{type:Boolean,value:!1}, isReply:{type:Boolean,value:!1},isBackstageComment:{type:Boolean,computed:"computeIsBackstageComment_(data.avatarSize)",reflectToAttribute:!0},isBackstagePost:{type:Boolean,value:!1,reflectToAttribute:!0},serviceEndpoint:{type:Object,readOnly:!0,computed:"computeServiceEndpoint_(data)"},submitButtonDisabled:Boolean,attachment:Object,isLoading:{type:Boolean,observer:"isLoadingChanged_"},errorMessage_:{type:Object,value:null},alertMessage_:{type:Object,value:null},imageUploadEndpoint_:{type:Object, computed:"computeImageUploadEndpoint_(data)"},addedAttachment:{type:String,value:"none",reflectToAttribute:!0},prefilledAttachment_:{type:String,value:"none",reflectToAttribute:!0},editableText_:{type:String,computed:"computeEditableText_(data.editableText)"},previousText_:String,inlineSchedulePanel_:{type:Object,computed:"computeInlineSchedulingPanel_(data.purpose, data.schedulingDateTimePicker)"},dropdownSchedulePanel_:{type:Object,computed:"computeDropdownSchedulingPanel_(data.purpose, data.schedulingDateTimePicker)"}, scheduleButton_:Object,zeroStepFooterText:Object,enableCreationBox:{type:Boolean,reflectToAttribute:!0},isInputFocus_:{type:Boolean,observer:"onIsInputFocusChanged_"},hasImage_:{type:Boolean,computed:"computeHasImage_(addedAttachment)"},hasPollRendererInEditDialog_:{type:Boolean,computed:"computeHasPollRendererInEditDialog_(data.purpose, data.backstageAttachment.pollRenderer)"},hasVideo_:{type:Boolean,computed:"computeHasVideo_(addedAttachment)"},hasPoll_:{type:Boolean,computed:"computeHasPoll_(addedAttachment)"}, prefilledContent_:{type:Object,readOnly:!0,computed:"computePrefilledContent_(data)"},editAttachment_:{type:Object,readOnly:!0,computed:"computeEditAttachment_(data)"},isCreationBox:{type:Boolean,reflectToAttribute:!0,value:!1},isPopupBox:{type:Boolean,reflectToAttribute:!0,value:!1},emojiManager:{type:Object,readOnly:!0,value:function(){return UO}}, isEmojiButtonDisplayed:{type:Boolean,computed:"computeIsEmojiButtonDisplayed_(data)",value:!1},isEmojiPickerDisplayed:{type:Boolean,value:!1,reflectToAttribute:!0},emojiInput:Object,verticalSuggestionsOffset:{type:Number,value:30},isPostCreationDialogV2:{type:Boolean,reflectToAttribute:!0,value:!1},accessRestriction:{type:String},charCount_:{type:Number,value:0},charLimit_:{type:Number,computed:"computeCharLimit_(data)"},aboveCharLimit_:{type:Boolean,reflectToAttribute:!0,value:!1},inputEventSupported_:{type:Boolean, value:!1},textRequiresScrolling:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["observePrefilledImage_(data.purpose, data.prefilledImageData, data.backstageAttachment)","observePrefilledVideo_(data.purpose, data.backstageAttachment)","observePrefilledPoll_(data.prefilledAttachment)"],listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_","yt-service-request-sent":"onYtServiceRequestSent_","yt-backstage-image-select-cancel":"onImageCancel_", "yt-backstage-image-select-alert":"onImageAlert_","yt-backstage-image-select-preview":"onImageSelected_","yt-img-crop-coordinates-update":"onImagePreviewCoordinatesUpdated_","yt-img-crop-reposition":"onImagePreviewReposition_","yt-poll-attachment-dismiss":"onPollAttachmentDismiss_","yt-navigate":"onYtNavigate_","yt-video-link-selected":"onVideoLinkSelected_","yt-video-link-cancel":"onVideoLinkCanceled_","yt-video-link-button-cancel":"onVideoLinkButtonCancel_","yt-commentbox-post-enable":"onSubmitButtonEnable_", "yt-commentbox-post-disable":"onSubmitButtonDisable_","yt-backstage-attachment-dismissed":"onPrefilledContentDismissed_","yt-emoji-select":"onEmojiSelect_","yt-insert-suggestion":"onSuggestionInsert_","yt-select-emoji-suggestion":"onEmojiSuggestionClick_","ytd-date-time-selection-update":"onDateTimeSelectionUpdate_","ytd-date-time-selection-cancelled":"onDateTimeSelectionCancelled_","yt-mention-inserted":"onInsertMention_"},stampDom:{"data.videoLinkButton":{id:"video-link-button",mapping:{buttonRenderer:"ytd-button-renderer"}}, "data.imageButton":{id:"image-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.pollButton":{id:"poll-button",mapping:{buttonRenderer:"ytd-button-renderer"}},editAttachment_:{id:"attachment-preview",mapping:{backstageImageRenderer:"ytd-backstage-image-renderer",videoRenderer:{component:"ytd-video-renderer",properties:{isBackstageVideo:"[[isBackstagePost]]"}},playlistRenderer:{component:"ytd-playlist-renderer",properties:{isBackstagePlaylist:"[[isBackstagePost]]"}},postMultiImageRenderer:"ytd-post-multi-image-renderer"}}, "data.accessRestrictionsSelector":{id:"access-restrictions-selector",mapping:{dropdownRenderer:"ytd-flat-dropdown-renderer"}},"data.backstageAttachment":{id:"poll-preview",mapping:{pollRenderer:"ytd-backstage-poll-renderer"}},"imageUploadEndpoint_.imageEditor":{id:"image-select",mapping:{backstageImageSelectRenderer:{component:"ytd-backstage-image-select-renderer",properties:{imageUploadEndpoint:"[[imageUploadEndpoint_]]",isBackstagePost:"[[isBackstagePost]]"}}}},"data.emojiButton":{id:"emoji-button", mapping:{buttonRenderer:"ytd-button-renderer"}},"data.emojiPicker":{id:"emoji-picker",mapping:{emojiPickerRenderer:{component:"yt-emoji-picker-renderer",properties:{emojiManager:"[[emojiManager]]"}}}},"data.postOptionsMenu":{id:"option-menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:arrow_drop_down",noInkOnDropdownButton:!0}}}},dropdownSchedulePanel_:{id:"scheduling-panel",mapping:{dateTimePickerRenderer:"ytd-date-time-picker-renderer"}},inlineSchedulePanel_:{id:"inline-scheduling-panel", mapping:{dateTimePickerRenderer:"ytd-date-time-picker-renderer"}}},ready:function(){this.listen(document,"tap","onTap_");this.emojiInput=this.$.emoji}, isLoadingChanged_:function(a){this.fire(a?"yt-commentbox-loading-start":"yt-commentbox-loading-end")}, dataChanged_:function(a){this.set("submitButtonDisabled",void 0);this.clear();if(a&&this.computeIsEmojiButtonDisplayed_(a)){var b=this.$$("#emoji-picker > yt-emoji-picker-renderer");b&&b.updateCategoriesAndPlaceholder_(a.emojiPicker.emojiPickerRenderer,!0)}}, observePrefilledImage_:function(a,b,c){this.isValidPrefilledImage_(a,b,c)&&(this.prefilledAttachment_="image",this.prefilledImageData_=b,this.submitButtonDisabled=!1)}, observePrefilledVideo_:function(a,b){this.isValidPrefilledVideo_(a,b)&&(this.prefilledAttachment_="video")}, observePrefilledPoll_:function(a){a&&a.pollData&&a.pollData.choices&&(this.addedAttachment="poll",this.$["poll-attachment"].setPrefilledChoices(a.pollData.choices))}, attached:function(){this.$["input-container"].getElementsByClassName("underline")[0].style.height=0;Polymer.dom.flush();this.focus()}, detached:function(){this.unlisten(document,"tap","onTap_")}, created:function(){this.scheduledPublishTimeSec_=this.prefilledImageData_=this.imagePreviewCoordinates_=this.selectedVideoId_=void 0;document.addEventListener("selectionchange",this.onSelectionChange_);this.textRequiresScrolling=!1}, onEmojiButtonTap_:function(){this.isEmojiPickerDisplayed=!this.isEmojiPickerDisplayed;this.$$("#emoji-picker > yt-emoji-picker-renderer").selected=!this.$$("#emoji-picker > yt-emoji-picker-renderer").selected}, onEmojiSelect_:function(a){a=a.detail;a=a.isCustomEmoji?a.shortcuts[0]:a.emojiId;var b=this.getInputRange_().cloneRange();this.insertTextWithEmojis_(b,a);this.maybeUpdateTextDirection_()}, getInputRange_:function(){var a=RE();if(a){a=a.getBrowserRangeObject();for(var b=a.commonAncestorContainer;b;){if(b===this.getEditableTextArea_())return a;b=b.parentNode}}a=this.getEditableTextArea_();a=vF(a,a.childNodes.length);a.select();return a.getBrowserRangeObject()}, insertTextWithEmojis_:function(a,b,c){(b=this.emojiManager.createDocumentFragment(b,!0,!1,void 0===c?!0:c))&&0!==b.childNodes.length&&(a.collapsed||a.deleteContents(),c=b.lastChild,a.insertNode(b),gF(c).select(),this.getInputRange_().collapse(!1),this.getEditableTextArea_().normalize(),this.submitButtonDisabled=!1)}, onSelectionChange_:function(){var a=RE();if(a){var b=a.getStartNode(),c=a.getEndNode();if(uS(b)&&uS(c)){var d=a.getStartOffset(),f,g;if(g=Ie&&b.nodeType===Node.ELEMENT_NODE)g=f=eg(document,"yt-formatted-string","paper-input-input",b);if(g)vF(f,0).select();else{f=vS(b)?b:Lg(b,vS);g=vS(c)?c:Lg(c,vS);if(f||g)if(a.isCollapsed()){if(b.nodeType===Node.TEXT_NODE){a=!0;d===b.length&&(a=!1);if("end"===JS||"right"===JS)a=!1;b=b.parentNode;a=[].concat(fa(b.parentNode.childNodes)).indexOf(b)+(a?0:1);vF(b.parentNode, a).select()}}else f?f.previousSibling&&0a.clientHeight)}, onInput_:function(){this.inputEventSupported_=!0;this.handleInputEvent_()}, onKeyUp_:function(){this.inputEventSupported_||this.handleInputEvent_()}, updateCharCount_:function(){this.charCount_=this.getTextLength();this.aboveCharLimit_=!!this.charLimit_&&this.charCount_>this.charLimit_}, onPaste_:function(a){this.isEmojiButtonDisplayed&&(a.preventDefault(),a.stopImmediatePropagation(),a=a.clipboardData.getData("text/plain"),this.insertText_(a,!1,!1))}, insertText_:function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;this.maybeUpdateTextDirection_();if(this.isEmojiButtonDisplayed&&a){var d=this.getInputRange_().cloneRange();this.emojiManager&&d&&(b&&this.emojiInput.offsetStartOfRangeBy(d,a.length),this.insertTextWithEmojis_(d,a,c),u4a(this.getEditableTextArea_().lastChild)||(d=this.getInputRange_().cloneRange()),d&&(this.emojiInput.updateSuggestions(d,a),this.updateSuggestionOffset_(d)))}}, setSubmitButton_:function(){if(this.data){var a=this.data&&"BACKSTAGE_POST_DIALOG_PURPOSE_EDIT"===this.data.purpose,b=this.data&&this.data.editableText&&"BACKSTAGE_POST_DIALOG_PURPOSE_CREATE"!==this.data.purpose;if(a||b){var c=this.getTextAreaValue().trim();b=c===this.previousText_;c=!c||this.aboveCharLimit_;a&&this.data&&this.data.backstageAttachment&&(this.data.backstageAttachment.backstageImageRenderer||this.data.backstageAttachment.postMultiImageRenderer)&&(c=this.aboveCharLimit_);this.submitButtonDisabled= b||c||!this.getTextLength();a&&N("enable_post_scheduling")&&(this.submitButtonDisabled=b&&!this.scheduledPublishTimeSec_||c)}else this.submitButtonDisabled=!this.isValidInput_()}}, onSubmitButtonEnable_:function(){this.setSubmitButton_()}, onSubmitButtonDisable_:function(){this.submitButtonDisabled=!0}, getSimpleString:CL,computeCreationBoxClass_:function(a){return a?"focused":"not-focused"}, computeFooterMessageClass_:function(a,b){return b?"footer-error-message":"footer-alert-message"}, computeFooterMessage_:function(a,b){return b?b:a}, computeFooterMessageHidden_:function(a,b){return!b&&!a}, computePlaceholderText_:function(a,b,c){if("video"!==c&&"image"!==c||!a.prefilledPlaceholderText){if("poll"===b)return this.getSimpleString(a.pollPostPlaceholderText);if("image"===b)return this.getSimpleString(a.imagePostPlaceholderText)}else return this.getSimpleString(a.prefilledPlaceholderText);return void 0===a?"":this.getSimpleString(a.placeholderText)}, computeHideAttachmentButtons_:function(a,b,c){return void 0===a?!1:"none"!==b||"none"!==c||!a.videoLinkButton&&!a.pollButton&&!a.imageButton}, computeHideDismissableAttachment_:function(a){return"image"!==a&&"video"!==a}, computeHasVideo_:function(a){return"video"===a}, computeHasImage_:function(a){return"image"===a}, computeHasPoll_:function(a){return"poll"===a}, computeHasPollRendererInEditDialog_:function(a,b){return"BACKSTAGE_POST_DIALOG_PURPOSE_EDIT"===a&&!!b}, computePrefilledContent_:function(a){if(this.isValidPrefilledAttachment_(a.purpose,a.prefilledImageData,a.backstageAttachment))return a.backstageAttachment}, computeEditAttachment_:function(a){if(void 0===this.computePrefilledContent_(a))return a.backstageAttachment}, computeAuthorThumbnailDimension_:function(a,b){return a&&!b?24:40}, computeImageUploadEndpoint_:function(a){return this.get("imageButton.buttonRenderer.navigationEndpoint.backstageImageUploadEndpoint",a)}, computeEditableText_:function(a){return this.getSimpleString(a)}, computeIsBackstageComment_:function(a){return!(!a||"COMMENT_DIALOG_AVATAR_SIZE_TYPE_BACKSTAGE_COMMENT"!==a)}, computeServiceEndpoint_:function(a){return this.get("submitButton.buttonRenderer.serviceEndpoint",a)||this.get("replyButton.buttonRenderer.serviceEndpoint",a)||this.get("postButton.buttonRenderer.serviceEndpoint",a)}, computeSubmitButton_:function(a,b){a=this.get("submitButton.buttonRenderer",a)||this.get("replyButton.buttonRenderer",a)||this.get("postButton.buttonRenderer",a);b&&(a=b);a&&(a=Polymer.Base.mixin({},a),a.serviceEndpoint=void 0,a.isDisabled=this.submitButtonDisabled);return a}, computeIsEmojiButtonDisplayed_:function(a){return a.emojiButton&&a.emojiPicker&&a.emojiPicker.emojiPickerRenderer&&a.emojiPicker.emojiPickerRenderer.categories?a.emojiPicker.emojiPickerRenderer.categories.find(function(b){return b.emojiPickerCategoryRenderer?b.emojiPickerCategoryRenderer.emojiIds&&0=a)this.scheduledPublishTimeSec_=void 0;else if("BACKSTAGE_POST_DIALOG_PURPOSE_EDIT"===this.data.purpose){var b=parseInt(this.get("schedulingDateTimePicker.dateTimePickerRenderer.defaultTimeSec",this.data),10);this.scheduledPublishTimeSec_=isNaN(b)||b!==a?a:void 0}else this.scheduledPublishTimeSec_=a;this.setSubmitButton_()}}});var R4a;var S4a;var KS=function(){var a=O.apply(this,arguments)||this;a.hasCreatorReply=!1;a.buttonTooltipPosition="bottom";a.replyDialog=null;return a}; p(KS,O);e=KS.prototype;e.configureRendererStamper=function(){return{"data.creatorHeart":{id:"creator-heart",mapping:{creatorHeartRenderer:{component:"ytd-creator-heart-renderer"}}},replyButtonBeginning:{id:"reply-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}},replyButtonEnd:{id:"reply-button-end",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{forceIconButton:!0}}}},"data.shareButton":{id:"share-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.dataChanged=function(){this.replyDialog&&Polymer.dom(this.replyDialogElement).removeChild(this.replyDialog);this.replyDialog=null}; e.computeShowVoteCountBeginning=function(a,b){return void 0===a||void 0===b?!0:"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"!==a.style&&!!b&&"0"!==this.ytRendererBehavior.getSimpleString(b)}; e.computeShowVoteCountEnd=function(a,b){return void 0===a||void 0===b?!0:"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"===a.style&&!!b&&"0"!==this.ytRendererBehavior.getSimpleString(b)}; e.hideReplyDialog=function(){this.replyDialogElement.hidden=!0}; e.reply=function(){this.replyButtonElement.firstElementChild?this.replyButtonElement.firstElementChild.firstElementChild.click():this.replyButtonEndElement.firstElementChild&&this.replyButtonEndElement.firstElementChild.firstElementChild.click()}; e.showReplyDialog=function(a){a&&(this.replyDialog||(this.replyDialog=document.createElement("ytd-comment-reply-dialog-renderer"),this.replyDialog.id="replybox"),this.replyDialog.isAttached||Polymer.dom(this.replyDialogElement).appendChild(this.replyDialog),this.replyDialog.data=a,this.replyDialogElement.hidden=!1,this.replyDialog.openDialog())}; e.onYtCommentboxDismiss=function(){this.hideReplyDialog()}; e.onYtNavigate=function(a){(a=this.get("createCommentReplyDialogEndpoint.dialog.commentReplyDialogRenderer",a.detail.endpoint))&&this.showReplyDialog(a)}; e.onYtServiceRequestSent=function(a,b){a.stopPropagation();if(b.actions)for(a=0;a
\n \n \n \n \n \n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R4a){var d=document.createElement("template");d.innerHTML=""; R4a=d}d=R4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);S4a=a}a=S4a;return a}}}); var LS=KS;LS.prototype.onYtServiceRequestSent=LS.prototype.onYtServiceRequestSent;LS.prototype.onYtNavigate=LS.prototype.onYtNavigate;LS.prototype.onYtCommentboxDismiss=LS.prototype.onYtCommentboxDismiss;w([P(W.YtRendererBehavior),x("design:type",Object)],LS.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],LS.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],LS.prototype,"data",void 0); w([R(),x("design:type",Object)],LS.prototype,"voteCount",void 0);w([R(),x("design:type",Object)],LS.prototype,"replyThumbnail",void 0);w([R(),x("design:type",Object)],LS.prototype,"hasCreatorReply",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],LS.prototype,"enableCreationBox",void 0);w([R({computed:"computeActionButtonStyle(data)",reflectToAttribute:!0}),x("design:type",String)],LS.prototype,"actionButtonsStyle",void 0); w([R({computed:"computeReplyButtonBeginning(data)"}),x("design:type",Object)],LS.prototype,"replyButtonBeginning",void 0);w([R({computed:"computeReplyButtonEnd(data)"}),x("design:type",Object)],LS.prototype,"replyButtonEnd",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],LS.prototype,"useCommentIcon",void 0);w([R({observer:"onButtonTooltipPositionChanged"}),x("design:type",Object)],LS.prototype,"buttonTooltipPosition",void 0); w([AE("ytd-button-renderer"),x("design:type",Object)],LS.prototype,"ytdReplyButtonRenderer",void 0);w([AE("#like-button"),x("design:type",bQ)],LS.prototype,"ytdLikeToggleButtonRenderer",void 0);w([AE("#dislike-button"),x("design:type",bQ)],LS.prototype,"ytdDislikeToggleButtonRenderer",void 0);w([AE("#reply-dialog"),x("design:type",HTMLElement)],LS.prototype,"replyDialogElement",void 0);w([AE("#reply-button"),x("design:type",HTMLElement)],LS.prototype,"replyButtonElement",void 0); w([AE("#reply-button-end"),x("design:type",HTMLElement)],LS.prototype,"replyButtonEndElement",void 0);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],LS.prototype,"onYtCommentboxDismiss",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],LS.prototype,"onYtNavigate",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],LS.prototype,"onYtServiceRequestSent",null);LS=w([U({is:"ytd-comment-action-buttons-renderer"})],LS);var T4a;var U4a;var MS=function(){var a=O.apply(this,arguments)||this;a.isOpen=!1;return a}; p(MS,O);e=MS.prototype;e.dataChanged=function(){this.isOpen=!1}; e.onTap=function(){this.data&&(this.data.navigationEndpoint?this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}):this.openDialog())}; e.focus=function(){this.commentbox.focus()}; e.onYtCommentboxDismiss=function(){this.isOpen=!1}; e.openDialog=function(){this.isOpen=!0;this.commentbox.focus()}; h.Object.defineProperties(MS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===U4a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===T4a){var d=document.createElement("template");d.innerHTML=""; T4a=d}d=T4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);U4a=a}a=U4a;return a}}}); var NS=MS;NS.prototype.onYtCommentboxDismiss=NS.prototype.onYtCommentboxDismiss;NS.prototype.dataChanged=NS.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],NS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],NS.prototype,"data",void 0);w([R(),x("design:type",Object)],NS.prototype,"isOpen",void 0);w([AE("#commentbox"),x("design:type",Object)],NS.prototype,"commentbox",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],NS.prototype,"dataChanged",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],NS.prototype,"onYtCommentboxDismiss",null);NS=w([U({is:"ytd-comment-reply-dialog-renderer"})],NS);var V4a;var W4a;var OS=function(){return O.apply(this,arguments)||this}; p(OS,O);OS.prototype.onYtButtonTap=function(){if(this.data.isEnabled){var a=this.data.isHearted;this.toggle();this.ytRendererBehavior.markDirty();(a=this.getEndpoint(a))&&this.actionSenderBehavior.sendServiceRequestAction([a])}}; OS.prototype.toggle=function(a){this.set("data.isHearted",void 0!==a?a:!this.data.isHearted)}; OS.prototype.getEndpoint=function(a){var b,c,d=null===(b=this.data)||void 0===b?void 0:b.heartEndpoint,f=null===(c=this.data)||void 0===c?void 0:c.unheartEndpoint;if(d&&f)return a?f:d}; OS.prototype.computeButtonAccessibility=function(a,b){var c,d,f,g,l=null===(d=null===(c=null===a||void 0===a?void 0:a.heartedAccessibility)||void 0===c?void 0:c.accessibilityData)||void 0===d?void 0:d.label;a=null===(g=null===(f=null===a||void 0===a?void 0:a.unheartedAccessibility)||void 0===f?void 0:f.accessibilityData)||void 0===g?void 0:g.label;return b?l:a}; h.Object.defineProperties(OS.prototype,{heartTooltip:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.data.isHearted?this.data.heartedTooltip:this.data.unheartedTooltip}}}); h.Object.defineProperties(OS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===W4a){var a=document.createElement("template");a.innerHTML="\n \n \n\n[[heartTooltip]]\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V4a){var d=document.createElement("template");d.innerHTML=""; V4a=d}d=V4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);W4a=a}a=W4a;return a}}}); var PS=OS;PS.prototype.onYtButtonTap=PS.prototype.onYtButtonTap;w([P(W.YtRendererBehavior),x("design:type",Object)],PS.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],PS.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],PS.prototype,"data",void 0);w([zE("data.isHearted"),x("design:type",Object),x("design:paramtypes",[])],PS.prototype,"heartTooltip",null); w([R({computed:"computeButtonAccessibility(data,data.isHearted)"}),x("design:type",String)],PS.prototype,"buttonAccessibility",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],PS.prototype,"onYtButtonTap",null);PS=w([U({is:"ytd-creator-heart-renderer"})],PS);var X4a;var Y4a;var QS=function(){return O.apply(this,arguments)||this}; p(QS,O);QS.prototype.focus=function(){this.$.commentbox.focus()}; h.Object.defineProperties(QS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Y4a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X4a){var d=document.createElement("template");d.innerHTML="";X4a=d}d=X4a;c.call(b,d.content.cloneNode(!0), a.content.firstChild);Y4a=a}a=Y4a;return a}}}); var RS=QS;w([P(W.YtRendererBehavior),x("design:type",Object)],RS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],RS.prototype,"data",void 0);w([R(),x("design:type",Object)],RS.prototype,"zeroStepFooterText",void 0);RS=w([U({is:"ytd-comment-dialog-renderer"})],RS);var Z4a;var $4a;var SS=function(){return O.apply(this,arguments)||this}; p(SS,O); SS.prototype.configureRendererStamper=function(){return{"data.approveButton":{id:"approve-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.removeButton":{id:"remove-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.reportButton":{id:"report-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.banButton":{id:"ban-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}}}}; h.Object.defineProperties(SS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$4a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z4a){var d=document.createElement("template");d.innerHTML=""; Z4a=d}d=Z4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$4a=a}a=$4a;return a}}}); var TS=SS;w([P(W.YtRendererBehavior),x("design:type",Object)],TS.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],TS.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],TS.prototype,"data",void 0);TS=w([U({is:"ytd-comment-moderation-buttons-renderer"})],TS);var a5a;var b5a;var US=function(){var a=O.apply(this,arguments)||this;a.isReply=!1;a.isCreatorReply=!1;a.editDialog=null;a.isLoading=!1;a.repliesVisible=!1;a.linkedBadgeEl=null;a.shouldShowReadMoreInitially=!1;a.THREAD_MARGIN_INCREMENT=40;a.MIN_RENDERER_WIDTH=428;a.spinnerEl=null;a.parentOffsetWidth=0;a.attachedResolver=Qi();a.isCollapsibleThreadingExperiment=N("default_collapse_reply_threads");return a}; p(US,O);e=US.prototype; e.configureRendererStamper=function(){return{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.pinnedCommentBadge":{id:"pinned-comment-badge",mapping:{pinnedCommentBadgeRenderer:"ytd-pinned-comment-badge-renderer"}},"data.sponsorCommentBadge":{id:"sponsor-comment-badge",mapping:{sponsorCommentBadgeRenderer:"ytd-sponsor-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge", mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},editDialog:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer",commentDialogRenderer:"ytd-comment-dialog-renderer",commentReplyDialogRenderer:"ytd-comment-reply-dialog-renderer"}},"data.moderationButtons":{id:"moderation-buttons",mapping:{commentModerationButtonsRenderer:{component:"ytd-comment-moderation-buttons-renderer"}}}}}; e.contentTextChanged=function(){this.expander.reset()}; e.attached=function(){this.attachedResolver.resolve();this.parentNode&&(this.parentOffsetWidth=this.parentNode.offsetWidth,this.data&&this.updateNestingLevel(this.data.threadNestingLevel))}; e.detached=function(){this.isCreatorReply=!1}; e.dataChanged=function(a){var b=this;if(a&&(c5a(function(){b.ytRendererBehavior.markDirty()}),this.isLoading=!1,this.editDialog=null,this.linkedBadgeEl&&(this.linkedCommentBadge.removeChild(this.linkedBadgeEl),this.linkedBadgeEl=null),a.hiddenByDefault&&(this.hidden=!0),this.repliesVisible=3>a.threadNestingLevel,a.actions))for(var c=0,d=a.actions.length;c\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a5a){var d=document.createElement("template");d.innerHTML=""; a5a=d}d=a5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b5a=a}a=b5a;return a}}}); var VS=US;VS.prototype.onYtExpanderMoreTapped=VS.prototype.onYtExpanderMoreTapped;VS.prototype.onWindowResize=VS.prototype.onWindowResize;VS.prototype.updateNestingLevel=VS.prototype.updateNestingLevel;VS.prototype.onYtServiceRequestCompleted=VS.prototype.onYtServiceRequestCompleted;VS.prototype.onYtServiceRequestSent=VS.prototype.onYtServiceRequestSent;VS.prototype.onYtCommentboxDismiss=VS.prototype.onYtCommentboxDismiss;VS.prototype.onYtNavigate=VS.prototype.onYtNavigate; VS.prototype.linkedCommentBadgeChanged=VS.prototype.linkedCommentBadgeChanged;VS.prototype.dataChanged=VS.prototype.dataChanged;VS.prototype.contentTextChanged=VS.prototype.contentTextChanged;w([P(Y),x("design:type",Object)],VS.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],VS.prototype,"componentBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],VS.prototype,"ytRendererBehavior",void 0); w([P(mP),x("design:type",Object)],VS.prototype,"ytVisibilityBehavior",void 0);w([P(Polymer.IronResizableBehavior),x("design:type",Object)],VS.prototype,"ironResizableBehavior",void 0);w([R(),x("design:type",Object)],VS.prototype,"data",void 0);w([R({computed:"computeCommentStyle(data)",reflectToAttribute:!0}),x("design:type",String)],VS.prototype,"commentStyle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],VS.prototype,"isReply",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],VS.prototype,"isCreatorReply",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],VS.prototype,"voteCount",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],VS.prototype,"replyThumbnail",null);w([R(),x("design:type",Object)],VS.prototype,"editDialog",void 0);w([zE("data, data.containsCreatorReply"),x("design:type",Boolean),x("design:paramtypes",[])],VS.prototype,"hasCreatorReply",null); w([R({observer:"isLoadingChanged"}),x("design:type",Object)],VS.prototype,"isLoading",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],VS.prototype,"noActions",void 0);w([R(),x("design:type",Object)],VS.prototype,"repliesVisible",void 0);w([R(),x("design:type",Object)],VS.prototype,"linkedBadgeEl",void 0);w([R(),x("design:type",Object)],VS.prototype,"shouldShowReadMoreInitially",void 0); w([zE("repliesVisible"),x("design:type",Boolean),x("design:paramtypes",[])],VS.prototype,"hideViewThreadedRepliesButton",null);w([zE("repliesVisible"),x("design:type",Boolean),x("design:paramtypes",[])],VS.prototype,"hideHideThreadedRepliesButton",null);w([AE("ytd-expander"),x("design:type",Object)],VS.prototype,"expander",void 0);w([AE("#linked-comment-badge"),x("design:type",HTMLElement)],VS.prototype,"linkedCommentBadge",void 0); w([AE("#body"),x("design:type",HTMLElement)],VS.prototype,"body",void 0);w([AE("#edit-dialog"),x("design:type",HTMLElement)],VS.prototype,"editDialogContainer",void 0);w([yE("data.contentText"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],VS.prototype,"contentTextChanged",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],VS.prototype,"dataChanged",null); w([yE("data.linkedCommentBadge"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],VS.prototype,"linkedCommentBadgeChanged",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],VS.prototype,"onYtNavigate",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],VS.prototype,"onYtCommentboxDismiss",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],VS.prototype,"onYtServiceRequestSent",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],VS.prototype,"onYtServiceRequestCompleted",null); w([yE("data.threadNestingLevel"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],VS.prototype,"updateNestingLevel",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],VS.prototype,"onWindowResize",null);w([S("yt-expander-more-tapped"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],VS.prototype,"onYtExpanderMoreTapped",null);VS=w([U({is:"ytd-comment-renderer"})],VS); var c5a=function(a){Bk.addJob(function(){requestAnimationFrame(a)},8)};var d5a;var e5a;var WS=function(){return O.apply(this,arguments)||this}; p(WS,O);h.Object.defineProperties(WS.prototype,{icon:{configurable:!0,enumerable:!0,get:function(){var a,b,c=null===(b=null===(a=this.data)||void 0===a?void 0:a.icon)||void 0===b?void 0:b.iconType;return c?"yt-icons:"+c.toLowerCase():null}}}); h.Object.defineProperties(WS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===e5a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===d5a){var d=document.createElement("template");d.innerHTML=""; d5a=d}d=d5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);e5a=a}a=e5a;return a}}}); var XS=WS;w([P(W.YtRendererBehavior),x("design:type",Object)],XS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],XS.prototype,"data",void 0);w([R(),zE("data.icon"),x("design:type",Object),x("design:paramtypes",[])],XS.prototype,"icon",null);XS=w([U({is:"ytd-pinned-comment-badge-renderer"})],XS);var f5a;var g5a;var YS=function(){var a=O.apply(this,arguments)||this;a.hostAttributes={role:"img"};return a}; p(YS,O);YS.prototype.configureRendererStamper=function(){return{"data.icon":{id:"icon",mapping:{iconType:{component:"yt-icon",properties:{icon:"[[data.icon.iconType]]",sharedTooltipText:"[[data.tooltip]]"}}}},data:{id:"custom-badge",mapping:{customBadge:{component:"yt-img-shadow",properties:{thumbnail:"[[data.customBadge]]",sharedTooltipText:"[[data.tooltip]]"}}}}}}; YS.prototype.attached=function(){this.hasAttribute("role")||this.setAttribute("role","img")}; YS.prototype.colorChanged=function(a){var b;if(a=null===(b=null===a||void 0===a?void 0:a.basicColorPaletteData)||void 0===b?void 0:b.foregroundBodyColor)this.rgbBadgeColor=dO(a);this.$.icon.style.color=this.rgbBadgeColor}; YS.prototype.tooltipChanged=function(a){null!=a?this.setAttribute("aria-label",a):this.removeAttribute("aria-label")}; h.Object.defineProperties(YS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===g5a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===f5a){var d=document.createElement("template");d.innerHTML=""; f5a=d}d=f5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);g5a=a}a=g5a;return a}}}); var ZS=YS;ZS.prototype.tooltipChanged=ZS.prototype.tooltipChanged;ZS.prototype.colorChanged=ZS.prototype.colorChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],ZS.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],ZS.prototype,"ytRendererstamperBehavior",void 0);w([P(z0a),x("design:type",Object)],ZS.prototype,"ytSharedTooltipBehavior",void 0);w([R(),x("design:type",Object)],ZS.prototype,"data",void 0); w([R({value:"#4285F4"}),x("design:type",String)],ZS.prototype,"rgbBadgeColor",void 0);w([yE("data.color"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],ZS.prototype,"colorChanged",null);w([yE("data.tooltip"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],ZS.prototype,"tooltipChanged",null);ZS=w([U({is:"ytd-sponsor-comment-badge-renderer"})],ZS);var h5a;var i5a;var $S=function(){return O.apply(this,arguments)||this}; p($S,O);$S.prototype.iconColorChanged=function(){var a,b,c,d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.iconColor)||void 0===b?void 0:b.basicColorPaletteData)||void 0===c?void 0:c.foregroundBodyColor;d&&(this.rgbIconColor=dO(d));this.$.icon.style.color=this.rgbIconColor}; h.Object.defineProperties($S,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===i5a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h5a){var d=document.createElement("template");d.innerHTML=""; h5a=d}d=h5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);i5a=a}a=i5a;return a}}}); var aT=$S;aT.prototype.iconColorChanged=aT.prototype.iconColorChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],aT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],aT.prototype,"data",void 0);w([R({value:"#4285F4"}),x("design:type",String)],aT.prototype,"rgbIconColor",void 0);w([yE("data.iconColor"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aT.prototype,"iconColorChanged",null); aT=w([U({is:"ytd-sponsors-only-badge-renderer"})],aT);var j5a;var k5a;Polymer({is:"ytd-comment-replies-renderer",_template:function(){if(void 0!==k5a)return k5a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===j5a){var d=document.createElement("template");d.innerHTML=""; j5a=d}d=j5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return k5a=a}, behaviors:[SQ,W.YtRendererBehavior,Y],properties:{data:{type:Object,observer:"dataChanged_"},hasContinuation_:{type:Boolean,computed:"computeHasContinuation_(data.continuations)"},isLoading_:{type:Boolean,observer:"isLoadingChanged_"},isShowRepliesVisible:{type:Boolean,value:!0,observer:"isShowMoreChanged_"},useNewFormatting:{type:Boolean,value:!1},allRepliesVisible:{type:Boolean,value:!0},domRepeatInitialCount:{type:Number,value:10}},attached:function(){this.isShowRepliesVisible=!0}, created:function(){this.spinnerEl_=null;this.replyPageSize_=50;this.domRepeatInitialCount=10}, listeners:{"yt-retrieve-location":"onRetrieveLocation_","yt-expander-more-tapped":"triggerFirstContinuation_","yt-rendererstamper-finished":"onRenderStamperFinished_"},stampDom:{"data.continuations":{id:"continuation",mapping:{nextContinuationData:{component:"yt-next-continuation",params:{showButton:!0,showIcon:!0}}}},"data.teaserContents":{id:"teaser-replies",mapping:{commentRenderer:{component:"ytd-comment-renderer",params:{isReply:!0}}}}},dataChanged_:function(){var a=this.$["expander-contents"]; a&&(a.hidden=!0);this.isLoading_=!1}, onLoadedRepliesDomChange_:function(){this.domRepeatInitialCount=this.root.querySelectorAll("ytd-comment-renderer").length;this.fakeContinuation_&&(this.allRepliesVisible=void 0===this.root.querySelector("ytd-comment-renderer[hidden]"))}, nextContinuation:{continuationType:"commentRepliesContinuation",usePost:!0},computeHasContinuation_:function(a){return!!a}, get fakeContinuation_(){return this.get("data.fakeContinuation.nextContinuationData")},onRetrieveLocation_:function(a,b){b.locationRetrieved("/comment_service_ajax?action_get_comment_replies=1&pbj=1",void 0);a.stopPropagation()}, triggerFirstContinuation_:function(){if(!this.data.contents){var a=this.$$("yt-next-continuation");a&&a.trigger()}}, isLoadingChanged_:function(a){a&&!this.spinnerEl_&&(this.spinnerEl_=document.createElement("paper-spinner-lite"),Polymer.dom(this.$$("#expander-contents")).appendChild(this.spinnerEl_));this.spinnerEl_&&(this.spinnerEl_.active=a);a?this.$["loaded-replies"].classList.add("reloading"):this.$["loaded-replies"].classList.remove("reloading")}, handleIsShowMoreTap_:function(){this.isShowRepliesVisible=!1;this.triggerFirstContinuation_();var a=this.data.viewReplies.buttonRenderer;a&&this.logExplicitClick(a)}, handleIsShowLessTap_:function(){this.isShowRepliesVisible=!0;var a=this.data.hideReplies.buttonRenderer;a&&this.logExplicitClick(a)}, isShowMoreChanged_:function(a){this.$["expander-contents"].hidden=a}, handleContinuationTap_:function(){if(this.fakeContinuation_){this.logExplicitClick(this.fakeContinuation_);var a=[].concat(fa(this.root.querySelectorAll("ytd-comment-renderer:not([hidden])")));a=a[a.length-1];for(var b=a.nextElementSibling;b&&!(b.tagName==a.tagName&&b.data.threadNestingLevel<=a.data.threadNestingLevel);)b=b.nextElementSibling;for(var c=0;b&&c=b.data.threadNestingLevel&&(b.hidden=!1,c+=1),b=b.nextElementSibling;this.allRepliesVisible=!b}}});var l5a;var m5a;Polymer({is:"yt-next-continuation",_template:function(){if(void 0!==m5a)return m5a;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l5a){var d=document.createElement("template");d.innerHTML=""; l5a=d}d=l5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return m5a=a}, behaviors:[mP,W.YtRendererBehavior],properties:{data:{type:Object,observer:"observeData_"},showButton:{type:Boolean,value:!1,observer:"showButtonChanged_"},showIcon:{type:Boolean,value:!1},label:{type:Object,computed:"computeLabel_(data, showButton)"},showMoreText_:{type:Object,value:zL(mL("SHOW_MORE",void 0,"Show More"))},spinnerActive_:{type:Boolean,value:!1},hasBeenTriggered_:{type:Boolean,value:!1}},observeVisibleOption:null,observeHiddenOption:null,observePrescanOption:"observe_once",created:function(){this.triggered_= !1}, attached:function(){this.maybeTriggerAutoload()}, detached:function(){this.hasBeenTriggered_=!1}, onPrescanVisible:function(){this.onShow()}, onShow:function(){this.showButton||this.trigger()}, trigger:function(){this.data&&this.data.continuation&&(this.spinnerActive_=!0,this.showButton=!1,this.triggered_||(this.fire("yt-load-next-continuation",this.getContinuationUrl.bind(this)),this.hasBeenTriggered_=this.triggered_=!0))}, triggerIfNotPreviouslyTriggered:function(){this.hasBeenTriggered_||this.trigger()}, maybeTriggerAutoload:function(){this.data&&this.isAttached&&this.data.autoloadEnabled&&this.data.autoloadImmediately&&this.trigger()}, computeLabel_:function(a,b){return void 0===a?null:a.label||!b?a.label:this.showMoreText_}, observeData_:function(){this.spinnerActive_=this.triggered_=!1;this.invalidate(!1);this.maybeTriggerAutoload()}, getContinuationUrl:function(a){var b={ctoken:this.data.continuation,continuation:this.data.continuation};this.data.clickTrackingParams&&(b.itct=this.data.clickTrackingParams);return Jd(a,b)}, showButtonChanged_:function(){this.invalidate(!1)}});var n5a;var o5a;iP("itemSectionRenderer","commentThreadRenderer","ytd-comment-thread-renderer");var bT=function(){return O.apply(this,arguments)||this}; p(bT,O);bT.prototype.configureRendererStamper=function(){return{"data.replies":{id:"replies",mapping:{commentRepliesRenderer:{component:"ytd-comment-replies-renderer",noInjection:!0}}}}}; h.Object.defineProperties(bT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===o5a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n5a){var d=document.createElement("template");d.innerHTML=""; n5a=d}d=n5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);o5a=a}a=o5a;return a}}}); var cT=bT;w([P(W.YtRendererBehavior),x("design:type",Object)],cT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],cT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],cT.prototype,"data",void 0);cT=w([U({is:"ytd-comment-thread-renderer"})],cT);var p5a;var q5a;var r5a={"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge",mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},"data.backstageAttachment":{id:"content-attachment",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}},backstageImageRenderer:{component:"ytd-backstage-image-renderer", properties:{surface:"[[data.surface]]"}},postMultiImageRenderer:{component:"ytd-post-multi-image-renderer",properties:{surface:"[[data.surface]]"}},playlistRenderer:{component:"ytd-playlist-renderer",params:{isBackstagePlaylist:!0}}}},editDialog_:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}}},dT=function(){var a=O.apply(this,arguments)||this;a.hasInlineCommentSection=!1;a.editDialog_=null;a.isLoading_=!1;a.spinnerEl=null;a.actionMap={"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"}; return a}; p(dT,O);e=dT.prototype;e.configureRendererStamper=function(){return r5a}; e.getPublishTimeStampString=function(a,b){b=new Date(1E3*(Number(b)-60*(new Date().getTimezoneOffset()-new Date(1E3*Number(b)).getTimezoneOffset())));b=new MF(10).format(b);if(a&&a.runs&&a.runs.length)for(var c=0;c\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p5a){var d=document.createElement("template");d.innerHTML=""; p5a=d}d=p5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);q5a=a}a=q5a;return a}}}); var eT=dT;eT.prototype.computeVoteCount_=eT.prototype.computeVoteCount_;eT.prototype.onYtServiceRequestCompleted=eT.prototype.onYtServiceRequestCompleted;eT.prototype.onYtServiceRequestSent=eT.prototype.onYtServiceRequestSent;eT.prototype.onYtCommentPollRevert=eT.prototype.onYtCommentPollRevert;eT.prototype.onYtCommentboxDismiss=eT.prototype.onYtCommentboxDismiss;eT.prototype.onYtNavigate=eT.prototype.onYtNavigate;eT.prototype.dataChanged_=eT.prototype.dataChanged_; eT.prototype.contentTextChanged_=eT.prototype.contentTextChanged_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],eT.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],eT.prototype,"rendererBehavior",void 0);w([P(Y),x("design:type",Object)],eT.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],eT.prototype,"data",void 0);w([R(),x("design:type",Boolean)],eT.prototype,"hasInlineCommentSection",void 0); w([R({computed:"computeVoteCount_(data)"}),x("design:type",Object)],eT.prototype,"voteCount_",void 0);w([R(),x("design:type",Object)],eT.prototype,"editDialog_",void 0);w([R({observer:"isLoadingChanged_"}),x("design:type",Boolean)],eT.prototype,"isLoading_",void 0);w([yE("data.contentText"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],eT.prototype,"contentTextChanged_",null); w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],eT.prototype,"dataChanged_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],eT.prototype,"onYtNavigate",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eT.prototype,"onYtCommentboxDismiss",null); w([S("yt-comment-poll-revert"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],eT.prototype,"onYtCommentPollRevert",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],eT.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],eT.prototype,"onYtServiceRequestCompleted",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],eT.prototype,"computeVoteCount_",null);w([zE("data.backstageAttachment"),x("design:type",Boolean),x("design:paramtypes",[])],eT.prototype,"hasPoll_",null);eT=w([U({is:"ytd-backstage-post-renderer"})],eT);var s5a;var t5a;var fT=function(){return O.apply(this,arguments)||this}; p(fT,O);fT.prototype.configureRendererStamper=function(){return{"data.images":{id:"items",mapping:{backstageImageRenderer:{component:"ytd-backstage-image-renderer",properties:{surface:"[[surface]]"}}}}}}; h.Object.defineProperties(fT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===t5a){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s5a){var d=document.createElement("template");d.innerHTML=""; s5a=d}d=s5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t5a=a}a=t5a;return a}}}); var gT=fT;w([P(W.YtRendererBehavior),x("design:type",Object)],gT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],gT.prototype,"ytRendererstamperBehavior",void 0);w([P(NQ.YtdHorizontalListBehavior),x("design:type",Object)],gT.prototype,"ytdHorizontalListBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],gT.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],gT.prototype,"data",void 0); w([R({value:"$.items.children"}),x("design:type",String)],gT.prototype,"itemsPath",void 0);w([R({value:1}),x("design:type",Number)],gT.prototype,"initialCount",void 0);w([R(),x("design:type",String)],gT.prototype,"surface",void 0);gT=w([U({is:"ytd-post-multi-image-renderer"})],gT);var u5a;var v5a;iP("itemSectionRenderer","backstagePostThreadRenderer","ytd-backstage-post-thread-renderer");var hT=function(){var a=O.apply(this,arguments)||this;a.enableBordersOnCommunity=N("enable_borders_on_community");a.enableImprovedCommunityTab=N("enable_post_renderer_for_kevlar_community_tab");a.handleOpenPostCommentDialogActionAfterStamp_=!1;a.actionMap={"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"};return a}; p(hT,O);e=hT.prototype; e.configureRendererStamper=function(){return{"data.post":{id:"post",mapping:{backstagePostRenderer:{component:"ytd-backstage-post-renderer",properties:{hasInlineCommentSection:"[[hasInlineCommentSection]]"}},postRenderer:"ytd-post-renderer",sharedPostRenderer:"ytd-shared-post-renderer"}},"data.comments":{id:"comments",mapping:{backstageCommentsRenderer:"ytd-backstage-comments-renderer"}},"data.moderationPanel":{id:"moderation-panel",mapping:{commentModerationPanelRenderer:"ytd-comment-moderation-panel-renderer"}},"data.commentDialog":{id:"comment-dialog", mapping:{commentReplyDialogRenderer:"ytd-comment-reply-dialog-renderer"},events:!0}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.onStampFinished_=function(){this.handleOpenPostCommentDialogActionAfterStamp_&&this.handleSignalActionOpenPostCommentDialogAction_()}; e.handleSignalActionOpenPostCommentDialogAction_=function(){var a=this.$$("ytd-comment-reply-dialog-renderer");a?a.openDialog():this.handleOpenPostCommentDialogActionAfterStamp_=!0}; e.onYtCommentModerationPanelEmpty_=function(){this.set("data.moderationPanel",{})}; e.computeHasInlineCommentSection_=function(a){return!!a}; h.Object.defineProperties(hT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v5a){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u5a){var d=document.createElement("template");d.innerHTML=""; u5a=d}d=u5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v5a=a}a=v5a;return a}}}); var iT=hT;iT.prototype.onYtCommentModerationPanelEmpty_=iT.prototype.onYtCommentModerationPanelEmpty_;iT.prototype.onStampFinished_=iT.prototype.onStampFinished_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],iT.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],iT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],iT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],iT.prototype,"data",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],iT.prototype,"enableBordersOnCommunity",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],iT.prototype,"enableImprovedCommunityTab",void 0);w([R({computed:"computeHasInlineCommentSection_(data.comments)"}),x("design:type",Boolean)],iT.prototype,"hasInlineCommentSection",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],iT.prototype,"onStampFinished_",null); w([S("ytd-comment-moderation-panel-empty"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],iT.prototype,"onYtCommentModerationPanelEmpty_",null);iT=w([U({is:"ytd-backstage-post-thread-renderer"})],iT);var w5a;var x5a;var jT=function(){var a=O.apply(this,arguments)||this;a.editDialog_=null;a.isLoading_=!1;a.isRichGrid_=!1;a.isRichGridRepost_=!1;a.reduceSidePaddings_=N("reduce_side_paddings_in_shelf");a.spinnerEl_=null;return a}; p(jT,O);e=jT.prototype; e.configureRendererStamper=function(){return{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge",mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},"data.backstageAttachment":{id:"content-attachment",mapping:{videoRenderer:{component:"ytd-video-renderer",properties:{isPostCompactVideo:"[[usesCompactLockup_]]", isRichGridVideoPost:"[[isRichGrid_]]"}},backstageImageRenderer:{component:"ytd-backstage-image-renderer",properties:{surface:"[[data.surface]]"}},playlistRenderer:{component:"ytd-playlist-renderer",properties:{isPostCompactPlaylist:"[[usesCompactLockup_]]"}}}},"data.voteButton":{id:"vote-button",mapping:{buttonRenderer:"ytd-button-renderer"}},editDialog_:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer", notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.contentTextChanged_=function(){this.$.expander.reset()}; e.dataChanged_=function(a){var b=this;this.isLoading_=!1;this.editDialog_=null;for(var c=0,d=a.actions&&a.actions.length;c\n
\n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w5a){var d=document.createElement("template");d.innerHTML=""; w5a=d}d=w5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x5a=a}a=x5a;return a}}}); var kT=jT;kT.prototype.onYtServiceRequestCompleted_=kT.prototype.onYtServiceRequestCompleted_;kT.prototype.onYtServiceRequestSent_=kT.prototype.onYtServiceRequestSent_;kT.prototype.onYtCommentPollRevert_=kT.prototype.onYtCommentPollRevert_;kT.prototype.onYtCommentboxDismiss_=kT.prototype.onYtCommentboxDismiss_;kT.prototype.onYtNavigate_=kT.prototype.onYtNavigate_;kT.prototype.contentTextChanged_=kT.prototype.contentTextChanged_; w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],kT.prototype,"ytdDismissableItemBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],kT.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],kT.prototype,"ytActionSenderBehavior",void 0);w([P(Y),x("design:type",Object)],kT.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],kT.prototype,"data",void 0); w([R({computed:"computeVoteCount_(data)"}),x("design:type",Object)],kT.prototype,"voteCount_",void 0);w([R(),x("design:type",Object)],kT.prototype,"editDialog_",void 0);w([R({observer:"isLoadingChanged_"}),x("design:type",Object)],kT.prototype,"isLoading_",void 0);w([R({computed:"computeHasPoll_(data)"}),x("design:type",Boolean)],kT.prototype,"hasPoll_",void 0);w([R({computed:"computePollStatus_(data.pollStatus)"}),x("design:type",Object)],kT.prototype,"pollStatus_",void 0); w([R({computed:"computeSurfaceType_(data.surface)",reflectToAttribute:!0}),x("design:type",String)],kT.prototype,"surface_",void 0);w([R({computed:"computeUsesCompactLockup_(data.surface)",reflectToAttribute:!0}),x("design:type",Boolean)],kT.prototype,"usesCompactLockup_",void 0);w([R({computed:"computeShowWithoutToolbar_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],kT.prototype,"showWithoutToolbar_",void 0); w([R({computed:"computePostAttachment_(data)",reflectToAttribute:!0}),x("design:type",String)],kT.prototype,"attachment",void 0);w([R({reflectToAttribute:!0,value:N("enable_taller_posts_on_desktop")}),x("design:type",Boolean)],kT.prototype,"enableTallerHeight_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],kT.prototype,"isRichGrid_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],kT.prototype,"isRichGridRepost_",void 0); w([R({reflectToAttribute:!0,value:N("use_better_post_dismissals")}),x("design:type",Boolean)],kT.prototype,"useBetterPostDismissals_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],kT.prototype,"reduceSidePaddings_",void 0);w([yE("data.contentText"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],kT.prototype,"contentTextChanged_",null); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],kT.prototype,"onYtNavigate_",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],kT.prototype,"onYtCommentboxDismiss_",null);w([S("yt-comment-poll-revert"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],kT.prototype,"onYtCommentPollRevert_",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],kT.prototype,"onYtServiceRequestSent_",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],kT.prototype,"onYtServiceRequestCompleted_",null);kT=w([U({is:"ytd-post-renderer"})],kT);var y5a;var z5a;var lT=function(){var a=O.apply(this,arguments)||this;a.editDialog_=null;a.showExpandButton_=!1;a.isRichGrid_=!1;return a}; p(lT,O);e=lT.prototype;e.configureRendererStamper=function(){return{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.originalPost":{id:"original-post",mapping:{backstagePostRenderer:"ytd-backstage-post-renderer",postRenderer:{component:"ytd-post-renderer",properties:{isRichGridRepost_:"[[isRichGrid_]]"}}}},editDialog_:{id:"repost-edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}}}}; e.dataChanged_=function(){this.editDialog_=null;this.showExpandButton_=this.computeShowExpandButton_(this.data)}; e.computeShowExpandButton_=function(a){if(this.usesCompactLockup_||a&&a.showFullContentText)return!1;a=this.$["repost-content-text"];return a.scrollHeight>a.clientHeight}; e.computeUsesCompactLockup_=function(a){return!!a.condensedContent}; e.computeShowFullContentText_=function(a){return!a}; e.onYtNavigate_=function(a){a=this.get("updateCommentDialogEndpoint",a.detail.endpoint);this.openEditDialog_(a)}; e.onYtCommentboxDismiss_=function(){this.editDialog_=null}; e.openEditDialog_=function(a){a&&a.dialog&&(this.editDialog_=a.dialog,a=this.$["repost-edit-dialog"].firstElementChild)&&(a.focus(),a.openDialog&&a.openDialog())}; e.onTap_=function(a){if(this.data){var b=null;this.usesCompactLockup_&&!RR(Polymer.dom(a).path||[],this,["YT-IMG-SHADOW"])?b=this.get("navigationEndpoint",this.data):a.target===this.$.more&&(b=this.get("navigationEndpoint",a.target.data));b&&this.fire("yt-navigate",{endpoint:b})}}; h.Object.defineProperties(lT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===z5a){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y5a){var d=document.createElement("template");d.innerHTML=""; y5a=d}d=y5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z5a=a}a=z5a;return a}}}); var mT=lT;mT.prototype.onYtCommentboxDismiss_=mT.prototype.onYtCommentboxDismiss_;mT.prototype.onYtNavigate_=mT.prototype.onYtNavigate_;w([P(W.YtRendererBehavior),x("design:type",Object)],mT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],mT.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],mT.prototype,"data",void 0);w([R(),x("design:type",Object)],mT.prototype,"editDialog_",void 0); w([R({computed:"computeUsesCompactLockup_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],mT.prototype,"usesCompactLockup_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],mT.prototype,"showExpandButton_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],mT.prototype,"isRichGrid_",void 0);w([R({computed:"computeShowFullContentText_(data.showFullContentText)",reflectToAttribute:!0}),x("design:type",Boolean)],mT.prototype,"showFullContentText_",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],mT.prototype,"onYtNavigate_",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mT.prototype,"onYtCommentboxDismiss_",null);mT=w([U({is:"ytd-shared-post-renderer"})],mT);var A5a;var B5a;var nT=function(){var a=O.apply(this,arguments)||this;a.hasSpam_=!1;a.showButton_=!0;a.actionMap={"yt-approve-comment-action":"approveCommentAction_","yt-ban-author-action":"banAuthorAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-load-next-continuation":"onLoadNextContinuation_"};a.nextContinuation={contentsArray:"data.contents",continuationType:"commentModerationPanelContinuation",requestPath:"/comment_service_ajax?action_get_comment_replies=1&pbj=1", usePost:!0};return a}; p(nT,O);e=nT.prototype;e.configureRendererStamper=function(){return{"data.continuations":{id:"continuation",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]"}}}},"data.contents":{id:"held-comments",mapping:{commentRenderer:{component:"ytd-comment-renderer"}}},"data.likelySpamContents":{id:"likely-spam-comments",mapping:{commentRenderer:{component:"ytd-comment-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){this.$["moderation-contents"].addEventListener("scroll",this.onPanelScroll_.bind(this))}; e.dataChanged_=function(){this.$.expander.collapsed=!0}; e.computeSettingsButton_=function(a){return(a=a&&a.expander&&a.expander.commentModerationPanelExpanderRenderer&&a.expander.commentModerationPanelExpanderRenderer.settingsButton)?a.buttonRenderer:void 0}; e.onPanelScroll_=function(){var a=this;this.debounce("onPanelScroll_",function(){a.toggleClass("scrolling",0==a.$["moderation-contents"].scrollTop,Polymer.dom(a.$.expander).children[1].offsetParent)},50)}; e.onNextContinuationDataUpdated_=function(a,b){a=b.continuationData.response;!a.continuationContents.commentModerationPanelContinuation.contents&&a.continuationContents.commentModerationPanelContinuation.likelySpamContents&&(this.data.spamHeaderText=a.continuationContents.commentModerationPanelContinuation.spamHeaderText,this.set("data.likelySpamContents",a.continuationContents.commentModerationPanelContinuation.likelySpamContents),this.nextContinuation={contentsArray:"data.likelySpamContents",continuationType:"commentModerationPanelContinuation", responseContentsKey:"likelySpamContents",usePost:!0},this.hasSpam_=!0)}; e.computeHasContinuation_=function(a){return!!a}; e.hideSpamDivider_=function(a){return!a||a&&0==this.data.contents.length}; e.computeSpamHeaderText_=function(a,b){return a?b:zL("")}; e.triggerContinuation_=function(){this.querySelector("yt-next-continuation").trigger();this.showButton_=!1}; e.approveCommentAction_=function(a){(a=this.get("approveCommentAction.commentId",a))&&this.remove_(a)}; e.banAuthorAction_=function(a){(a=this.get("banAuthorAction.commentId",a))&&this.remove_(a)}; e.removeCommentAction_=function(a){(a=this.get("removeCommentAction.commentId",a))&&this.remove_(a)}; e.hideReportedCommentAction_=function(a){(a=this.get("hideReportedCommentAction.commentId",a))&&this.remove_(a)}; e.remove_=function(a){var b=this.commentIdToHeldCommentsIndex_(a);a=this.commentIdToLikelySpamCommentsIndex_(a);0<=b?this.splice("data.contents",b,1):0<=a&&this.splice("data.likelySpamContents",a,1);this.data.contents&&0!=this.data.contents.length||this.data.likelySpamContents&&0!=this.data.likelySpamContents.length||this.fire("ytd-comment-moderation-panel-empty")}; e.commentIdToHeldCommentsIndex_=function(a){var b;if(null===(b=this.data)||void 0===b||!b.contents)return-1;for(var c=0;c\n
\n \n [[getSimpleString(data.expander.commentModerationPanelExpanderRenderer.text)]]\n \n
\n \n \n \n
\n
\n
\n \n [[getSimpleString(data.expander.commentModerationPanelExpanderRenderer.text)]]\n \n
\n \n \n \n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A5a){var d=document.createElement("template");d.innerHTML=""; A5a=d}d=A5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);B5a=a}a=B5a;return a}}}); var oT=nT;oT.prototype.onNextContinuationDataUpdated_=oT.prototype.onNextContinuationDataUpdated_;w([P(Y),x("design:type",Object)],oT.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],oT.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],oT.prototype,"ytRendererBehavior",void 0);w([P(SQ),x("design:type",Object)],oT.prototype,"ytNextContinuationBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],oT.prototype,"data",void 0);w([R({computed:"computeSettingsButton_(data)"}),x("design:type",Object)],oT.prototype,"settingsButton",void 0);w([R(),x("design:type",Object)],oT.prototype,"hasSpam_",void 0);w([R({computed:"computeHasContinuation_(data.continuations)"}),x("design:type",Boolean)],oT.prototype,"hasContinuation_",void 0);w([R(),x("design:type",Object)],oT.prototype,"showButton_",void 0); w([S("yt-next-continuation-data-updated"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],oT.prototype,"onNextContinuationDataUpdated_",null);oT=w([U({is:"ytd-comment-moderation-panel-renderer"})],oT);var C5a;var D5a;var pT=function(){return O.apply(this,arguments)||this}; p(pT,O);pT.prototype.configureRendererStamper=function(){return{"data.actionMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; h.Object.defineProperties(pT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===D5a){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C5a){var d=document.createElement("template");d.innerHTML=""; C5a=d}d=C5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);D5a=a}a=D5a;return a}}}); var qT=pT;w([P(W.YtRendererBehavior),x("design:type",Object)],qT.prototype,"rendererBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],qT.prototype,"dismissableItemBehavior",void 0);w([P(Y),x("design:type",Object)],qT.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],qT.prototype,"data",void 0);qT=w([U({is:"ytd-comment-history-entry-renderer"})],qT);var E5a;var F5a;iP("multiPageMenuSectionItems","continuationItemRenderer","ytd-continuation-item-renderer");var rT=function(){var a=O.apply(this,arguments)||this;a.isOverridable=!1;a.spinnerActive=!1;a.showButton=!1;a.actionMap={"yt-continuation-override-action":"overrideContinuation"};return a}; p(rT,O);e=rT.prototype;e.configureRendererStamper=function(){return{"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.ghostCards":{id:"ghost-cards",mapping:{ghostGridRenderer:"ytd-ghost-grid-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.observeData=function(){this.spinnerActive=!1;this.ytRendererBehavior.invalidate(!1)}; e.onShow=function(){this.showButton||(this.spinnerActive=!0,this.data&&"CONTINUATION_TRIGGER_ON_ITEM_SHOWN"===this.data.trigger&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.continuationEndpoint]))}; e.overrideContinuation=function(){this.isOverridable&&(this.spinnerActive=!0,this.ytActionSenderBehavior.sendServiceRequestAction([this.data.continuationEndpoint]))}; e.showButtonChanged=function(){this.showButton&&(this.spinnerActive=!1);this.ytRendererBehavior.invalidate(!1)}; h.Object.defineProperties(rT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===F5a){var a=document.createElement("template");a.innerHTML="
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E5a){var d=document.createElement("template");d.innerHTML=""; E5a=d}d=E5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);F5a=a}a=F5a;return a}}}); var sT=rT;w([P(Y),x("design:type",Object)],sT.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],sT.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],sT.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],sT.prototype,"ytRendererBehavior",void 0);w([P(mP),x("design:type",Object)],sT.prototype,"ytVisibilityBehavior",void 0); w([R({observer:"observeData"}),x("design:type",Object)],sT.prototype,"data",void 0);w([R(),x("design:type",Object)],sT.prototype,"isOverridable",void 0);w([R(),x("design:type",Object)],sT.prototype,"spinnerActive",void 0);w([R({observer:"showButtonChanged"}),x("design:type",Object)],sT.prototype,"showButton",void 0);sT=w([U({is:"ytd-continuation-item-renderer"})],sT);function tT(a){return a.ui.richGridMiniMode} function G5a(a){return a.ui.richGridItemsPerRow} ;var H5a;var I5a;var uT=function(){return O.apply(this,arguments)||this}; p(uT,O);h.Object.defineProperties(uT.prototype,{cardItems:{configurable:!0,enumerable:!0,get:function(){var a,b=[];if((null===(a=this.data)||void 0===a?0:a.rows)&&this.itemsPerRow)for(var c=this.data.rows*this.itemsPerRow,d=0;d
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H5a){var d=document.createElement("template");d.innerHTML=""; H5a=d}d=H5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);I5a=a}a=I5a;return a}}}); var vT=uT;w([P(IQ),x("design:type",Object)],vT.prototype,"ytdReduxBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],vT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],vT.prototype,"data",void 0);w([R({reflectToAttribute:!0,selector:G5a,value:3}),x("design:type",Number)],vT.prototype,"itemsPerRow",void 0);w([R({reflectToAttribute:!0,selector:tT}),x("design:type",Boolean)],vT.prototype,"miniMode",void 0); w([zE("data"),x("design:type",Array),x("design:paramtypes",[])],vT.prototype,"cardItems",null);vT=w([U({is:"ytd-ghost-grid-renderer"})],vT);var J5a;var K5a;var L5a;iP("multiPageMenuSectionItems","toggleThemeCompactLinkRenderer","ytd-toggle-theme-compact-link-renderer");var wT=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-toggle-dark-theme-on":"handleSignalActionToggleDarkThemeOn","yt-signal-action-toggle-dark-theme-off":"handleSignalActionToggleDarkThemeOff","yt-signal-action-toggle-dark-theme-device":"handleSignalActionToggleDarkThemeDevice"};return a}; p(wT,O);e=wT.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.data&&(this.label=this.data.label?this.data.label:"USER_INTERFACE_THEME_DARK"===xJ()?this.data.toggledOnTitle:this.data.toggledOffTitle)}; e.onThemeSelected=function(a,b){var c=a||b?a:zJ(),d=(c&&"USER_INTERFACE_THEME_DARK"!==xJ()||!c&&"USER_INTERFACE_THEME_LIGHT"!==xJ())&&!YKa(Ad(window.location.href));uJ(0,165,a);uJ(0,174,b);this.prefs.save();d&&this.actionSenderBehavior.sendAction("yt-dark-mode-toggled-action",[c]);this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"])}; e.onTap=function(){this.data.serviceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])}; e.handleSignalActionToggleDarkThemeOn=function(){this.onThemeSelected(!0,!1)}; e.handleSignalActionToggleDarkThemeOff=function(){this.onThemeSelected(!1,!0)}; e.handleSignalActionToggleDarkThemeDevice=function(){this.onThemeSelected(!1,!1)}; h.Object.defineProperties(wT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===L5a){var a=document.createElement("template");a.innerHTML="
\n \n
\n
[[getSimpleString(label)]]
\n\n"; var b=a.content,c=b.insertBefore;if(void 0===K5a){var d=document.createElement("template");d.innerHTML="";K5a=d}d=K5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(pJa().content.cloneNode(!0), a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===J5a&&(d=document.createElement("template"),d.innerHTML="", J5a=d);d=J5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);L5a=a}a=L5a;return a}}}); var xT=wT;xT.prototype.onTap=xT.prototype.onTap;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],xT.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],xT.prototype,"ytRendererBehavior",void 0);w([P(Polymer.PaperItemBehavior),x("design:type",Object)],xT.prototype,"paperItemBehaviors",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],xT.prototype,"actionSenderBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],xT.prototype,"data",void 0);w([R({value:function(){return tJ.getInstance()}}), x("design:type",tJ)],xT.prototype,"prefs",void 0);w([R(),x("design:type",Object)],xT.prototype,"label",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],xT.prototype,"onTap",null);xT=w([U({is:"ytd-toggle-theme-compact-link-renderer"})],xT);var M5a;var N5a;iP("itemSectionRenderer","notificationRenderer","ytd-notification-renderer");iP("multiPageMenuSectionItems","notificationRenderer","ytd-notification-renderer");var yT=function(){return O.apply(this,arguments)||this}; p(yT,O);e=yT.prototype;e.configureRendererStamper=function(){return{"data.contextualMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.highPriorityNotificationActionButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onKeyUp=function(a){if(13===a.keyCode)this.onTap()}; e.onTap=function(){this.actionSenderBehavior.sendServiceRequestAction([this.data.recordClickEndpoint]);var a=this.data.navigationEndpoint;a&&a.getCommentsFromInboxCommand&&this.actionSenderBehavior.sendServiceRequestAction([a])}; e.readChanged=function(a){this.toggleClass("unread",!a)}; e.dataChanged=function(a){a&&this.toggleClass("high-priority-notification",a.highPriorityNotification)}; e.computeThumbnailSize=function(a){return a?32:48}; e.getEndpointURL=function(a){return a&&!a.getCommentsFromInboxCommand?this.componentBehavior.computeHref_(a):null}; e.getEndpointData=function(a){return a&&!a.getCommentsFromInboxCommand?a:null}; h.Object.defineProperties(yT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===N5a){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n \n \n \n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===M5a){var d=document.createElement("template");d.innerHTML=""; M5a=d}d=M5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);N5a=a}a=N5a;return a}}}); var zT=yT;zT.prototype.computeThumbnailSize=zT.prototype.computeThumbnailSize;zT.prototype.readChanged=zT.prototype.readChanged;zT.prototype.onKeyUp=zT.prototype.onKeyUp;w([P(W.YtRendererBehavior),x("design:type",Object)],zT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],zT.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],zT.prototype,"componentBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],zT.prototype,"actionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],zT.prototype,"data",void 0);w([R({computed:"computeThumbnailSize(data.highPriorityNotification)"}),x("design:type",Number)],zT.prototype,"thumbnailSize",void 0);w([S("keyup"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],zT.prototype,"onKeyUp",null); w([yE("data.read"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],zT.prototype,"readChanged",null);w([yE("data.highPriorityNotification"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],zT.prototype,"computeThumbnailSize",null);zT=w([U({is:"ytd-notification-renderer"})],zT);var O5a;var P5a;var AT=function(){return O.apply(this,arguments)||this}; p(AT,O);AT.prototype.configureRendererStamper=function(){return{"data.collection":{id:"dropdown",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer"}}},"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; AT.prototype.computeActionButtonClass=function(a){return!a.actionButtons||1>=a.actionButtons.length?"single-button":a.description?"vertical-buttons":"horizontal-buttons"}; h.Object.defineProperties(AT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===P5a){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O5a){var d=document.createElement("template");d.innerHTML=""; O5a=d}d=O5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);P5a=a}a=P5a;return a}}}); var BT=AT;w([P(W.YtRendererBehavior),x("design:type",Object)],BT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],BT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],BT.prototype,"data",void 0);BT=w([U({is:"ytd-playlist-show-metadata-renderer"})],BT);var Q5a;var R5a;iP("itemSectionRenderer","purchaseItemRenderer","ytd-purchase-item-renderer");var S5a=function(){return O.apply(this,arguments)||this}; p(S5a,O); h.Object.defineProperties(S5a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===R5a){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q5a){var d=document.createElement("template");d.innerHTML=""; Q5a=d}d=Q5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);R5a=a}a=R5a;return a}}}); var CT=S5a;w([P(W.YtRendererBehavior),x("design:type",Object)],CT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],CT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],CT.prototype,"data",void 0);CT=w([U({is:"ytd-purchase-item-renderer"})],CT);var T5a;var U5a;var V5a={properties:{data:Object,layoutStyle:{type:String,computed:"computeLayoutStyle_(data.layoutStyle)",reflectToAttribute:!0},role:{type:String,computed:"computeRole_(data.layoutStyle)",reflectToAttribute:!0}},created:function(){this.LAYOUT_STYLE_PREFIX_="SIMPLE_TEXT_LAYOUT_STYLE_"}, computeLayoutStyle_:function(a){if(a)return a.replace(this.LAYOUT_STYLE_PREFIX_,"").replace(/_/g,"-").toLowerCase()}, computeRole_:function(a){if("SIMPLE_TEXT_LAYOUT_STYLE_PAID_SUBSCRIPTION_TITLE"===a)return"heading"}};iP("itemSectionRenderer","simpleTextSectionRenderer","ytd-simple-text-section-renderer");var DT=function(){return O.apply(this,arguments)||this}; p(DT,O);DT.prototype.onYtNavigate=function(a){var b=this.openPopupBehavior.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.openPopupBehavior.openPopup(b))}; h.Object.defineProperties(DT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===U5a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===T5a){var d=document.createElement("template");d.innerHTML=""; T5a=d}d=T5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);U5a=a}a=U5a;return a}}}); var ET=DT;ET.prototype.onYtNavigate=ET.prototype.onYtNavigate;w([P(V5a),x("design:type",Object)],ET.prototype,"ytSimpleTextSectionBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],ET.prototype,"ytRendererBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],ET.prototype,"openPopupBehavior",void 0);w([R(),x("design:type",Object)],ET.prototype,"data",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ET.prototype,"onYtNavigate",null);ET=w([U({is:"ytd-simple-text-section-renderer"})],ET);var W5a;var X5a;iP("itemSectionRenderer","unlimitedPageFeatureInfoRenderer","ytd-unlimited-page-feature-info-renderer");var Y5a=function(){return O.apply(this,arguments)||this}; p(Y5a,O); h.Object.defineProperties(Y5a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===X5a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W5a){var d=document.createElement("template");d.innerHTML=""; W5a=d}d=W5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);X5a=a}a=X5a;return a}}}); var FT=Y5a;w([P(W.YtRendererBehavior),x("design:type",Object)],FT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],FT.prototype,"data",void 0);FT=w([U({is:"ytd-unlimited-page-feature-info-renderer"})],FT);var Z5a;var $5a;iP("itemSectionRenderer","redeemCodeRenderer","ytd-redeem-code-renderer");var GT=function(){var a=O.apply(this,arguments)||this;a.MIN_CODE_LENGTH=12;a.MAX_CODE_LENGTH=24;a.actionMap={"yt-invoke-instrument-manager-action":"onInvokeInstrumentManagerAction_"};return a}; p(GT,O);e=GT.prototype;e.configureRendererStamper=function(){return{postRedemptionRenderer:{id:"success-page",mapping:{ypcPostRedemptionRenderer:"ytd-ypc-post-redemption-renderer"}}}}; e.created=function(){this.riskService_=new cWa;this.loadPaymentThenable_=YVa()}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){this.$.code.addEventListener("keypress",this.onCodeInputKeypress_.bind(this))}; e.dataChanged_=function(a){var b=this;this.redeemButtonDisabled=!0;this.observer_=new MutationObserver(function(c){c.forEach(function(d){"attributes"==d.type&&"dark"==d.attributeName&&b.updateBackground_(a)})}); this.observer_.observe(document.documentElement,{attributes:!0});this.updateBackground_(a)}; e.updateBackground_=function(a){document.documentElement.hasAttribute("dark")?this.style["background-image"]="none":(a=this.computeImageUrl_(a.thumbnail),this.style["background-image"]="url("+a+")")}; e.computeRedeemButton_=function(a){if(a=this.get("redeemButton.buttonRenderer",a))a=Polymer.Base.mixin({},a),a.serviceEndpoint=void 0;return a}; e.onRedeemButtonTap_=function(a){a.stopPropagation();QVa();this.redeemCode_()}; e.redeemCode_=function(){var a=this;this.isLoading=!0;var b=this.riskService_.init();Ti(Pi([b,this.loadPaymentThenable_]).then(function(){var c=a.data.redeemButton.buttonRenderer.serviceEndpoint,d=eWa(),f=payments.business.integration.ClientTokenFactory.createClientToken(c.ypcRedeemCodeEndpoint.countryCode,d);d={c:a.$.code.value.trim(),rd:window.btoa(d),ctk:f};a.ytActionSenderBehavior.sendServiceRequestAction([c,d])},function(){a.showGenericError_(); oO("YPC_ERROR_REASON_RISK_LIB_LOAD_FAILURE")}),function(){td(Error("failure in redeem code execution."))})}; e.onYtServiceRequestCompleted_=function(a){a.stopPropagation();this.isLoading=!1;this.errorMessage_=this.get("detail.data.errorMessage",a);this.postRedemptionRenderer=this.get("detail.data.renderer",a);if(a=this.get("detail.data.redirectEndpoint",a))this.isLoading=!0,this.fire("yt-navigate",{endpoint:a});this.errorMessage_?oO("YPC_ERROR_REASON_REDEEM_INNERTUBE_FAILURE"):(this.postRedemptionRenderer||a)&&lO("ypcRedeemFlowSucceeded")}; e.onYtServiceRequestError_=function(a){a.stopPropagation();this.isLoading=!1;if(a=this.get("detail.error.message",a))this.errorMessage_=zL(a);oO("YPC_ERROR_REASON_YPC_REDEEM_CODE_RPC_FAILURE")}; e.onInvokeInstrumentManagerActionCompleted_=function(a){a.stopPropagation();this.redeemCode_()}; e.onInvokeInstrumentManagerActionError_=function(a){a.stopPropagation();this.isLoading=!1;switch(this.get("detail.error.errorCode",a)){case"instrumentManagerLoadError":this.showGenericError_();oO("YPC_ERROR_REASON_INST_MANAGER_LOAD_FAILURE");break;case"instrumentManagerCallbackError":this.showGenericError_();oO("YPC_ERROR_REASON_INST_MANAGER_CALLBACK_FAILURE");break;case"instrumentManagerCancelled":lO("ypcRedeemFlowCancelled");}}; e.onInput_=function(){var a=this;this.debounce("onInput_",function(){var b=a.$.code.value.trim();a.redeemButtonDisabled=b.lengtha.MAX_CODE_LENGTH},200)}; e.onCodeInputKeypress_=function(a){13!=a.keyCode||this.redeemButtonDisabled||this.isLoading||(QVa(),this.redeemCode_())}; e.computeImageUrl_=function(a){return a?MO(a.thumbnails,600):null}; e.showGenericError_=function(){this.isLoading=!1;this.errorMessage_=this.get("errorMessage",this.data)}; h.Object.defineProperties(GT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$5a){var a=document.createElement("template");a.innerHTML="\n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z5a){var d=document.createElement("template");d.innerHTML=""; Z5a=d}d=Z5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$5a=a}a=$5a;return a}}}); var HT=GT;HT.prototype.onInvokeInstrumentManagerActionError_=HT.prototype.onInvokeInstrumentManagerActionError_;HT.prototype.onInvokeInstrumentManagerActionCompleted_=HT.prototype.onInvokeInstrumentManagerActionCompleted_;HT.prototype.onYtServiceRequestError_=HT.prototype.onYtServiceRequestError_;HT.prototype.onYtServiceRequestCompleted_=HT.prototype.onYtServiceRequestCompleted_;w([P(W.YtRendererBehavior),x("design:type",Object)],HT.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],HT.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],HT.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],HT.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],HT.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],HT.prototype,"isLoading",void 0); w([R(),x("design:type",Boolean)],HT.prototype,"redeemButtonDisabled",void 0);w([R(),x("design:type",Object)],HT.prototype,"errorMessage_",void 0);w([R(),x("design:type",Object)],HT.prototype,"postRedemptionRenderer",void 0);w([R(),x("design:type",Object)],HT.prototype,"observer_",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HT.prototype,"onYtServiceRequestCompleted_",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HT.prototype,"onYtServiceRequestError_",null);w([S("yt-invoke-instrument-manager-action-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HT.prototype,"onInvokeInstrumentManagerActionCompleted_",null); w([S("yt-invoke-instrument-manager-action-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HT.prototype,"onInvokeInstrumentManagerActionError_",null);HT=w([U({is:"ytd-redeem-code-renderer"})],HT);var a6a;var b6a;var IT=function(){return O.apply(this,arguments)||this}; p(IT,O);IT.prototype.dataChanged=function(){if(this.data){var a=this.get("background.thumbnailLandscapePortraitRenderer.portrait.thumbnails",this.data);a&&(a=MO(a,screen.width),this.style.backgroundImage="url("+a+")")}}; h.Object.defineProperties(IT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===b6a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
[[getSimpleString(data.title)]]
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a6a){var d=document.createElement("template");d.innerHTML=""; a6a=d}d=a6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b6a=a}a=b6a;return a}}}); var JT=IT;JT.prototype.dataChanged=JT.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],JT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],JT.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],JT.prototype,"dataChanged",null);JT=w([U({is:"ytd-post-redemption-section-renderer"})],JT);var c6a;var d6a;var KT=function(){return O.apply(this,arguments)||this}; p(KT,O);KT.prototype.configureRendererStamper=function(){return{"data.sections":{id:"contents",mapping:{postRedemptionSectionRenderer:{component:"ytd-post-redemption-section-renderer",noInjection:!0}}}}}; h.Object.defineProperties(KT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===d6a){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.storeValueBalance)]]
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c6a){var d=document.createElement("template");d.innerHTML=""; c6a=d}d=c6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);d6a=a}a=d6a;return a}}}); var LT=KT;w([P(W.YtRendererBehavior),x("design:type",Object)],LT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],LT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],LT.prototype,"data",void 0);LT=w([U({is:"ytd-ypc-post-redemption-renderer"})],LT);var e6a;var f6a;var g6a={EMPTY_SEARCH:"promo-full-height",HASHTAG_LANDING_PAGE_EMPTY:"hashtag-landing-page",HASHTAG_LANDING_PAGE_EMPTY_DARK_MODE:"hashtag-landing-page",HASHTAG_LANDING_PAGE_ERROR:"hashtag-landing-page",HASHTAG_LANDING_PAGE_ERROR_DARK_MODE:"hashtag-landing-page",OFFLINE_NO_CONTENT:"offline-no-content"},MT=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-show-invite-url-action":"handleConnectionInviteShown_"};return a}; p(MT,O);e=MT.prototype;e.configureRendererStamper=function(){return{"data.ctaButton":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer",reloadPageButtonRenderer:"ytd-reload-page-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.computeRendererStyle_=function(a){return a.style?a.style.value.split("TYPE_")[1].replace(/_/g,"-").toLowerCase():a.icon?"":"no-icon"}; e.getIconName_=function(a){a=this.get("icon.iconType",a);var b=g6a[a];b||(b="yt-icons");return[b,a].join(":")}; e.handleConnectionInviteShown_=function(a){if(a=this.get("showInviteUrlAction.inviteUrlRenderer.copyConnectionInviteUrlRenderer",a)){Polymer.dom(this.$.button).firstElementChild.hidden=!0;var b=Polymer.dom(this.$.dynamicContent),c=document.createElement("ytd-copy-connection-invite-url-renderer");c.data=a;b.appendChild(c)}}; h.Object.defineProperties(MT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===f6a){var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.title)]]
\n \n
\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e6a){var d=document.createElement("template");d.innerHTML=""; e6a=d}d=e6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);f6a=a}a=f6a;return a}}}); var NT=MT;w([P(Y),x("design:type",Object)],NT.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],NT.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],NT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],NT.prototype,"data",void 0);w([R({computed:"computeRendererStyle_(data)",reflectToAttribute:!0}),x("design:type",String)],NT.prototype,"rendererStyle",void 0); w([R({computed:"getIconName_(data)",reflectToAttribute:!0}),x("design:type",String)],NT.prototype,"iconName",void 0);NT=w([U({is:"ytd-background-promo-renderer"})],NT);var h6a;var OT=function(){return O.apply(this,arguments)||this}; p(OT,O);OT.prototype.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true");this.networkStatusManager||(this.networkStatusManager=new Fm,this.networkStatusManager.listen("publicytnetworkstatus-online",this.onlineHandler.bind(this)))}; OT.prototype.detached=function(){this.networkStatusManager&&(this.networkStatusManager.unlisten("publicytnetworkstatus-online",this.onlineHandler.bind(this)),delete this.networkStatusManager)}; OT.prototype.onlineHandler=function(){this.actionSenderBehavior.sendAction("yt-signal-action-soft-reload-page")}; h.Object.defineProperties(OT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===h6a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(kP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);h6a=a}a=h6a;return a}}}); var PT=OT;w([P(W.YtRendererBehavior),x("design:type",Object)],PT.prototype,"ytRendererBehavior",void 0);w([P(gP.YtButtonBehavior),x("design:type",Object)],PT.prototype,"ytButtonBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],PT.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],PT.prototype,"data",void 0);PT=w([U({is:"ytd-reload-page-button-renderer"})],PT);var i6a;var j6a;iP("itemSectionRenderer","channelAboutFullMetadataRenderer","ytd-channel-about-metadata-renderer");var QT=function(){var a=O.apply(this,arguments)||this;a.businessEmailDisplayState="HIDE_SECTION";return a}; p(QT,O);e=QT.prototype;e.configureRendererStamper=function(){return{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged=function(){this.data&&(this.data.businessEmailButton||this.data.signInForBusinessEmail)?this.data.signInForBusinessEmail?this.businessEmailDisplayState="SIGN_IN_REQUIRED":(this.businessEmailDisplayState="REVEAL_BUTTON",this.data.businessEmail&&(this.businessEmail=this.data.businessEmail)):this.businessEmailDisplayState="HIDE_SECTION"}; e.detached=function(){this.businessEmail=void 0;this.businessEmailDisplayState="HIDE_SECTION"}; e.onBusinessEmailClick=function(){this.data&&(this.data.bypassBusinessEmailCaptcha?this.businessEmailDisplayState="BUSINESS_EMAIL":(kJ("https://www.google.com/recaptcha/api.js"),this.businessEmailDisplayState="CAPTCHA"))}; e.onYtServiceRequestCompleted=function(a){var b;if(null===(b=a.detail.data)||void 0===b?0:b.businessEmail)this.businessEmail=a.detail.data.businessEmail,this.businessEmailDisplayState="BUSINESS_EMAIL"}; e.computeEmailHref=function(a){return"mailto:"+a}; e.computeSafeUrl=function(a){if(a)return $b(a)}; e.onBusinessEmailCaptchaSubmit=function(){var a;if(null!==(a=this.data)&&void 0!==a&&a.onBusinessEmailRevealClickCommand){var b=this.captchaTextarea.value;b&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.onBusinessEmailRevealClickCommand,{recaptcha_response_token:b,channel_id:this.data.channelId}])}}; e.recaptchaSiteKey=function(){return"6Lf39AMTAAAAALPbLZdcrWDa8Ygmgk_fmGmrlRog"}; h.Object.defineProperties(QT.prototype,{hideDetailsSection:{configurable:!0,enumerable:!0,get:function(){return!this.data||!this.data.country&&!this.data.businessEmailButton}}}); h.Object.defineProperties(QT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===j6a){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n
\n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===i6a){var d=document.createElement("template");d.innerHTML=""; i6a=d}d=i6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);j6a=a}a=j6a;return a}}}); var RT=QT;RT.prototype.onYtServiceRequestCompleted=RT.prototype.onYtServiceRequestCompleted;w([P(AO.YtComponentBehavior),x("design:type",Object)],RT.prototype,"ytComponentBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],RT.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],RT.prototype,"ytActionSenderBehavior",void 0);w([P(Y),x("design:type",Object)],RT.prototype,"ytRendererstamperBehavior",void 0); w([AE("#g-recaptcha-response"),x("design:type",HTMLTextAreaElement)],RT.prototype,"captchaTextarea",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],RT.prototype,"data",void 0);w([R(),x("design:type",String)],RT.prototype,"businessEmailDisplayState",void 0);w([R(),x("design:type",String)],RT.prototype,"businessEmail",void 0);w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],RT.prototype,"hideDetailsSection",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],RT.prototype,"onYtServiceRequestCompleted",null);RT=w([U({is:"ytd-channel-about-metadata-renderer"})],RT);var k6a;var l6a;iP("itemSectionRenderer","channelFeaturedContentRenderer","ytd-channel-featured-content-renderer");var ST=function(){return O.apply(this,arguments)||this}; p(ST,O);ST.prototype.configureRendererStamper=function(){return{"data.items":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; h.Object.defineProperties(ST,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===l6a){var a=document.createElement("template");a.innerHTML="
\n

\n \n

\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k6a){var d=document.createElement("template");d.innerHTML=""; k6a=d}d=k6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);l6a=a}a=l6a;return a}}}); var TT=ST;w([P(W.YtRendererBehavior),x("design:type",Object)],TT.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],TT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],TT.prototype,"data",void 0);TT=w([U({is:"ytd-channel-featured-content-renderer"})],TT);var m6a;var n6a;iP("itemSectionRenderer","channelRenderer","ytd-channel-renderer");var UT=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(UT,O);e=UT.prototype;e.attached=function(){this.isDarkTheme=document.documentElement.hasAttribute("dark")}; e.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; e.computeHideDot=function(a){return!(a&&a.subscriberCountText&&a.videoCountText)}; e.backgroundColorChanged=function(){if(void 0!==this.data){var a=this.data.backgroundColor;this.isDarkTheme&&(a=this.data.backgroundColorDarkTheme);this.style.backgroundColor=null!=a?dO(a):"transparent"}}; e.onDarkModeToggledAction=function(a){this.isDarkTheme=a}; e.onTap=function(a){var b,c,d=(null===(b=this.data)||void 0===b?void 0:b.navigationEndpoint)||(null===(c=this.data)||void 0===c?void 0:c.serviceEndpoint);d&&d.ypcGetOffersEndpoint&&(this.ytActionSenderBehavior.sendServiceRequestAction([d]),a.preventDefault())}; e.computeChannelEndpoint=function(a){return a&&a.ypcGetOffersEndpoint?null:a}; e.computeHrefEndpoint=function(a){return a&&a.ypcGetOffersEndpoint?null:this.componentBehavior.computeHref_(a)}; e.computeChannelRendererStyle=function(a){return a}; h.Object.defineProperties(UT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===n6a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===m6a){var d=document.createElement("template");d.innerHTML=""; m6a=d}d=m6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);n6a=a}a=n6a;return a}}}); var $T=UT;$T.prototype.backgroundColorChanged=$T.prototype.backgroundColorChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],$T.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],$T.prototype,"ytRendererstamperBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],$T.prototype,"ytdOpenPopupBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],$T.prototype,"ytActionSenderBehavior",void 0); w([P(AO.YtComponentBehavior),x("design:type",Object)],$T.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],$T.prototype,"data",void 0);w([R(),x("design:type",Boolean)],$T.prototype,"isDarkTheme",void 0);w([R({computed:"computeChannelRendererStyle(data.channelRendererStyle)",reflectToAttribute:!0}),x("design:type",String)],$T.prototype,"channelRendererStyle",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],$T.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return fk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],$T.prototype,"prominentThumbStyle",void 0);w([yE("data","isDarkTheme"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$T.prototype,"backgroundColorChanged",null);$T=w([U({is:"ytd-channel-renderer"})],$T);var o6a;var p6a;var aU=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-menu-service-item-selected-action":"handleBellMenuOpenSelectedAction_"};return a}; p(aU,O);e=aU.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; e.currentStateData_=function(a){var b=a||this.data;return b&&b.states&&null!=b.currentStateId?b.states.find(function(c){return c.stateId==b.currentStateId})||null:null}; e.currentStateRendererData_=function(a){return(a=this.currentStateData_(a))&&a.state&&a.state.buttonRenderer?a.state.buttonRenderer:null}; e.stateChanged_=function(){this&&this.data&&(this.ytRenderButtonBehavior._setEndpoint(null),this.ytRenderButtonBehavior._setServiceEndpoint(this.computeServiceEndpoint_(this.data)),this.ytRenderButtonBehavior._setButtonIcon(this.computeButtonIcon_(this.data)),this.ytRenderButtonBehavior._setButtonText(null),this.ytRenderButtonBehavior._setButtonAccessibility(this.computeAccessibility_(this.data)),this.ytRenderButtonBehavior._setButtonClass(this.computeButtonClass_(this.data)),this.ytRenderButtonBehavior.updateRenderedElements())}; e.computeButtonIcon_=function(a){var b;a=this.currentStateRendererData_(a);return(null===(b=null===a||void 0===a?void 0:a.icon)||void 0===b?0:b.iconType)?a.icon.iconType.toLowerCase():null}; e.computeAccessibility_=function(a){return(a=this.currentStateRendererData_(a))&&a.accessibilityData?a.accessibilityData.accessibilityData||null:null}; e.computeButtonClass_=function(a){var b=this.currentStateRendererData_(a);if(!b)return"";a="";var c=b.style;c&&(a+=c.toLowerCase().replace(/_/g,"-")+" ");(b=b.size)&&(a+=b.toLowerCase().replace(/_/g,"-")+" ");return a.trim()}; e.computeServiceEndpoint_=function(a){if(!a)return null;var b=a&&a.serviceEndpoint,c=this.get("command.commandMetadata.webCommandMetadata.sendPost",a);return b?b:c&&a.command?a.command:null}; e.computeBellMenuItemParams_=function(a){return a&&a.command&&a.command.commandExecutorCommand?(a=a.command.commandExecutorCommand.commands)&&0!=a.length&&a[0].openPopupAction&&a[0].openPopupAction.popup&&a[0].openPopupAction.popup.menuPopupRenderer&&a[0].openPopupAction.popup.menuPopupRenderer.items?a[0].openPopupAction.popup.menuPopupRenderer.items.map(function(b){return b.menuServiceItemRenderer.trackingParams}):null:null}; e.handleBellMenuOpenSelectedAction_=function(a){var b=a.trackingParams;this.data&&b&&this.computeBellMenuItemParams_(this.data)&&this.computeBellMenuItemParams_(this.data).includes(b)&&this.ytRenderButtonBehavior._setButtonIcon(a.icon.iconType.toLowerCase())}; e.onYtServiceRequestCompleted_=function(a,b){(a=this.get("data.newNotificationButton.subscriptionNotificationToggleButtonRenderer",b))&&this.set("data",a)}; e.onYtServiceRequestError_=function(){this.ytRenderButtonBehavior._setButtonIcon(this.computeButtonIcon_(this.data))}; e.resetState=function(){this.set("data.currentStateId",3)}; e.onYtButtonTapHandler=function(){if(this.data){var a=this.currentStateRendererData_(this.data);a&&this.ytRendererBehavior.logExplicitClick(a)}}; h.Object.defineProperties(aU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===p6a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(kP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===o6a){var d=document.createElement("template");d.innerHTML=""; o6a=d}d=o6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);p6a=a}a=p6a;return a}}}); var bU=aU;bU.prototype.onYtServiceRequestError_=bU.prototype.onYtServiceRequestError_;bU.prototype.onYtServiceRequestCompleted_=bU.prototype.onYtServiceRequestCompleted_;bU.prototype.stateChanged_=bU.prototype.stateChanged_;w([P(W.YtRendererBehavior),x("design:type",Object)],bU.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],bU.prototype,"ytActionHandlerBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],bU.prototype,"ytActionSenderBehavior",void 0);w([P(PXa),x("design:type",Object)],bU.prototype,"ytRenderButtonBehavior",void 0);w([R(),x("design:type",Object)],bU.prototype,"data",void 0);w([yE("data","data.currentStateId"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],bU.prototype,"stateChanged_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],bU.prototype,"onYtServiceRequestCompleted_",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],bU.prototype,"onYtServiceRequestError_",null);bU=w([U({is:"ytd-subscription-notification-toggle-button-renderer"})],bU);var q6a;var r6a;var cU=function(){var a=O.apply(this,arguments)||this;a.keyboardFocused=!1;a.actionMap={"yt-player-subscribe":"onPlayerSubscribe_","yt-player-unsubscribe":"onPlayerUnsubscribe_","yt-update-subscribe-button-action":"handleUpdateSubscribeButtonAction_"};return a}; p(cU,O);e=cU.prototype;e.configureRendererStamper=function(){return{"data.notificationPreferenceToggleButton":{id:"notification-preference-toggle-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.notificationPreferenceButton":{id:"notification-preference-button",mapping:{subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.keyboardFocused=!1}; e.computeDisplayText_=function(a,b){if(this.data)return a?b.subscribedButtonText:b.unsubscribedButtonText}; e.onSubscribeButtonFocusin_=function(){if(this.useKeyboardFocused){var a=this.ytComponentBehavior.getInterfaceForTs("yt-hotkey-manager");a&&(this.keyboardFocused=a.isKeyBoardInUse())}}; e.onSubscribeButtonFocusout_=function(){this.keyboardFocused=!1}; e.onSubscribeButtonTap_=function(a){var b,c,d,f,g;if(N("kevlar_subscribe_endpoints_killswitch"))(null===(b=this.data)||void 0===b?0:b.serviceEndpoints)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.subscribed?this.data.serviceEndpoints[1]:this.data.serviceEndpoints[0]]);else{if(this.subscribed){if(null===(c=this.data)||void 0===c?0:c.serviceEndpoints)var l=this.data.serviceEndpoints[1];else{if(null===(d=this.data)||void 0===d?0:d.onUnsubscribeEndpoints)l=this.data.onUnsubscribeEndpoints[0]}}else if(null===( f=this.data)||void 0===f?0:f.serviceEndpoints)l=this.data.serviceEndpoints[0];else if(null===(g=this.data)||void 0===g?0:g.onSubscribeEndpoints)l=this.data.onSubscribeEndpoints[0];l&&this.ytActionSenderBehavior.sendServiceRequestAction([l])}a.preventDefault()}; e.onYtServiceRequestSent_=function(a,b){(this.get("endpoint.subscribeEndpoint",b)||this.get("endpoint.unsubscribeEndpoint",b))&&this.updateSubscriptionState_(!this.subscribed)}; e.onYtServiceRequestCompleted_=function(a,b){a=this.get("newNotificationButton.subscriptionNotificationToggleButtonRenderer",b.data);b=this.$$("ytd-subscription-notification-toggle-button-renderer");a&&b&&b.set("data",a)}; e.observedSubscribed_=function(){this.updateStyles()}; e.computeAccessibility_=function(a,b){b=b?this.get("unsubscribeAccessibility.accessibilityData.label",a):this.get("subscribeAccessibility.accessibilityData.label",a);return a&&a.longSubscriberCountText?b+" "+CL(a.longSubscriberCountText):b}; e.onPlayerSubscribe_=function(a){this.isCompactRed_()||a!=this.data.channelId||this.updateSubscriptionState_(!0)}; e.onPlayerUnsubscribe_=function(a){this.isCompactRed_()||a!=this.data.channelId||this.updateSubscriptionState_(!1)}; e.handleUpdateSubscribeButtonAction_=function(a){(a=a.updateSubscribeButtonAction)&&a.channelId==this.data.channelId&&this.updateSubscriptionState_(!!a.subscribed)}; e.computeButtonStyle_=function(a){return this.get("style.styleType",a)||null}; e.isCompactRed_=function(){return"COMPACT_RED"==this.computeButtonStyle_(this.data)}; e.computeSubscribed_=function(){return this.subscriptionStateEntity?!!this.subscriptionStateEntity.subscribed:!(!this.data||!this.data.subscribed)}; e.updateSubscriptionState_=function(a){var b;if(a!==this.subscribed){this.set("data.subscribed",a);var c=null===(b=this.data)||void 0===b?void 0:b.subscribedEntityKey;c&&this.ytdReduxBehavior.dispatch($L("subscriptionStateEntity",c,{key:c,subscribed:a}));this.isCompactRed_()||this.fire("yt-subscription-changed",a);a||(this.ytActionSenderBehavior.sendAction("yt-unsubscribe-action"),this.resetNotificationBellState_())}}; e.resetNotificationBellState_=function(){var a=this.$$("ytd-subscription-notification-toggle-button-renderer");this.get("notificationPreferenceButton.subscriptionNotificationToggleButtonRenderer",this.data)&&a&&a.resetState()}; h.Object.defineProperties(cU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===r6a){var a=document.createElement("template");a.innerHTML="\n \n \n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===q6a){var d=document.createElement("template");d.innerHTML=""; q6a=d}d=q6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);r6a=a}a=r6a;return a}}}); var dU=cU;dU.prototype.observedSubscribed_=dU.prototype.observedSubscribed_;dU.prototype.onYtServiceRequestCompleted_=dU.prototype.onYtServiceRequestCompleted_;dU.prototype.onYtServiceRequestSent_=dU.prototype.onYtServiceRequestSent_;w([P(AO.YtComponentBehavior),x("design:type",Object)],dU.prototype,"ytComponentBehavior",void 0);w([P(Y),x("design:type",Object)],dU.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],dU.prototype,"ytRendererBehavior",void 0); w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],dU.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],dU.prototype,"ytActionSenderBehavior",void 0);w([P(JQ.YtdReduxBehavior),x("design:type",Object)],dU.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],dU.prototype,"data",void 0);w([R({selectorArgs:["data.subscribedEntityKey"],selector:function(a,b){return aM(a.entities,"subscriptionStateEntity",b)}}), x("design:type",Object)],dU.prototype,"subscriptionStateEntity",void 0);w([R({computed:"computeSubscribed_(data.subscribed, subscriptionStateEntity)"}),x("design:type",Boolean)],dU.prototype,"subscribed",void 0);w([R({readOnly:!0,computed:"computeAccessibility_(data, subscribed)"}),x("design:type",String)],dU.prototype,"buttonAccessibility",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],dU.prototype,"branded",void 0);w([R(),x("design:type",Boolean)],dU.prototype,"buttonRaised",void 0); w([R({reflectToAttribute:!0,computed:"computeButtonStyle_(data)"}),x("design:type",Object)],dU.prototype,"buttonStyle",void 0);w([R({value:function(){return!!this.getInterfaceForTs("yt-hotkey-manager")&&N("kevlar_keyboard_button_focus")}, reflectToAttribute:!0}),x("design:type",Boolean)],dU.prototype,"useKeyboardFocused",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],dU.prototype,"keyboardFocused",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],dU.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],dU.prototype,"onYtServiceRequestCompleted_",null);w([yE("subscribed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],dU.prototype,"observedSubscribed_",null);dU=w([U({is:"ytd-subscribe-button-renderer"})],dU);var s6a;var t6a;iP("itemSectionRenderer","radioRenderer","ytd-radio-renderer");var eU=function(){var a=O.apply(this,arguments)||this;a.displayItemCount=2;return a}; p(eU,O);eU.prototype.computeFirstVideos=function(a,b){return a&&b?a.slice(0,b):[]}; eU.prototype.computeThumbnailWidth=function(a,b){return a?"BIG1"===b?340:"BIG2"===b?320:"MEDIUM1"===b?300:"MEDIUM2"===b?280:360:246}; eU.prototype.computeThumbnailHeight=function(a){return a?240:138}; h.Object.defineProperties(eU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===t6a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s6a){var d=document.createElement("template");d.innerHTML=""; s6a=d}d=s6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t6a=a}a=t6a;return a}}}); var fU=eU;w([P(W.YtRendererBehavior),x("design:type",Object)],fU.prototype,"ytRendererBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],fU.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],fU.prototype,"data",void 0);w([R(),x("design:type",Object)],fU.prototype,"displayItemCount",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],fU.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return fk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],fU.prototype,"prominentThumbStyle",void 0);fU=w([U({is:"ytd-radio-renderer"})],fU);var u6a;var v6a;iP("itemSectionRenderer","showRenderer","ytd-show-renderer");var gU=function(){return O.apply(this,arguments)||this}; p(gU,O);gU.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; h.Object.defineProperties(gU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v6a){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u6a){var d=document.createElement("template");d.innerHTML=""; u6a=d}d=u6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v6a=a}a=v6a;return a}}}); var hU=gU;w([P(W.YtRendererBehavior),x("design:type",Object)],hU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],hU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],hU.prototype,"data",void 0);hU=w([U({is:"ytd-show-renderer"})],hU);var w6a;var x6a;iP("itemSectionRenderer","clarificationRenderer","ytd-clarification-renderer");var iU=function(){return O.apply(this,arguments)||this}; p(iU,O);e=iU.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; e.dataChanged=function(a){this.imageWidth=this.imageHeight=24;"CLARIFICATION_RENDERER_STYLE_MEDIUM"===a.style?this.imageWidth=this.imageHeight=80:!a.style&&a.image&&a.image.thumbnails.length&&(a=a.image.thumbnails[0],this.imageWidth=a.width||0,this.imageHeight=a.height||0)}; e.computeSource=function(a){return a.secondarySource?CL(a.secondarySource):CL(a.source)}; e.computeClarifyStyle=function(a){return a?a.replace("CLARIFICATION_RENDERER_STYLE_","").toLowerCase():""}; e.isLargeStyle=function(a){return"CLARIFICATION_RENDERER_STYLE_LARGE"===a}; e.computeBackgroundStyle=function(a){return a?a.replace("CLARIFICATION_RENDERER_BACKGROUND_","").toLowerCase():""}; e.computeHasActionButton=function(a){return!!a.actionButton}; e.computeIsResourceMissing=function(a){return!1===a.ctaHasBottomSection?!0:a&&a.source&&CL(a.source)?!1:!0}; e.computeSecondaryEndpoint=function(a){return a.secondaryEndpoint||a.endpoint}; h.Object.defineProperties(iU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===x6a){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w6a){var d=document.createElement("template");d.innerHTML=""; w6a=d}d=w6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x6a=a}a=x6a;return a}}}); var jU=iU;w([P(W.YtRendererBehavior),x("design:type",Object)],jU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],jU.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],jU.prototype,"data",void 0);w([R(),x("design:type",Number)],jU.prototype,"imageWidth",void 0);w([R(),x("design:type",Number)],jU.prototype,"imageHeight",void 0); w([R({computed:"computeSecondaryEndpoint(data)"}),x("design:type",Object)],jU.prototype,"secondaryEndpoint",void 0);w([R({reflectToAttribute:!0,computed:"computeHasActionButton(data)"}),x("design:type",Boolean)],jU.prototype,"hasActionButton",void 0);w([R({reflectToAttribute:!0,computed:"computeIsResourceMissing(data)"}),x("design:type",Boolean)],jU.prototype,"missingSource",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],jU.prototype,"icon",void 0); w([R({computed:"computeIcon_(data.secondaryIcon)"}),x("design:type",String)],jU.prototype,"secondaryIcon",void 0);w([R({reflectToAttribute:!0,computed:"computeClarifyStyle(data.style)"}),x("design:type",String)],jU.prototype,"clarifyStyle",void 0);w([R({reflectToAttribute:!0,computed:"computeBackgroundStyle(data.background)"}),x("design:type",String)],jU.prototype,"backgroundStyle",void 0);jU=w([U({is:"ytd-clarification-renderer"})],jU);var y6a;var z6a;iP("multiPageMenuSectionItems","compactLinkRenderer","ytd-compact-link-renderer");var kU=function(){return O.apply(this,arguments)||this}; p(kU,O);e=kU.prototype;e.computeHasPrimaryIcon=function(a){return!(!a.icon&&!a.thumbnail)}; e.computeHasSecondary=function(a){return!(!a.secondaryIcon&&!a.secondaryNotificationText)}; e.computeCompactLinkStyle=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; e.isActiveEndpoint=function(a){return(a=this.get("commandMetadata.webCommandMetadata.url",a))?"/account_transfer_channel"!==Ad(window.location.href)&&"/gaia_link"!==Ad(window.location.href)||"/account"!==a?Ad(window.location.href)===a:!0:!1}; e.onTap=function(){var a;(null===(a=this.data)||void 0===a?0:a.serviceEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])}; h.Object.defineProperties(kU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===z6a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y6a){var d=document.createElement("template");d.innerHTML=""; y6a=d}d=y6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z6a=a}a=z6a;return a}}}); var lU=kU;lU.prototype.onTap=lU.prototype.onTap;w([P(W.YtRendererBehavior),x("design:type",Object)],lU.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],lU.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],lU.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"isActiveEndpoint(data.navigationEndpoint)"}),x("design:type",Boolean)],lU.prototype,"active",void 0); w([R({reflectToAttribute:!0,computed:"computeCompactLinkStyle(data.style)"}),x("design:type",String)],lU.prototype,"compactLinkStyle",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",Object)],lU.prototype,"icon",void 0);w([R({computed:"computeIcon_(data.secondaryIcon)"}),x("design:type",Object)],lU.prototype,"secondaryIcon",void 0);w([R({computed:"computeHasSecondary(data)",reflectToAttribute:!0}),x("design:type",Boolean)],lU.prototype,"hasSecondary",void 0); w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],lU.prototype,"onTap",null);lU=w([U({is:"ytd-compact-link-renderer"})],lU);var A6a;var B6a;iP("itemSectionRenderer","emergencyOneboxRenderer","ytd-emergency-onebox-renderer");var C6a=function(){return O.apply(this,arguments)||this}; p(C6a,O); h.Object.defineProperties(C6a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===B6a){var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A6a){var d=document.createElement("template");d.innerHTML=""; A6a=d}d=A6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);B6a=a}a=B6a;return a}}}); var mU=C6a;w([P(W.YtRendererBehavior),x("design:type",Object)],mU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],mU.prototype,"data",void 0);mU=w([U({is:"ytd-emergency-onebox-renderer"})],mU);var D6a;var E6a;var nU=function(){return O.apply(this,arguments)||this}; p(nU,O);nU.prototype.computeIcon=function(a){return a?"yt-icons:"+a.toLowerCase():null}; h.Object.defineProperties(nU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===E6a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D6a){var d=document.createElement("template");d.innerHTML=""; D6a=d}d=D6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);E6a=a}a=E6a;return a}}}); var oU=nU;w([P(W.YtRendererBehavior),x("design:type",Object)],oU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],oU.prototype,"data",void 0);oU=w([U({is:"ytd-single-action-emergency-support-renderer"})],oU);var F6a;var G6a;iP("itemSectionRenderer","exploratoryResultsRenderer","ytd-exploratory-results-renderer");var pU=function(){return O.apply(this,arguments)||this}; p(pU,O);pU.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; h.Object.defineProperties(pU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===G6a){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F6a){var d=document.createElement("template");d.innerHTML=""; F6a=d}d=F6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);G6a=a}a=G6a;return a}}}); var qU=pU;w([P(W.YtRendererBehavior),x("design:type",Object)],qU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],qU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],qU.prototype,"data",void 0);qU=w([U({is:"ytd-exploratory-results-renderer"})],qU);var H6a;var I6a;iP("itemSectionRenderer","feedEntryRenderer","ytd-feed-entry-renderer");var rU=function(){return O.apply(this,arguments)||this}; p(rU,O);rU.prototype.configureRendererStamper=function(){return{"data.item":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; h.Object.defineProperties(rU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===I6a){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H6a){var d=document.createElement("template");d.innerHTML=""; H6a=d}d=H6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);I6a=a}a=I6a;return a}}}); var sU=rU;w([P(W.YtRendererBehavior),x("design:type",Object)],sU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],sU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],sU.prototype,"data",void 0);sU=w([U({is:"ytd-feed-entry-renderer"})],sU);var J6a;var K6a;iP("itemSectionRenderer","feedbackElicitationSingleQuestionRenderer","ytd-feedback-elicitation-single-question-renderer");var tU=function(){var a=O.apply(this,arguments)||this;a.messageData=null;return a}; p(tU,O);e=tU.prototype;e.onServiceRequestCompleted=function(a,b){a=b.actions||[];b=0;for(var c=a.length;b\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J6a){var d=document.createElement("template");d.innerHTML=""; J6a=d}d=J6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);K6a=a}a=K6a;return a}}}); var uU=tU;uU.prototype.onServiceRequestCompleted=uU.prototype.onServiceRequestCompleted;w([P(V.YtActionSenderBehavior),x("design:type",Object)],uU.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],uU.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],uU.prototype,"data",void 0);w([R(),x("design:type",Object)],uU.prototype,"messageData",void 0); w([R({observer:"onSelectedResponseIndexChange"}),x("design:type",Number)],uU.prototype,"selectedResponseIndex",void 0);w([AE("#submit-button"),x("design:type",HTMLButtonElement)],uU.prototype,"submitButton",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],uU.prototype,"onServiceRequestCompleted",null);uU=w([U({is:"ytd-feedback-elicitation-single-question-renderer"})],uU);var L6a;var M6a;var N6a=function(){return O.apply(this,arguments)||this}; p(N6a,O); h.Object.defineProperties(N6a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===M6a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L6a){var d=document.createElement("template");d.innerHTML=""; L6a=d}d=L6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);M6a=a}a=M6a;return a}}}); var vU=N6a;w([R(),x("design:type",Object)],vU.prototype,"data",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],vU.prototype,"componentBehavior",void 0);vU=w([U({is:"ytd-game-details-renderer"})],vU);var O6a;var P6a;var wU=function(){return O.apply(this,arguments)||this}; p(wU,O);wU.prototype.configureRendererStamper=function(){return{"data.game":{id:"game",mapping:{gameDetailsRenderer:"ytd-game-details-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; h.Object.defineProperties(wU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===P6a){var a=document.createElement("template");a.innerHTML="
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O6a){var d=document.createElement("template");d.innerHTML=""; O6a=d}d=O6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);P6a=a}a=P6a;return a}}}); var xU=wU;w([P(W.YtRendererBehavior),x("design:type",Object)],xU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],xU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],xU.prototype,"data",void 0);xU=w([U({is:"ytd-game-card-renderer"})],xU);var Q6a;var R6a;var yU=function(){return O.apply(this,arguments)||this}; p(yU,O);yU.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; h.Object.defineProperties(yU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===R6a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q6a){var d=document.createElement("template");d.innerHTML=""; Q6a=d}d=Q6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);R6a=a}a=R6a;return a}}}); var zU=yU;w([P(W.YtRendererBehavior),x("design:type",Object)],zU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],zU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],zU.prototype,"data",void 0);zU=w([U({is:"ytd-grid-channel-renderer"})],zU);var S6a;var T6a;var U6a=function(){return O.apply(this,arguments)||this}; p(U6a,O); h.Object.defineProperties(U6a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===T6a){var a=document.createElement("template");a.innerHTML="\n\n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n \n
\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S6a){var d=document.createElement("template");d.innerHTML=""; S6a=d}d=S6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);T6a=a}a=T6a;return a}}}); var AU=U6a;w([P(W.YtRendererBehavior),x("design:type",Object)],AU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],AU.prototype,"data",void 0);AU=w([U({is:"ytd-grid-movie-playlist-renderer"})],AU);var V6a;var W6a;var X6a=function(){return O.apply(this,arguments)||this}; p(X6a,O); h.Object.defineProperties(X6a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===W6a){var a=document.createElement("template");a.innerHTML="\n\n

\n [[getSimpleString(data.title)]]\n

\n\n\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V6a){var d=document.createElement("template");d.innerHTML=""; V6a=d}d=V6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);W6a=a}a=W6a;return a}}}); var BU=X6a;w([P(W.YtRendererBehavior),x("design:type",Object)],BU.prototype,"ytRendererBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],BU.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],BU.prototype,"data",void 0);BU=w([U({is:"ytd-grid-playlist-renderer"})],BU);var Y6a;var Z6a;var CU=function(){return O.apply(this,arguments)||this}; p(CU,O);CU.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:!N("defer_menus")||N("desktop_persistent_menu")&&TN?void 0:0,waitForSignal:"eocs"},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}}}}; h.Object.defineProperties(CU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Z6a){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Y6a){var d=document.createElement("template");d.innerHTML=""; Y6a=d}d=Y6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Z6a=a}a=Z6a;return a}}}); var DU=CU;w([P(W.YtRendererBehavior),x("design:type",Object)],DU.prototype,"ytRendererBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],DU.prototype,"ytdDismissableItemBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],DU.prototype,"ytdLockupBehavior",void 0);w([P(Y),x("design:type",Object)],DU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],DU.prototype,"data",void 0);DU=w([U({is:"ytd-grid-radio-renderer"})],DU);var $6a;var a7a;var b7a=function(){var a=wE.apply(this,arguments)||this;a.continuationActionMap={"yt-append-continuation-items-action":"handleAppendContinuationItemsAction","yt-reload-continuation-items-command":"handleReloadContinuationItemsCommand","yt-show-reload-ui-command":"handleShowReloadUiCommand"};return a}; p(b7a,wE);e=b7a.prototype;e.configureContinuationPathMap=function(){return{}}; e.beforeRegister=function(){this.continuationPathMap=this.configureContinuationPathMap()}; e.attached=function(){this.actionHandlerBehavior.registerActionMap(this.continuationActionMap)}; e.detached=function(){this.actionHandlerBehavior.unregisterActionMap(this.continuationActionMap)}; e.observeData=function(){this.data&&(this.continuationIsReloading=!1)}; e.handleAppendContinuationItemsAction=function(a){var b=a.appendContinuationItemsAction;if(this.data&&this.data.targetId&&b&&this.continuationPathMap&&b.targetId===this.data.targetId&&b.continuationItems){var c=vQa(a);if((a=c&&this.continuationPathMap[c])&&c){c=this.get(a,this.data);var d;a:{for(d=0;d\n
\n\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$6a){var d=document.createElement("template");d.innerHTML=""; $6a=d}d=$6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a7a=a}a=a7a;return a}}}); var IU=HU;IU.prototype.fillRestIfNotCollapsible=IU.prototype.fillRestIfNotCollapsible;IU.prototype.initCollapsed=IU.prototype.initCollapsed;IU.prototype.onIronResize=IU.prototype.onIronResize;IU.prototype.persistentGuideChanged=IU.prototype.persistentGuideChanged;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],IU.prototype,"ironResizableBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],IU.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],IU.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],IU.prototype,"actionSenderBehavior",void 0);w([P(MQ),x("design:type",Object)],IU.prototype,"ytLazyListBehavior",void 0);w([P(SQ),x("design:type",Object)],IU.prototype,"ytNextContinuationBehavior",void 0);w([P(W1a.YtdPosterHoverAnimationBehavior),x("design:type",Object)],IU.prototype,"ytdPosterHoverAnimationBehavior",void 0); w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],IU.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(GU.YtContinuationHandlerBehavior),x("design:type",Object)],IU.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],IU.prototype,"data",void 0);w([R(),x("design:type",Boolean)],IU.prototype,"collapsed",void 0);w([R(),x("design:type",Number)],IU.prototype,"initialCount",void 0); w([R({computed:"computeShowMoreButton(data.showMoreText)"}),x("design:type",Object)],IU.prototype,"showMoreButton",void 0);w([R({computed:"computeIsCollapsible(data)"}),x("design:type",Boolean)],IU.prototype,"isCollapsible",void 0);w([AE("#items"),x("design:type",HTMLElement)],IU.prototype,"items",void 0);w([yE("guidePersistentAndVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],IU.prototype,"persistentGuideChanged",null); w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],IU.prototype,"onIronResize",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],IU.prototype,"initCollapsed",null);w([yE("canShowMore"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],IU.prototype,"fillRestIfNotCollapsible",null);IU=w([U({is:"ytd-grid-renderer"})],IU);var c7a;var d7a;var JU=function(){return O.apply(this,arguments)||this}; p(JU,O);JU.prototype.configureRendererStamper=function(){return{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; h.Object.defineProperties(JU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===d7a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c7a){var d=document.createElement("template");d.innerHTML=""; c7a=d}d=c7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);d7a=a}a=d7a;return a}}}); var KU=JU;w([P(W.YtRendererBehavior),x("design:type",Object)],KU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],KU.prototype,"ytRendererstamperBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],KU.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],KU.prototype,"data",void 0);KU=w([U({is:"ytd-grid-show-renderer"})],KU);var e7a;var f7a;var LU=function(){var a=O.apply(this,arguments)||this;a.isDisabled=!1;return a}; p(LU,O);e=LU.prototype; e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:N("defer_menus")?0:void 0,waitForSignal:"eocs"},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{buttonTooltipPosition:"top"}},upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer", notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.getMetadata=function(a){var b=[];if(a.metadataText&&0
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e7a){var d=document.createElement("template");d.innerHTML=""; e7a=d}d=e7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);f7a=a}a=f7a;return a}}}); var MU=LU;w([P(W.YtRendererBehavior),x("design:type",Object)],MU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],MU.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],MU.prototype,"ytdDismissableItemBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],MU.prototype,"ytdLockupBehavior",void 0); w([P(HQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],MU.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([R(),x("design:type",Object)],MU.prototype,"data",void 0);w([R(),x("design:type",Boolean)],MU.prototype,"noEndpoints",void 0);w([R({computed:"calculateBylineText(data)"}),x("design:type",Object)],MU.prototype,"bylineText",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],MU.prototype,"isSearch",void 0); w([R({reflectToAttribute:!0,computed:"calculateIsDisabled(data)"}),x("design:type",Object)],MU.prototype,"isDisabled",void 0);MU=w([U({is:"ytd-grid-video-renderer"})],MU);var g7a;var h7a;var NU=function(){return O.apply(this,arguments)||this}; p(NU,O);h.Object.defineProperties(NU.prototype,{showFromBrandText:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.fromBrandText)}}, showFromMerchantText:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.fromMerchantText)}}, useNewStyle:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.useNewStyle}}}); h.Object.defineProperties(NU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===h7a){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n
[[data.title]]
\n
\n [[data.price]]\n \n
\n
\n [[data.variantsDescription]]\n
\n
\n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g7a){var d=document.createElement("template");d.innerHTML=""; g7a=d}d=g7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);h7a=a}a=h7a;return a}}}); var OU=NU;w([P(W.YtRendererBehavior),x("design:type",Object)],OU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],OU.prototype,"data",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],OU.prototype,"showFromBrandText",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],OU.prototype,"showFromMerchantText",null);w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Object),x("design:paramtypes",[])],OU.prototype,"useNewStyle",null); OU=w([U({is:"ytd-vertical-product-card-renderer"})],OU);var i7a;var j7a;var PU=function(){return O.apply(this,arguments)||this}; p(PU,O);PU.prototype.configureRendererStamper=function(){return{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; h.Object.defineProperties(PU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===j7a){var a=document.createElement("template");a.innerHTML="\n\n\n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n \n \n \n
\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===i7a){var d=document.createElement("template");d.innerHTML=""; i7a=d}d=i7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);j7a=a}a=j7a;return a}}}); var QU=PU;w([P(W.YtRendererBehavior),x("design:type",Object)],QU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],QU.prototype,"ytRendererstamperBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],QU.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],QU.prototype,"data",void 0);QU=w([U({is:"ytd-grid-movie-renderer"})],QU);var k7a;var l7a;var RU=function(){return O.apply(this,arguments)||this}; p(RU,O);h.Object.defineProperties(RU.prototype,{themeable:{configurable:!0,enumerable:!0,get:function(){return N("desktop_themeable_vulcan")}}}); h.Object.defineProperties(RU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===l7a){var a=document.createElement("template");a.innerHTML="\n
\n [[getSimpleString(data.actionMessage)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k7a){var d=document.createElement("template");d.innerHTML=""; k7a=d}d=k7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);l7a=a}a=l7a;return a}}}); var SU=RU;w([P(W.YtRendererBehavior),x("design:type",Object)],SU.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],SU.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean),x("design:paramtypes",[])],SU.prototype,"themeable",null);SU=w([U({is:"ytd-details-bar-renderer"})],SU);var m7a;var n7a;var TU=function(){var a=O.apply(this,arguments)||this;a.themeable_=N("desktop_themeable_vulcan");return a}; p(TU,O);TU.prototype.dataChanged_=function(a){a=MO(a.foregroundThumbnailDetails.thumbnails,485);this.$.overlay.style["background-image"]="url('"+a+"')"}; TU.prototype.updateHoveringState=function(a){var b=this.$$("#video"),c=Polymer.dom(this.$["video-container"]);if(a&&!b){if(a=document.createElement("yt-video-as-thumbnail-details"),a.setAttribute("id","video"),a.autoplay=!0,a.loop=!0,a.data=this.data.videoThumbnail,c.appendChild(a),c=a.$.placeholder)c.style.height="275px",c.style.top="-2px"}else!a&&b&&c.removeChild(b)}; h.Object.defineProperties(TU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===n7a){var a=document.createElement("template");a.innerHTML="
\n
\n
[[getSimpleString(data.title)]]
\n
\n \n
\n
[[getSimpleString(data.description)]]
\n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===m7a){var d=document.createElement("template");d.innerHTML=""; m7a=d}d=m7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);n7a=a}a=n7a;return a}}}); var UU=TU;w([P(W.YtRendererBehavior),x("design:type",Object)],UU.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],UU.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],UU.prototype,"data",void 0);w([R(),x("design:type",Object)],UU.prototype,"videoData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],UU.prototype,"themeable_",void 0);UU=w([U({is:"ytd-poster-details-renderer"})],UU);var o7a;var p7a;Polymer({is:"yt-video-as-thumbnail-details",_template:function(){if(void 0!==p7a)return p7a;var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===o7a){var d=document.createElement("template");d.innerHTML=""; o7a=d}d=o7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return p7a=a}, properties:{data:{type:Object,observer:"dataChanged_"},animatePlaceholderOnEntrance:{type:Boolean,reflectToAttribute:!0},autoplay:{type:Boolean,reflectToAttribute:!0},videoThumbnail_:{type:Object,computed:"getVideoThumbnail_(data.videoThumbnails)"},loop:Boolean,isVideoPlaying_:Boolean},attached:function(){this.isVideoPlaying_=!1;this.$.video.classList.add("hideit");this.$.placeholder.classList.remove("hideit");this.listen(this.$.video,"ended","onEnded_");this.listen(this.$.mp4,"error","onError_")}, detached:function(){this.unlisten(this.$.video,"ended","onEnded_");this.unlisten(this.$.mp4,"error","onError_")}, play:function(){if(this.$.mp4.getAttribute("src")&&this.isMp4Supported_()){this.$.video.currentTime=0;this.$.video.load();var a=this.$.video.play();a?a.then(this.handleVideoStartPlaying_.bind(this)).catch(function(){this.fire("yt-video-thumbnail-not-playing")}.bind(this)):this.handleVideoStartPlaying_()}else this.fire("yt-video-thumbnail-not-playing")}, handleVideoStartPlaying_:function(){this.$.video.classList.remove("hideit");this.$.placeholder.classList.add("hideit");this.isVideoPlaying_=!0}, stop:function(){this.isVideoPlaying_&&(this.showPlaceholder_(),this.isVideoPlaying_=!1,this.$.video.pause(),this.$.video.currentTime=0)}, dataChanged_:function(a){a.thumbnailPlaceholder&&(a=MO(a.thumbnailPlaceholder.thumbnails,this.width),this.$.placeholder.style["background-image"]="url("+a+")");this.stop();this.autoplay&&this.play()}, showPlaceholder_:function(){this.$.video.classList.add("hideit");this.$.placeholder.classList.remove("hideit")}, onEnded_:function(){this.stop();this.fire("yt-video-thumbnail-ended");this.loop&&this.play()}, onError_:function(){this.fire("yt-video-thumbnail-error")}, isMp4Supported_:function(){return!(!this.$.video.canPlayType||!this.$.video.canPlayType("video/mp4").replace(/no/,""))}, getVideoThumbnail_:function(a){if(a&&a.length)return a[0]}});var q7a;var r7a;var VU=function(){var a=O.apply(this,arguments)||this;a.state="steady-state";a.isHovering=!1;a.isPrevHovering=!1;a.themeable_=N("desktop_themeable_vulcan");a.mouseEnterDelay_=0;return a}; p(VU,O);e=VU.prototype;e.ready=function(){var a=this.$.view;a.addEventListener("mouseenter",this.onMouseEnter_.bind(this));a.addEventListener("mouseleave",this.onMouseLeave_.bind(this))}; e.onMouseEnter_=function(){var a=this;this.mouseEnterDelay_=setTimeout(function(){a.isPosterDetailsAvailable_()&&a.fire("poster-renderer-hover")},500)}; e.onMouseLeave_=function(a){this.mouseEnterDelay_&&clearTimeout(this.mouseEnterDelay_);this.isPosterDetailsAvailable_()&&this.fire("poster-renderer-leave",{mouseEvent:a})}; e.isPosterDetailsAvailable_=function(){return!!(this.data&&this.data.posterDetails&&this.data.posterDetails.posterDetailsRenderer)}; e.updateTransform=function(a){null==a?(this.style.transform="",this.$.view.style.transform=""):(this.style.transform=DVa(new jO(a.translateX,a.translateY,1,1)),this.$.view.style.transform=this.isHovering?DVa(new jO(-137.5,0,a.scaleX/BVa,a.scaleY)):"")}; e.isPosterDetailHidden_=function(a,b){return!a&&!b}; e.updatePosterDetails_=function(){var a=this.isPrevHovering;this.$.hover.updateHoveringState(this.isHovering||a)}; h.Object.defineProperties(VU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===r7a){var a=document.createElement("template");a.innerHTML="\n\n\n \n \n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===q7a){var d=document.createElement("template");d.innerHTML=""; q7a=d}d=q7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);r7a=a}a=r7a;return a}}}); var WU=VU;WU.prototype.updatePosterDetails_=WU.prototype.updatePosterDetails_;w([P(W.YtRendererBehavior),x("design:type",Object)],WU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],WU.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],WU.prototype,"state",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],WU.prototype,"isHovering",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],WU.prototype,"isPrevHovering",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],WU.prototype,"themeable_",void 0);w([yE("isHovering","isPrevHovering"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WU.prototype,"updatePosterDetails_",null);WU=w([U({is:"ytd-poster-renderer"})],WU);var s7a;var t7a;Polymer({is:"yt-music-pass-small-feature-info-renderer",_template:function(){if(void 0!==t7a)return t7a;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s7a){var d=document.createElement("template");d.innerHTML=""; s7a=d}d=s7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return t7a=a}, behaviors:[W.YtRendererBehavior],attached:function(){this.parentNode.style.justifyContent="center"}, properties:{data:Object}});var u7a;var v7a;var XU=function(){return O.apply(this,arguments)||this}; p(XU,O);XU.prototype.computeThumbnailWidth=function(a){return a?602:428}; h.Object.defineProperties(XU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v7a){var a=document.createElement("template");a.innerHTML="\n\n\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u7a){var d=document.createElement("template");d.innerHTML=""; u7a=d}d=u7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v7a=a}a=v7a;return a}}}); var YU=XU;w([P(W.YtRendererBehavior),x("design:type",Object)],YU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],YU.prototype,"data",void 0);w([R(),x("design:type",Boolean)],YU.prototype,"wide",void 0);YU=w([U({is:"ytd-newspaper-hero-video-renderer"})],YU);var w7a;var x7a;var y7a=function(){return O.apply(this,arguments)||this}; p(y7a,O); h.Object.defineProperties(y7a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===x7a){var a=document.createElement("template");a.innerHTML="\n\n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n \n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w7a){var d=document.createElement("template");d.innerHTML=""; w7a=d}d=w7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x7a=a}a=x7a;return a}}}); var ZU=y7a;w([P(W.YtRendererBehavior),x("design:type",Object)],ZU.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],ZU.prototype,"data",void 0);ZU=w([U({is:"ytd-newspaper-mini-video-renderer"})],ZU);var z7a;var A7a;iP("itemSectionRenderer","newspaperRenderer","ytd-newspaper-renderer");var $U=function(){return O.apply(this,arguments)||this}; p($U,O);$U.prototype.configureRendererStamper=function(){return{"data.primaryContents":{id:"primary-contents",mapping:{newspaperHeroVideoRenderer:"ytd-newspaper-hero-video-renderer"}},"data.secondaryContents":{id:"secondary-contents",mapping:{newspaperMiniVideoRenderer:"ytd-newspaper-mini-video-renderer"}}}}; h.Object.defineProperties($U,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===A7a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z7a){var d=document.createElement("template");d.innerHTML=""; z7a=d}d=z7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);A7a=a}a=A7a;return a}}}); var aV=$U;w([P(Y),x("design:type",Object)],aV.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],aV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],aV.prototype,"data",void 0);aV=w([U({is:"ytd-newspaper-renderer"})],aV);var B7a;var C7a;var D7a={};D7a.YtReorderableBehavior={_noAccessors:!0,properties:{scrollMargin:{type:Number,value:100}},created:function(){this.dragScrollSupport_=this.dragListGroup_=null;this.boundOnDraggerCreated_=this.onDraggerCreated_.bind(this);this.boundOnDragStart_=this.onDragStart_.bind(this);this.boundOnDrop_=this.onDrop_.bind(this);this.scrollElement_=document.documentElement;this.boundOnReorderableScroll_=this.onReorderableScroll_.bind(this)}, detached:function(){this.disposeDragDrop()}, disposeDragDrop:function(){this.dragListGroup_&&(vi(this.dragListGroup_,AF,this.boundOnDragStart_),vi(this.dragListGroup_,BF,this.boundOnDragStart_),this.dragListGroup_.dispose(),this.dragListGroup_=null);this.disposeDragScroll_();this.scrollElement_.removeEventListener("scroll",this.boundOnReorderableScroll_)}, disposeDragScroll_:function(){this.dragScrollSupport_&&(Rg(this.dragScrollSupport_),this.dragScrollSupport_=null)}, startDragDrop:function(a,b,c){c=void 0===c?"":c;this.disposeDragDrop();b&&(this.scrollElement_=b);this.dragListGroup_=new zF;this.dragListGroup_.setHysteresis(2);QCa(this.dragListGroup_,a);this.dragListGroup_.draggerElClasses_=Pb("dragging").split(" ");c&&RCa(this.dragListGroup_,function(d){return fg(c,d)||d}); si(this.dragListGroup_,KCa,this.boundOnDraggerCreated_);si(this.dragListGroup_,AF,this.boundOnDragStart_);si(this.dragListGroup_,BF,this.boundOnDrop_);this.dragListGroup_.init();this.scrollElement_.addEventListener("scroll",this.boundOnReorderableScroll_,{passive:!0})}, onDraggerCreated_:function(a){var b=a.dragger;b.scrollTarget_=this.scrollElement_;a=a.draggerEl;b&&a.menuOpened&&(b.enabled_=!1)}, onDragStart_:function(a){var b=a.draggerEl;a=a.currDragItem;var c=Object.assign({},a.data);c.trackingParams=void 0;b.data=c;b.style.width=a.clientWidth+"px";b.style.zIndex=2026;b.onDrag&&b.onDrag();(a=document.querySelector("ytd-app"))&&a.appendChild(b);this.dragScrollSupport_=new FF(this.scrollElement_,this.scrollMargin);this.dragScrollSupport_.horizontalScrolling_=!1;b=this.dragScrollSupport_;b.constrainScroll_=!!b.margin_&&!0}, onDrop_:function(a){this.handleDrop(a);this.disposeDragScroll_()}, onReorderableScroll_:function(){if(this.dragListGroup_){var a=this.dragListGroup_;DF(a,a.currDragItem_)}}, handleDrop:function(){}};iP("itemSectionRenderer","playlistVideoListRenderer","ytd-playlist-video-list-renderer");var bV=function(){var a=O.apply(this,arguments)||this;a.isSegment=!1;a.actionMap={"yt-playlist-remove-videos-action":"handlePlaylistRemoveVideosAction_","yt-update-playlist-action":"handleUpdatePlaylistAction_"};a.nextContinuation={continuationType:"playlistVideoListContinuation"};return a}; p(bV,O);e=bV.prototype; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{playlistVideoRenderer:{component:"ytd-playlist-video-renderer",properties:{isEditable:"[[isEditable_]]",canReorder:"[[canReorder_]]"}},continuationItemRenderer:"ytd-continuation-item-renderer"},events:!0},"data.continuations":{id:"continuations",mapping:{nextContinuationData:"yt-next-continuation"}},"data.sortFilterMenu":{id:"sort-filter-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{closeOnActivate:"true"}}}}}}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents"}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged_=function(){this.ytReorderableBehavior.disposeDragDrop()}; e.onRendererstamperFinished_=function(){this.isEditable_&&this.canReorder_&&(N("kevlar_playlist_drag_handles")?this.ytReorderableBehavior.startDragDrop(this.$.contents,document.documentElement,"playlist-drag-handle"):this.ytReorderableBehavior.startDragDrop(this.$.contents,document.documentElement))}; e.onPlaylistReloading_=function(){this.isReloading_=!0}; e.computeContentsClass_=function(a){return a?"reloading":""}; e.computeIsSortable_=function(a,b){return a&&0\n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B7a){var d=document.createElement("template");d.innerHTML=""; B7a=d}d=B7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);C7a=a}a=C7a;return a}}}); var cV=bV;cV.prototype.onPlaylistReloading_=cV.prototype.onPlaylistReloading_;cV.prototype.onRendererstamperFinished_=cV.prototype.onRendererstamperFinished_;w([P(W.YtRendererBehavior),x("design:type",Object)],cV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],cV.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],cV.prototype,"ytActionHandlerBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],cV.prototype,"ytActionSenderBehavior",void 0);w([P(SQ),x("design:type",Object)],cV.prototype,"ytNextContinuationBehavior",void 0);w([P(D7a.YtReorderableBehavior),x("design:type",Object)],cV.prototype,"ytReorderableBehavior",void 0);w([P(GU.YtContinuationHandlerBehavior),x("design:type",Object)],cV.prototype,"ytContinuationHandlerBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],cV.prototype,"data",void 0); w([R(),x("design:type",Boolean)],cV.prototype,"isReloading_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],cV.prototype,"isSegment",void 0);w([R({computed:"computeIsSortable_(data.canReorder, data.contents.length)"}),x("design:type",Boolean)],cV.prototype,"isSortable_",void 0);w([R({computed:"computeIsEditable_(data.isEditable)"}),x("design:type",Boolean)],cV.prototype,"isEditable_",void 0); w([R({computed:"computeCanReorder_(data.canReorder)"}),x("design:type",Boolean)],cV.prototype,"canReorder_",void 0);w([R({value:101}),x("design:type",Number)],cV.prototype,"scrollMargin",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],cV.prototype,"onRendererstamperFinished_",null); w([S("yt-playlist-reloading"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],cV.prototype,"onPlaylistReloading_",null);cV=w([U({is:"ytd-playlist-video-list-renderer"})],cV);var E7a;var F7a;var dV=function(){return O.apply(this,arguments)||this}; p(dV,O);e=dV.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.canReorderChanged=function(a){this.persistentDragHandle=N("kevlar_playlist_drag_handles")&&a}; e.onDrag=function(){if(this.thumbnail){var a=this.thumbnail.$$("yt-img-shadow");a&&a.onShow()}}; e.onMenuOverlayChanged=function(a,b){this.menuOpened=b}; e.onHandleMouseenter=function(){this.handleIsHovered=!0}; e.onHandleMouseleave=function(){this.handleIsHovered=!1}; h.Object.defineProperties(dV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===F7a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n \n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E7a){var d=document.createElement("template");d.innerHTML=""; E7a=d}d=E7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);F7a=a}a=F7a;return a}}}); var eV=dV;eV.prototype.onMenuOverlayChanged=eV.prototype.onMenuOverlayChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],eV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],eV.prototype,"ytRendererstamperBehavior",void 0);w([P(HQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],eV.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],eV.prototype,"ytdLockupBehavior",void 0); w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],eV.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],eV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],eV.prototype,"isEditable",void 0);w([R({observer:"canReorderChanged",reflectToAttribute:!0}),x("design:type",Boolean)],eV.prototype,"canReorder",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],eV.prototype,"menuOpened",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],eV.prototype,"handleIsHovered",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],eV.prototype,"persistentDragHandle",void 0);w([AE("#thumbnail"),x("design:type",O)],eV.prototype,"thumbnail",void 0);w([S("yt-menu-overlay-changed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Boolean]),x("design:returntype",void 0)],eV.prototype,"onMenuOverlayChanged",null);eV=w([U({is:"ytd-playlist-video-renderer"})],eV);var G7a;var H7a;iP("itemSectionRenderer","searchHistoryQueryRenderer","ytd-search-history-query-renderer");var fV=function(){return O.apply(this,arguments)||this}; p(fV,O);fV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}}; fV.prototype.dataChanged=function(){this.isHistory=-1!==window.location.pathname.indexOf("/feed/history")}; h.Object.defineProperties(fV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===H7a){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===G7a){var d=document.createElement("template");d.innerHTML=""; G7a=d}d=G7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);H7a=a}a=H7a;return a}}}); var gV=fV;w([P(W.YtRendererBehavior),x("design:type",Object)],gV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],gV.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],gV.prototype,"ytdDismissableItemBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],gV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],gV.prototype,"isHistory",void 0); gV=w([U({is:"ytd-search-history-query-renderer"})],gV);var I7a;var J7a;var hV,iV=function(){return O.apply(this,arguments)||this}; p(iV,O);iV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; iV.prototype.onTap=function(){this.data&&this.data.navigationEndpoint&&this.data.adPlaybackContextParams&&OKa(this.data.navigationEndpoint,this.data.adPlaybackContextParams)}; iV.prototype.dataChanged=function(){this.data&&(this.data.impressionUrls&&!this.data.impressionsFired&&(Tn(this.data.impressionUrls),this.data.impressionsFired=!0),this.data.adBadge||this.set("data.adBadge",hV.DEFAULT_AD_BADGE_RENDERER),this.data.activeView&&dQ(this.ytdActiveViewBehavior,this.data.activeView,16))}; iV.prototype.computeThumbnailWidth=function(a,b){return a?"BIG1"===b?340:"BIG2"===b?320:"MEDIUM1"===b?300:"MEDIUM2"===b?280:360:246}; h.Object.defineProperties(iV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===J7a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===I7a){var d=document.createElement("template");d.innerHTML=""; I7a=d}d=I7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);J7a=a}a=J7a;return a}}}); var jV=hV=iV;hV.prototype.dataChanged=hV.prototype.dataChanged;hV.prototype.onTap=hV.prototype.onTap;jV.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:mL("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Y),x("design:type",Object)],jV.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],jV.prototype,"ytRendererBehavior",void 0);w([P(eQ),x("design:type",Object)],jV.prototype,"ytdActiveViewBehavior",void 0); w([R(),x("design:type",Object)],jV.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],jV.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return fk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],jV.prototype,"prominentThumbStyle",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],jV.prototype,"onTap",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],jV.prototype,"dataChanged",null);jV=hV=w([U({is:"ytd-promoted-video-renderer"})],jV);var K7a;var L7a;iP("itemSectionRenderer","searchPyvRenderer","ytd-search-pyv-renderer");var kV=function(){return O.apply(this,arguments)||this}; p(kV,O);kV.prototype.configureRendererStamper=function(){return{"data.ads":{id:"contents",mapping:{promotedVideoRenderer:"ytd-promoted-video-renderer"}}}}; h.Object.defineProperties(kV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===L7a){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K7a){var d=document.createElement("template");d.innerHTML="";K7a=d}d=K7a;c.call(b,d.content.cloneNode(!0), a.content.firstChild);L7a=a}a=L7a;return a}}}); var lV=kV;w([P(W.YtRendererBehavior),x("design:type",Object)],lV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],lV.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],lV.prototype,"data",void 0);lV=w([U({is:"ytd-search-pyv-renderer"})],lV);var M7a;var N7a;var mV=function(){var a=O.apply(this,arguments)||this;a.thumbnailHeight=118;a.buttonClasses_=["arrow"];a.POST_HEIGHT_=200;a.POST_TALL_HEIGHT_=218;return a}; p(mV,O); mV.prototype.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{compactStationRenderer:"ytd-compact-station-renderer",gridChannelRenderer:"ytd-grid-channel-renderer",gridMoviePlaylistRenderer:"ytd-grid-movie-playlist-renderer",gridMovieRenderer:"ytd-grid-movie-renderer",gridPlaylistRenderer:"ytd-grid-playlist-renderer",gridRadioRenderer:"ytd-grid-radio-renderer",gridShowRenderer:"ytd-grid-show-renderer",gridVideoRenderer:"ytd-grid-video-renderer",merchShelfItemRenderer:"ytd-merch-shelf-item-renderer",shoppingCompanionCarouselItemRenderer:"ytd-shopping-companion-item-renderer", displayAdRenderer:"ytd-display-ad-renderer",commentRenderer:"ytd-comment-renderer",compactChannelRecommendationCardRenderer:"ytd-compact-channel-recommendation-card-renderer",postRenderer:"ytd-post-renderer",sharedPostRenderer:"ytd-shared-post-renderer",primetimePromoPanelRenderer:"ytd-primetime-promo-panel-renderer",verticalProductCardRenderer:"ytd-vertical-product-card-renderer"}},"data.previousButton":{id:"left-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}, classListBinding:"[[buttonClasses_]]"}},initialRenderPriority:0,waitForSignal:"eocs"},"data.nextButton":{id:"right-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"},classListBinding:"[[buttonClasses_]]"}}}}}; mV.prototype.dataChanged_=function(){this.ytdHorizontalListBehavior.reset();this.data&&this.data.items&&this.data.items.some(function(a){return!!a.postRenderer})&&(this.thumbnailHeight=N("enable_taller_posts_on_desktop")?this.POST_TALL_HEIGHT_:this.POST_HEIGHT_,this.ytdHorizontalListBehavior.useFloorScrolling=!0)}; mV.prototype.onThumbnailHeightChanged_=function(a){this.updateStyles({"--ytd-thumbnail-height":a+"px"})}; mV.prototype.computeInitialCountNumber_=function(a){if(!a)return 6;var b=a.items.some(function(c){return!!c.topicRecommendationsChipRenderer}); a=a.items.some(function(c){return!!c.displayAdRenderer}); return b?9:N("desktop_search_prominent_thumbs")&&a?8:6}; h.Object.defineProperties(mV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===N7a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===M7a){var d=document.createElement("template");d.innerHTML=""; M7a=d}d=M7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);N7a=a}a=N7a;return a}}}); var nV=mV;w([P(W.YtRendererBehavior),x("design:type",Object)],nV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],nV.prototype,"ytRendererstamperBehavior",void 0);w([P(NQ.YtdHorizontalListBehavior),x("design:type",Object)],nV.prototype,"ytdHorizontalListBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],nV.prototype,"data",void 0);w([R({observer:"onThumbnailHeightChanged_"}),x("design:type",Object)],nV.prototype,"thumbnailHeight",void 0); w([R(),x("design:type",Array)],nV.prototype,"buttonClasses_",void 0);w([R({computed:"computeInitialCountNumber_(data)"}),x("design:type",Number)],nV.prototype,"initialCount",void 0);nV=w([U({is:"yt-horizontal-list-renderer"})],nV);var O7a;var P7a;var Q7a={YtSparklesClickLocationBehavior:{clickTargetMap:null,containerId:null,handleClick:function(a,b){var c=this.getClickTarget_(b);if(c&&this.isClickAllowed_(c)){b.preventDefault();a=(0,y.unsafeClone)(a);var d=this.getContainerBoundingRect();b=this.getRelativeClickXy_(b,d);c={NX:b[0],NY:b[1],NB:c.code};N("enable_dim_macro_on_web")&&(c.DIM=Math.round(d.width)+"x"+Math.round(d.height));this.expandEndpointUrlMacros_(a,c);this.fire("yt-navigate",{endpoint:a})}}, getClickTarget_:function(a){if(!this.clickTargetMap)return null;a=Polymer.dom(a).path||[];a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;if(b===this.$.menu)break;if(b=this.clickTargetMap.get(b.id))return b}return null}, getRelativeClickXy_:function(a,b){var c=Math.round(a.detail.x-b.left);a=Math.round(a.detail.y-b.top);return 0>c||0>a?[null,null]:[c,a]}, getContainerBoundingRect:function(){return this.$[this.containerId].getBoundingClientRect()}, expandEndpointUrlMacros_:function(a,b){for(var c=k(a.loggingUrls||[]),d=c.next();!d.done;d=c.next())d=d.value,d.baseUrl&&(d.baseUrl=ow(d.baseUrl,b));a.urlEndpoint&&a.urlEndpoint.url&&(a.urlEndpoint.url=ow(a.urlEndpoint.url,b));a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.url&&(a.commandMetadata.webCommandMetadata.url=ow(a.commandMetadata.webCommandMetadata.url,b))}, configureClickTargets:function(a,b,c){this.containerId=a;this.clickTargetMap=new Map;a=k(b);for(b=a.next();!b.done;b=a.next())if(b=b.value,b.location){var d=c.get(b.location);d&&(this.toggleClass("yt-simple-endpoint",this.isClickAllowed_(b),this.$[d]),this.clickTargetMap.set(d,b))}}, isClickAllowed_:function(a){return"PROMOTED_SPARKLES_CLICK_BEHAVIOR_TYPE_OPEN_AD"===a.behaviorType}}};var oV,pV=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-mute-ad-action":"handleMuteAd"};return a}; p(pV,O);e=pV.prototype; e.configureRendererStamper=function(){return{"data.badge":{id:"badge",mapping:{metadataBadgeRenderer:{component:"ytd-badge-supported-renderer",properties:{topStandaloneBadge:"[[data.badge]]"}}}},"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.image":{id:"media",mapping:{thumbnail:{component:"yt-img-shadow",properties:{thumbnail:"[[data.image.thumbnail]]",width:"[[mediaThumbnailWidth]]"}}}},"data.mediaBadge":{id:"media-badge",mapping:{metadataBadgeRenderer:{component:"ytd-badge-supported-renderer",properties:{topStandaloneBadge:"[[data.mediaBadge]]"}}}}, "data.mediaHoverOverlay":{id:"media-hover-overlay",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.ctaButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.dataChanged=function(){this.clickCommand=this.get("data.clickCommand.commandExecutorCommand.commands.0");this.clickCommand||(this.clickCommand=this.get("data.clickCommand"));this.clickCommand&&(this.updateMediaBackgroundImage(),this.ytSparklesClickLocationBehavior.configureClickTargets("root",oV.DEFAULT_CLICK_LOCATION_BEHAVIOR,oV.CLICK_LOCATION_ID_MAP))}; e.onTap=function(a){this.clickCommand&&this.ytSparklesClickLocationBehavior.handleClick(this.clickCommand,a)}; e.updateMediaBackgroundImage=function(){var a=this.get("data.image.thumbnail.thumbnails");a&&(a=MO(a,0))&&this.updateStyles({"--ytd-display-ad-media-background-image":"url("+a+")"})}; e.impressionLog=function(){if((!this.data||!this.data.impressionsFired)&&this.data&&this.data.impressionEndpoints){for(var a=0;a
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O7a){var d=document.createElement("template");d.innerHTML=""; O7a=d}d=O7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);P7a=a}a=P7a;return a}}}); var qV=oV=pV;oV.prototype.onTap=oV.prototype.onTap;oV.prototype.dataChanged=oV.prototype.dataChanged;qV.VERTICAL_CAROUSEL_ITEM_IMAGE_WIDTH=135;qV.CLICK_LOCATION_ID_MAP=new Map([["PROMOTED_SPARKLES_CLICK_LOCATION_BACKGROUND","root"]]);qV.DEFAULT_CLICK_LOCATION_BEHAVIOR=[{location:"PROMOTED_SPARKLES_CLICK_LOCATION_BACKGROUND",code:2,behaviorType:"PROMOTED_SPARKLES_CLICK_BEHAVIOR_TYPE_OPEN_AD"}];w([P(W.YtRendererBehavior),x("design:type",Object)],qV.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],qV.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],qV.prototype,"ytdDismissableItemBehavior",void 0);w([P(IQ),x("design:type",Object)],qV.prototype,"ytdReduxBehavior",void 0);w([P(Q7a.YtSparklesClickLocationBehavior),x("design:type",Object)],qV.prototype,"ytSparklesClickLocationBehavior",void 0);w([P([NO.YtActionHandlerBehavior]),x("design:type",Object)],qV.prototype,"actionHandlerBehavior",void 0); w([R(),x("design:type",Object)],qV.prototype,"data",void 0);w([R(),x("design:type",Object)],qV.prototype,"clickCommand",void 0);w([R({reflectToAttribute:!0,selector:tT}),x("design:type",Boolean)],qV.prototype,"miniMode",void 0);w([R({reflectToAttribute:!0}),zE("data.layout"),x("design:type",String),x("design:paramtypes",[])],qV.prototype,"layout",null);w([zE("data.layout"),x("design:type",Object),x("design:paramtypes",[])],qV.prototype,"mediaThumbnailWidth",null); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],qV.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],qV.prototype,"onTap",null);qV=oV=w([U({is:"ytd-display-ad-renderer"})],qV);var R7a;var S7a;var T7a=function(){return O.apply(this,arguments)||this}; p(T7a,O); h.Object.defineProperties(T7a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===S7a){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R7a){var d=document.createElement("template");d.innerHTML=""; R7a=d}d=R7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);S7a=a}a=S7a;return a}}}); var rV=T7a;w([P(W.YtRendererBehavior),x("design:type",Object)],rV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],rV.prototype,"data",void 0);rV=w([U({is:"ytd-compact-station-renderer"})],rV);var U7a;var V7a;var W7a=function(){var a=O.apply(this,arguments)||this;a.isPrimetimeRedesign=!1;return a}; p(W7a,O); h.Object.defineProperties(W7a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===V7a){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U7a){var d=document.createElement("template");d.innerHTML=""; U7a=d}d=U7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);V7a=a}a=V7a;return a}}}); var sV=W7a;w([P(W.YtRendererBehavior),x("design:type",Object)],sV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],sV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],sV.prototype,"isPrimetimeRedesign",void 0);sV=w([U({is:"ytd-panel-show-style-metadata-renderer"})],sV);var X7a;var Y7a;var tV=function(){var a=O.apply(this,arguments)||this;a.isPrimetimeRedesign=!1;return a}; p(tV,O);e=tV.prototype;e.onDataChange=function(){this.isPrimetimeRedesign=!!this.data&&!!this.data.buttonText}; e.configureRendererStamper=function(){return{"data.metadata":{id:"panel-metadata",mapping:{panelShowStyleMetadataRenderer:{component:"ytd-panel-show-style-metadata-renderer",properties:{isPrimetimeRedesign:"[[isPrimetimeRedesign]]"}}}}}}; e.computeThumbnail=function(a){if(a)return a.smallFormFactorBackgroundThumbnail||a.largeFormFactorBackgroundThumbnail}; e.computeThumbnailWidth=function(a){return a?9999:321}; e.shouldHideActionButton=function(a,b){return!(b&&a&&a.buttonText)}; h.Object.defineProperties(tV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Y7a){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X7a){var d=document.createElement("template");d.innerHTML=""; X7a=d}d=X7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Y7a=a}a=Y7a;return a}}}); var uV=tV;uV.prototype.onDataChange=uV.prototype.onDataChange;w([P(W.YtRendererBehavior),x("design:type",Object)],uV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],uV.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],uV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],uV.prototype,"isPrimetimeRedesign",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],uV.prototype,"onDataChange",null);uV=w([U({is:"ytd-primetime-promo-panel-renderer"})],uV);var Z7a;var $7a;var vV={};vV.YtMacroReplacementBehavior=[V.YtActionSenderBehavior,{sendServiceRequestAction:function(a){if(a&&1==a.length&&Array.isArray(a[0].loggingUrls)){a=y.unsafeClone(a[0]);var b=this.macros||{},c=this.getAdModuleClient_();if(!c)return Mi();a.loggingUrls.forEach(function(d){if(d.baseUrl){var f=d.baseUrl;var g=b;g=void 0===g?{}:g;f=c.getOptions().includes("replaceUrlMacros")?e2a(c,"replaceUrlMacros",{url:f,additionalMapping:g}):f;d.baseUrl=f}},this); a=[a]}return V.YtActionSenderBehavior.sendServiceRequestAction.call(this,a)}, getAdModuleClient_:function(){var a=ZM(this);return a?(a=a.getPlayer())?new QQ(a):null:null}}];var wV=function(){return O.apply(this,arguments)||this}; p(wV,O);wV.prototype.getMacros=function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}; wV.prototype.onTap=function(){this.data&&this.fire("yt-navigate",{endpoint:this.data.clickthroughEndpoint})}; h.Object.defineProperties(wV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$7a){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n [[getSimpleString(data.headline)]]\n [[getSimpleString(data.priceText)]]\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z7a){var d=document.createElement("template");d.innerHTML=""; Z7a=d}d=Z7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$7a=a}a=$7a;return a}}}); var xV=wV;w([P(W.YtRendererBehavior),x("design:type",Object)],xV.prototype,"ytRendererBehavior",void 0);w([P(vV.YtMacroReplacementBehavior),x("design:type",Object)],xV.prototype,"ytMacroReplacementBehavior",void 0);w([R(),x("design:type",Object)],xV.prototype,"data",void 0);w([R({computed:"getMacros(data)"}),x("design:type",Object)],xV.prototype,"macros",void 0);xV=w([U({is:"ytd-shopping-companion-item-renderer"})],xV);var a8a;var b8a;var yV=function(){return O.apply(this,arguments)||this}; p(yV,O);yV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:N("defer_menus")?0:void 0,waitForSignal:"eocs"}}}; yV.prototype.dataChanged=function(a){a=this.get("colorExtractionPalette.section1Color",a);a=dO(a);this.updateStyles({"--ytd-channel-recommendation-card-avatar-overlay-color":a})}; yV.prototype.computeCardStyle=function(a){return this.get("style.value",a)||null}; h.Object.defineProperties(yV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===b8a){var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n \n \n \n
\n
\n [[getSimpleString(data.channelTitle)]]\n
\n
\n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a8a){var d=document.createElement("template");d.innerHTML=""; a8a=d}d=a8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b8a=a}a=b8a;return a}}}); var zV=yV;w([P(W.YtRendererBehavior),x("design:type",Object)],zV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],zV.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],zV.prototype,"ytdDismissableItemBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],zV.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeCardStyle(data)"}),x("design:type",String)],zV.prototype,"cardStyle",void 0); zV=w([U({is:"ytd-compact-channel-recommendation-card-renderer"})],zV);var c8a;var d8a;var AV=function(){return O.apply(this,arguments)||this}; p(AV,O);AV.prototype.dataChanged=function(){this.isNoPriceFormat=this.isUsFormat=this.isEuFormat=!1;this.data.price?"REGIONAL_FORMAT_EU"===this.data.regionFormat?this.isEuFormat=!0:this.isUsFormat=!0:this.isNoPriceFormat=!0}; AV.prototype.computeAriaLabel=function(){return this.data&&this.data.accessibilityTitle?this.data.accessibilityTitle:this.data.title+", "+this.data.price+", "+this.data.additionalFeesText+", "+this.data.vendorName}; h.Object.defineProperties(AV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===d8a){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n
\n
[[data.title]]
\n \n \n \n \n
[[data.description]]
\n
\n
\n
\n
[[data.buttonText]]
\n \n \n
\n
\n\n
\n \n
\n \n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c8a){var d=document.createElement("template");d.innerHTML=""; c8a=d}d=c8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);d8a=a}a=d8a;return a}}}); var BV=AV;BV.prototype.dataChanged=BV.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],BV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],BV.prototype,"data",void 0);w([R(),x("design:type",Boolean)],BV.prototype,"isEuFormat",void 0);w([R(),x("design:type",Boolean)],BV.prototype,"isUsFormat",void 0);w([R(),x("design:type",Boolean)],BV.prototype,"isNoPriceFormat",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],BV.prototype,"dataChanged",null);BV=w([U({is:"ytd-merch-shelf-item-renderer"})],BV);var e8a;var f8a;var CV=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction"};return a}; p(CV,O);e=CV.prototype;e.attached=function(){this.requestElementsPerRow()}; e.configureRendererStamper=function(){return{"data.actionButton":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.dataChanged=function(){this.hideThumbnail=!1;this.requestElementsPerRow()}; e.computeViewStyle=function(a){return a.style?a.style:"COMPACT_PROMOTED_ITEM_STYLE_UNSPECIFIED"}; e.onUpdateElementsPerRowAction=function(a){this.hideThumbnail="COMPACT_PROMOTED_ITEM_STYLE_RICH_GRID"===this.viewStyle&&1===a}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; h.Object.defineProperties(CV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===f8a){var a=document.createElement("template");a.innerHTML="
\n\n
\n
\n

\n \n

\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e8a){var d=document.createElement("template");d.innerHTML=""; e8a=d}d=e8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);f8a=a}a=f8a;return a}}}); var DV=CV;DV.prototype.dataChanged=DV.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],DV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],DV.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],DV.prototype,"ytdDismissableItemBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],DV.prototype,"actionHandlerBehavior",void 0); w([R(),x("design:type",Object)],DV.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],DV.prototype,"hideThumbnail",void 0);w([R({reflectToAttribute:!0,computed:"computeViewStyle(data)"}),x("design:type",String)],DV.prototype,"viewStyle",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],DV.prototype,"dataChanged",null);DV=w([U({is:"ytd-compact-promoted-item-renderer"})],DV);var g8a;var h8a;var EV=function(){return O.apply(this,arguments)||this}; p(EV,O);EV.prototype.configureRendererStamper=function(){return{shownItems:{id:"grid-container",mapping:{channelRenderer:"ytd-channel-renderer",compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; EV.prototype.fillRestIfNoShowMore=function(a,b){!a.showMoreText&&b&&this.ytLazyListBehavior.fillRemainingListItems()}; EV.prototype.onShowMoreClick=function(){this.ytLazyListBehavior.fillRemainingListItems()}; EV.prototype.computeViewAllHidden=function(a,b){return a||!b.viewAllEndpoint}; h.Object.defineProperties(EV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===h8a){var a=document.createElement("template");a.innerHTML="
\n\n \n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g8a){var d=document.createElement("template");d.innerHTML=""; g8a=d}d=g8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);h8a=a}a=h8a;return a}}}); var FV=EV;FV.prototype.fillRestIfNoShowMore=FV.prototype.fillRestIfNoShowMore;w([P(W.YtRendererBehavior),x("design:type",Object)],FV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],FV.prototype,"ytRendererstamperBehavior",void 0);w([P(MQ),x("design:type",Object)],FV.prototype,"ytLazyListBehavior",void 0);w([R(),x("design:type",Object)],FV.prototype,"data",void 0); w([yE("data","canShowMore"),x("design:type",Function),x("design:paramtypes",[Object,Boolean]),x("design:returntype",void 0)],FV.prototype,"fillRestIfNoShowMore",null);FV=w([U({is:"ytd-expanded-shelf-contents-renderer"})],FV);var i8a;var j8a;iP("itemSectionRenderer","shelfRenderer","ytd-shelf-renderer");var GV=function(){return O.apply(this,arguments)||this}; p(GV,O);e=GV.prototype; e.configureRendererStamper=function(){return{"data.content":{id:"contents",mapping:{gridRenderer:"ytd-grid-renderer",horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{thumbnailHeight:118}},horizontalMovieListRenderer:{component:"yt-horizontal-list-renderer",params:{thumbnailHeight:302}},expandedShelfContentsRenderer:"ytd-expanded-shelf-contents-renderer",messageRenderer:{component:"ytd-message-renderer",params:{shelf:!0}},verticalListRenderer:{component:"ytd-vertical-list-renderer",properties:{isSearch:"[[isSearch]]"}}}}, "data.playAllButton":{id:"play-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",attributes:{condensed:!0,icon:"yt-icons:more"}}}},"data.sortFilter":{id:"sort-filter",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},dismissedRenderer:{id:"dismissed", mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.computeThumbnailStyle=function(a){return a||""}; e.computePlaceAnnotationUnderTitle=function(a){return"CHANNEL_THUMBNAIL_STYLE_BOXART"===a.thumbnailStyle}; e.onDataChange=function(a){a&&a.content&&a.content.horizontalListRenderer&&!a.content.horizontalListRenderer.items&&(a.content.horizontalListRenderer=void 0)}; e.onLockupRequested=function(a){if(this.data&&this.data.content&&this.data.content.gridRenderer&&this.data.content.gridRenderer.items&&a.detail&&a.detail.videoIds){for(var b=this.data.content.gridRenderer.items,c=new Set,d=k(a.detail.videoIds),f=d.next();!f.done;f=d.next())c.add(f.value);a.detail.returnValue=b.filter(function(g){return g.gridVideoRenderer&&g.gridVideoRenderer.videoId&&c.has(g.gridVideoRenderer.videoId)}).map(function(g){return g.gridVideoRenderer})}}; h.Object.defineProperties(GV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===j8a){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===i8a){var d=document.createElement("template");d.innerHTML=""; i8a=d}d=i8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);j8a=a}a=j8a;return a}}}); var HV=GV;HV.prototype.onLockupRequested=HV.prototype.onLockupRequested;HV.prototype.onDataChange=HV.prototype.onDataChange;w([P(Y),x("design:type",Object)],HV.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],HV.prototype,"ytdDismissableItemBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],HV.prototype,"ytRendererBehavior",void 0); w([P(Polymer.IronResizableBehavior),x("design:type",Object)],HV.prototype,"ironResizableBehavior",void 0);w([R(),x("design:type",Object)],HV.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],HV.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_fluid_dismiss")}}), x("design:type",Boolean)],HV.prototype,"enableFluidDismiss",void 0);w([R({reflectToAttribute:!0,computed:"computeThumbnailStyle(data.thumbnailStyle)"}),x("design:type",String)],HV.prototype,"thumbnailStyle",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],HV.prototype,"onDataChange",null); w([S("yt-lockup-requested"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],HV.prototype,"onLockupRequested",null);HV=w([U({is:"ytd-shelf-renderer"})],HV);var k8a;var l8a;var IV=function(){return O.apply(this,arguments)||this}; p(IV,O);e=IV.prototype;e.configureRendererStamper=function(){return{visibleItems:{id:"items",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:{component:"ytd-video-renderer",properties:{isSearch:"[[isSearch]]"}}}}}}; e.computeVisibleItems=function(a,b){return void 0!==a&&a.items?b?a.items.slice(0,this.data.collapsedItemCount):a.items:[]}; e.computeHideShowMore=function(a,b,c){return a>=b||!c}; e.computeHideShowAll=function(a,b,c){return!(a&&b)||c}; e.onMoreClick=function(){this.collapsed=!1}; h.Object.defineProperties(IV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===l8a){var a=document.createElement("template");a.innerHTML="
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k8a){var d=document.createElement("template");d.innerHTML=""; k8a=d}d=k8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);l8a=a}a=l8a;return a}}}); var JV=IV;w([P(W.YtRendererBehavior),x("design:type",Object)],JV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],JV.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],JV.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],JV.prototype,"isSearch",void 0);w([R({computed:"computeVisibleItems(data,collapsed)"}),x("design:type",Array)],JV.prototype,"visibleItems",void 0); w([R({value:!0}),x("design:type",Boolean)],JV.prototype,"collapsed",void 0);w([R({computed:"computeHideShowMore(data.collapsedItemCount,data.items.length,collapsed)"}),x("design:type",Boolean)],JV.prototype,"hideShowMore",void 0);w([R({computed:"computeHideShowAll(data.expandedStateButtonEndpoint,\n data.expandedStateButtonText,collapsed)",value:!0}),x("design:type",Boolean)],JV.prototype,"hideShowAll",void 0);JV=w([U({is:"ytd-vertical-list-renderer"})],JV);var m8a;var n8a;var KV=function(){return O.apply(this,arguments)||this}; p(KV,O);KV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more_vert"}}}},"data.exploreButton":{id:"explore-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0},noInjection:!0}}}}}; KV.prototype.onTextWrapperTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!RR(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})}; KV.prototype.dataChanged=function(){var a=this.get("data.offerButton.buttonRenderer.serviceEndpoint");a&&a.commandMetadata&&a.commandMetadata.webHandleServiceEndpointExtension&&a.commandMetadata.webHandleServiceEndpointExtension.fireAutomatically&&this.ytRendererBehavior.sendServiceRequestAction([a])}; h.Object.defineProperties(KV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===n8a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n \n
\n \n
\n
\n
\n\n \n\n \n \n\n \n\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===m8a){var d=document.createElement("template");d.innerHTML=""; m8a=d}d=m8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);n8a=a}a=n8a;return a}}}); var LV=KV;w([P(W.YtRendererBehavior),x("design:type",Object)],LV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],LV.prototype,"ytRendererstamperBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],LV.prototype,"ytdLockupBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],LV.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],LV.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return fk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],LV.prototype,"prominentThumbStyle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],LV.prototype,"leftAligned",void 0);LV=w([U({is:"ytd-movie-renderer"})],LV);var o8a;var p8a;var q8a=[AO.YtComponentBehavior,{_noAccessors:!0,created:function(){this.loadPlayerCssPromise_=this.loadPlayerJsPromise_=null;this.playerCssTagId_="player-css"}, loadPlayerJs_:function(){Ja("yt.player.Application")?this.loadPlayerJsPromise_=Mi():this.loadPlayerJsPromise_||(this.loadPlayerJsPromise_=new Ki(function(a){var b=og("SCRIPT");b.addEventListener("load",a);a=mh(A("PLAYER_JS_URL"));xc(b,a);document.querySelector("head").appendChild(b)})); return this.loadPlayerJsPromise_}, loadPlayerCss_:function(){var a=this;if(this.loadPlayerCssPromise_)return this.loadPlayerCssPromise_;document.querySelector("link#"+this.playerCssTagId_)?this.loadPlayerCssPromise_=Mi():this.loadPlayerCssPromise_=new Ki(function(b){var c=A("PLAYER_CSS_URL"),d=document.createElement("link");d.id=a.playerCssTagId_;d.rel="stylesheet";d.addEventListener("load",b);d.href=c;document.querySelector("head").appendChild(d)}); return this.loadPlayerCssPromise_}, loadPlayer:function(){return Pi([this.loadPlayerJs_(),this.loadPlayerCss_()])}, preparePlayer:function(){return this.loadPlayer()}}];var r8a={},MV=(r8a[0]=[],r8a[1]=[],r8a);function s8a(){for(var a=0;a=a.getScrollTop()?Polymer.Gestures.setTouchAction(this,"pan-down"):Polymer.Gestures.setTouchAction(this,"manipulation")}}, onPinchOut_:function(){this.getPlayerPromise().then(function(a){a.isFullscreen()||a.toggleFullscreen()})}, onPinchIn_:function(){this.getPlayerPromise().then(function(a){a.isFullscreen()&&a.toggleFullscreen()})}, getInternalContainer:function(){return this.$.container}, release_:function(){this.player_&&(this.player_.removeEventListener("onReady",this.onPlayerReadyEvent_),this.player_.stopVideo&&this.player_.stopVideo(),this.loadedVideo_=this.playerContainer_=this.player_=null,this.playerResolver_.promise.then(function(b){b.destroy()})); var a=this.playerResolver_;this.playerResolver_=Qi();this.playerResolver_.promise.then(a.resolve);this.fire("yt-player-released")}, shouldSuppressAbandonmentPing_:function(a){var b=this.getInterface(XM);return b.isOnWatch()&&b.getCurrentPage().playlistData&&!a.watchEndpoint?!0:!1}, updatePlayerRelated_:function(a,b){var c=this,d,f,g,l,m,n,r,u,z,C,J,E,T;return za(function(la){if(1==la.nextAddress){if(!a.results||!a.results.length)return la.return();if(b)for(f=0,g=b.sets.length;f
\n \n
\n";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content, c=b.insertBefore;if(void 0===o8a){var d=document.createElement("template");d.innerHTML="";o8a=d}d=o8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);p8a=a}a=p8a;return a}}}); var w8a=NV;w([P(v8a),x("design:type",Object)],w8a.prototype,"ytPlayerBehavior",void 0);w8a=w([U({is:"ytd-player"})],w8a);var x8a;var y8a;var z8a=function(){return O.apply(this,arguments)||this}; p(z8a,O); h.Object.defineProperties(z8a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===y8a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n \n \n \n
\n \n \n \n \n \n \n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x8a){var d=document.createElement("template");d.innerHTML=""; x8a=d}d=x8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);y8a=a}a=y8a;return a}}}); var OV=z8a;w([R(),x("design:type",Object)],OV.prototype,"data",void 0);w([P(V1a.YtVideoPlayerRendererBehavior),x("design:type",Object)],OV.prototype,"ytVideoPlayerRendererBehavior",void 0);OV=w([U({is:"ytd-channel-video-player-renderer"})],OV);var A8a;var B8a,PV=function(){if(void 0!==B8a)return B8a;var a=document.createElement("template");a.innerHTML=""; return B8a=a};var C8a;iP("itemSectionRenderer","carouselItemRenderer","ytd-carousel-item-renderer");var QV=function(){var a=O.apply(this,arguments)||this;a.dotMenuVisible_=!1;a.active=!0;return a}; p(QV,O);e=QV.prototype;e.configureRendererStamper=function(){return{currentItem_:{id:"carousel-item",mapping:{defaultPromoPanelRenderer:{component:"ytd-default-promo-panel-renderer",attributes:{autoplay:!0},properties:{disableGridStateAware:"[[disableGridStateAware]]",useBrowseWidth:"[[data.paginationThumbnails]]",layoutStyle:"[[data.layoutStyle]]"}}}}}}; e.created=function(){this.ytdGridStateAwareBehavior.gridStateAwareSizingElementSelector="#pagination-thumbnails"}; e.detached=function(){this.jobId_&&Bk.cancelJob(this.jobId_)}; e.setNextCarouselItem=function(){this.shouldRotate_()&&this.setCarouselItem(this.currentItemIndex_+1)}; e.setCarouselItem=function(a){a>=this.data.carouselItems.length&&this.loopCount_++;this.jobId_&&Bk.cancelJob(this.jobId_);var b=this.getCurrentPanelElement_();b&&b.stopVideo();this.currentItemIndex_=a%this.data.carouselItems.length;this.currentItem_=this.data.carouselItems[this.currentItemIndex_];this.currentItemHasVideo()?(b||(b=this.getCurrentPanelElement_()),b.playVideo()):this.startRotationJob_()}; e.onDataChanged_=function(){this.data&&(this.loopCount_=0,void 0!==this.data.autoRotateDurationMs&&(this.rotationTimeout=this.data.autoRotateDurationMs),this.setCarouselItem(0))}; e.getCurrentPanelElement_=function(){return Polymer.dom(this.$["carousel-item"]).querySelector("ytd-default-promo-panel-renderer")}; e.getCurrentPaginationElement_=function(){return Polymer.dom(this.$["pagination-thumbnails"]).querySelector(".ytd-carousel-item-renderer.selected")}; e.getNavigationClass_=function(a,b){return a===b?"selected":""}; e.getNavigationDurationStyle_=function(a){a=this.get("data.carouselItems."+a+".defaultPromoPanelRenderer.minPanelDisplayDurationMs")||0;return dc({"animation-duration":a+"ms"})}; e.onNavigationTap_=function(a){var b=this,c=a.model.index;c!==this.currentItemIndex_&&(this.getCurrentPanelElement_().transitionOut().then(function(){b.setCarouselItem(c)}),this.loopCount_=3)}; e.onVideoThumbnailEnded_=function(){var a=this;if(this.shouldRotate_()){var b=this.getCurrentPaginationElement_();b&&(b.classList.add("finished"),this.getCurrentPanelElement_().transitionOut().then(function(){b.classList.remove("finished");a.setNextCarouselItem()}))}}; e.onVideoThumbnailError_=function(){this.startRotationJob_()}; e.onVideoNotPlaying_=function(){this.startRotationJob_()}; e.currentItemHasVideo=function(){return!!this.get("defaultPromoPanelRenderer.videoThumbnail",this.currentItem_)||!!this.get("defaultPromoPanelRenderer.inlinePlaybackRenderer",this.currentItem_)}; e.startRotationJob_=function(){var a=this;Bk.cancelJob(this.jobId_);this.shouldRotate_()&&this.rotationTimeout&&(this.jobId_=yk(Bk,function(){a.getCurrentPanelElement_().transitionOut().then(function(){a.setNextCarouselItem()})},this.rotationTimeout))}; e.computeDotMenuVisible_=function(a){return!!a.carouselItems&&1this.loopCount_}; e.activeChanged_=function(a){this.data&&(a?this.setCarouselItem(this.currentItemIndex_):this.currentItem_=void 0)}; h.Object.defineProperties(QV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===C8a){var a=document.createElement("template");a.innerHTML="
\n\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(PV().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A8a){var d=document.createElement("template");d.innerHTML=""; A8a=d}d=A8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);C8a=a}a=C8a;return a}}}); var RV=QV;RV.prototype.onVideoNotPlaying_=RV.prototype.onVideoNotPlaying_;RV.prototype.onVideoThumbnailError_=RV.prototype.onVideoThumbnailError_;RV.prototype.onVideoThumbnailEnded_=RV.prototype.onVideoThumbnailEnded_;w([P(BQ),x("design:type",Object)],RV.prototype,"ytdGridStateAwareBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],RV.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(Y),x("design:type",Object)],RV.prototype,"ytRendererstamperBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],RV.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged_"}),x("design:type",Object)],RV.prototype,"data",void 0);w([R(),x("design:type",Object)],RV.prototype,"currentItem_",void 0);w([R(),x("design:type",Number)],RV.prototype,"currentItemIndex_",void 0);w([R(),x("design:type",Number)],RV.prototype,"rotationTimeout",void 0);w([R(),x("design:type",Number)],RV.prototype,"loopCount_",void 0); w([R({computed:"computePaginatorAlignment_(data)",reflectToAttribute:!0}),x("design:type",String)],RV.prototype,"paginatorAlignment",void 0);w([R(),x("design:type",Number)],RV.prototype,"jobId_",void 0);w([R({computed:"computeDotMenuVisible_(data)"}),x("design:type",Object)],RV.prototype,"dotMenuVisible_",void 0);w([R({observer:"activeChanged_"}),x("design:type",Object)],RV.prototype,"active",void 0); w([S("yt-video-thumbnail-ended"),S("yt-default-promo-panel-renderer-rotate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RV.prototype,"onVideoThumbnailEnded_",null);w([S("yt-video-thumbnail-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RV.prototype,"onVideoThumbnailError_",null); w([S("yt-video-thumbnail-not-playing"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RV.prototype,"onVideoNotPlaying_",null);RV=w([U({is:"ytd-carousel-item-renderer"})],RV);var D8a;var E8a;var SV=function(){var a=O.apply(this,arguments)||this;a.animationEnabled=N("enable_web_ketchup_hero_animation");a.transitioningOut=!1;a.useBrowseWidth=!1;a.narrow_=!1;a.videoTimeout_=0;a.panelTimeout_=0;a.actionMap={"yt-window-resized":"onWindowResized_"};return a}; p(SV,O);e=SV.prototype;e.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.ready=function(){document.fonts&&document.fonts.load&&this.forceLoadFontForTitle_()}; e.created=function(){this.ytdGuideStateAwareBehavior.gridStateAwareSizingElementSelector="#content"}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.onWindowResized_();xk(Bk,this.autoplayVideo_.bind(this),1500)}; e.detached=function(){this.clearTimeouts_()}; e.onWindowResized_=function(){var a;this.narrow_=16*this.clientHeight/9>this.clientWidth;this.$.player&&(null===(a=this.data)||void 0===a?0:a.inlinePlaybackRenderer)&&this.$.player.resize()}; e.computePanelLayout_=function(a){return a&&a.panelLayout||"DEFAULT_PROMO_PANEL_RENDERER_LAYOUT_A"}; e.forceLoadFontForTitle_=function(){var a=this;document.fonts.load(N(" kevlar_update_youtube_sans")?"58px YouTube Sans":"58px YT Sans").then(function(b){1<=b.length?a.$["hero-title"].classList.add("visible"):sk(a.forceLoadFontForTitle_.bind(a),50)})}; e.playVideo=function(){var a,b;this.$.video&&(null===(a=this.data)||void 0===a?0:a.videoThumbnail)&&this.$.video.play();this.$.player&&(null===(b=this.data)||void 0===b?0:b.inlinePlaybackRenderer)&&this.$.player.play()}; e.stopVideo=function(){var a,b;this.$.video&&(null===(a=this.data)||void 0===a?0:a.videoThumbnail)&&this.$.video.stop();this.$.player&&(null===(b=this.data)||void 0===b?0:b.inlinePlaybackRenderer)&&this.$.player.stop()}; e.transitionOut=function(){var a=this;this.transitioningOut=!0;return new Promise(function(b){var c=function(){a.$["action-button"].removeEventListener("animationend",c);Bk.cancelJob(d);b();a.transitioningOut=!1}; var d=xk(Bk,c,1E3);a.$["action-button"].addEventListener("animationend",c);a.$.player&&(a.$.player.playing=!1)})}; e.computeMetadataOrder_=function(a){return a&&a.metadataOrder&&"DEFAULT_PROMO_PANEL_RENDERER_METADATA_ORDER_UNSPECIFIED"!==a.metadataOrder?a.metadataOrder:"DEFAULT_PROMO_PANEL_RENDERER_METADATA_ORDER_TITLE_DESCRIPTION"}; e.dataChanged_=function(a){this.clearTimeouts_();this.setBackgroundImage_(a);this.setScrimLayer_(a);this.startPanelTimeout_()}; e.autoplayVideo_=function(){this.autoplay&&this.playVideo()}; e.setBackgroundImage_=function(a){(a=this.getBackgroundImageUrl_(a))&&(this.$.hero.style["background-image"]="url("+a+")")}; e.setScrimLayer_=function(a){var b=this.getScrimLayerColorStops_(a);a=((null===a||void 0===a?void 0:a.scrimRotation)||0)+180;"rtl"==A("HTML_DIR",void 0)&&(a=-a);b&&(this.$.scrim.style["background-image"]="linear-gradient("+a+"deg, "+b+")")}; e.getScrimLayerColorStops_=function(){var a,b=null===(a=this.data)||void 0===a?void 0:a.scrimColorValues;if(!b)return null;if(1==b.length)return b=eO(b[0]),b+" 0%, "+b+" 100%";if(3==b.length){var c=[0,72,98];return b.map(function(d,f){return eO(d)+" "+c[f]+"%"}).join(",")}return null}; e.getBackgroundImageUrl_=function(a){return a&&a.largeFormFactorBackgroundThumbnail?MO((a.largeFormFactorBackgroundThumbnail.thumbnailLandscapePortraitRenderer.landscape||a.largeFormFactorBackgroundThumbnail.thumbnailLandscapePortraitRenderer.portrait).thumbnails,screen.width):null}; e.onPlaying_=function(){this.startVideoTimeout_()}; e.onEnded_=function(){this.rotate_()}; e.startPanelTimeout_=function(){var a=this;if(!this.panelTimeout_){var b=this.get("data.minPanelDisplayDurationMs");b&&(this.panelTimeout_=xk(Bk,function(){return a.rotate_()},b))}}; e.startVideoTimeout_=function(){var a=this;if(!this.videoTimeout_){var b=this.get("data.minVideoPlayDurationMs");b&&(this.videoTimeout_=xk(Bk,function(){return a.rotate_()},b))}}; e.clearTimeouts_=function(){Bk.cancelJob(this.panelTimeout_);this.panelTimeout_=0;Bk.cancelJob(this.videoTimeout_);this.videoTimeout_=0}; e.rotate_=function(){this.clearTimeouts_();this.fire("yt-default-promo-panel-renderer-rotate")}; h.Object.defineProperties(SV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===E8a){var a=document.createElement("template");a.innerHTML="
\n\n\n\n\n
\n\n
\n \n \n \n

[[getSimpleString(data.title)]]

\n \n
\n
\n
\n"; a.content.insertBefore(PV().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D8a){var d=document.createElement("template");d.innerHTML=""; D8a=d}d=D8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);E8a=a}a=E8a;return a}}}); var TV=SV;TV.prototype.onEnded_=TV.prototype.onEnded_;TV.prototype.onPlaying_=TV.prototype.onPlaying_;w([P(BQ),x("design:type",Object)],TV.prototype,"ytdGridStateAwareBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],TV.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(w0a.YtBooleanLogicBehavior),x("design:type",Object)],TV.prototype,"ytBooleanLogicBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],TV.prototype,"ytActionHandlerBehavior",void 0); w([P(Y),x("design:type",Object)],TV.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],TV.prototype,"ytRendererBehavior",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],TV.prototype,"autoplay",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],TV.prototype,"data",void 0);w([R({computed:"computePanelLayout_(data)",reflectToAttribute:!0}),x("design:type",String)],TV.prototype,"panelLayout",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],TV.prototype,"animationEnabled",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],TV.prototype,"transitioningOut",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],TV.prototype,"useBrowseWidth",void 0);w([R({computed:"computeMetadataOrder_(data)"}),x("design:type",Boolean)],TV.prototype,"metadataOrder",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],TV.prototype,"narrow_",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],TV.prototype,"layoutStyle",void 0);w([S("yt-default-promo-panel-renderer-playing"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],TV.prototype,"onPlaying_",null);w([S("yt-default-promo-panel-renderer-ended"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],TV.prototype,"onEnded_",null);TV=w([U({is:"ytd-default-promo-panel-renderer"})],TV);var F8a;var G8a;var UV=function(){var a=O.apply(this,arguments)||this;a.playing=!1;a.playerId_="ytd-default-promo-panel-renderer-inline-playback-renderer-"+Ra(a);a.active_=!1;return a}; p(UV,O);e=UV.prototype;e.detached=function(){this.stop()}; e.play=function(){return Ya(this,function b(){var c=this,d,f,g,l,m,n,r,u,z,C,J,E;return ya(b,function(T){if(1==T.nextAddress){d=c;f=A("FILLER_DATA",{});g=!!f.player;l=A("WEB_PLAYER_CONTEXT_CONFIGS",{});m=!!l.WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO;if(!g&&!m)return T.return();c.active_=!0;n=c.get("data.inlinePlaybackEndpoint.watchEndpoint");r=n.videoId||c.data.videoId;u=n.startTimeSeconds||0;z=n.playerParams||null;m?C={args:{video_id:r,startSeconds:u,player_params:z}}:(C=Object.assign({}, f.player),C.args=Object.assign({},C.args||{},{autoplay:!0,video_id:r,mute:1,mutedautoplay:1,startSeconds:u,controls:0,showinfo:0,iv_load_policy:3,rel:0,el:"profilepage",player_params:z,player_response:void 0}),C.attrs=Object.assign({},C.attrs||{},{id:c.playerId_}));J=c.$.player;J.update(C);return q(T,J.getPlayerPromise(),2)}E=T.yieldResult;E.addEventListener("onStateChange",function(la){return d.onPlayerStateChange_(la)}); oa(T)})})}; e.onPlayerStateChange_=function(a){if(this.active_)switch(this.playing=1===a,a){case 1:this.fire("yt-default-promo-panel-renderer-playing");break;case 0:this.fire("yt-default-promo-panel-renderer-ended");}}; e.stop=function(){this.$.player.stop();this.playing=this.active_=!1}; e.resize=function(){return Ya(this,function b(){var c=this,d;return ya(b,function(f){if(1==f.nextAddress)return q(f,c.$.player.getPlayerPromise(),2);d=f.yieldResult;d.setSize(NaN,NaN);oa(f)})})}; h.Object.defineProperties(UV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===G8a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F8a){var d=document.createElement("template");d.innerHTML=""; F8a=d}d=F8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);G8a=a}a=G8a;return a}}}); var VV=UV;w([R(),x("design:type",Object)],VV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],VV.prototype,"playing",void 0);w([R(),x("design:type",Object)],VV.prototype,"playerId_",void 0);VV=w([U({is:"ytd-default-promo-panel-renderer-inline-playback-renderer"})],VV);var H8a;var I8a;var J8a;var K8a;Polymer({is:"yt-search-query-correction",_template:function(){if(void 0!==K8a)return K8a;var a=document.createElement("template");a.innerHTML="\n\n \n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J8a){var d=document.createElement("template");d.innerHTML=""; J8a=d}d=J8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return K8a=a}, behaviors:[AO.YtComponentBehavior],properties:{correctedText:Object,correctedQuery:Object,correctedEndpoint:Object,originalText:Object,originalQuery:{type:Object,value:null},originalEndpoint:{type:Object,value:null},showOriginalQueryWithoutEndpoint:{type:Boolean,value:!1,computed:"computeShowOriginalQueryWithoutEndpoint_(originalQuery, originalEndpoint)"}},computeShowOriginalQueryWithoutEndpoint_:function(a,b){return!(!a||b)}});iP("itemSectionRenderer","didYouMeanRenderer","yt-did-you-mean-renderer"); Polymer({is:"yt-did-you-mean-renderer",_template:function(){if(void 0!==I8a)return I8a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H8a){var d=document.createElement("template");d.innerHTML="";H8a=d}d=H8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return I8a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object}});var L8a;var M8a;iP("itemSectionRenderer","includingResultsForRenderer","yt-including-results-for-renderer"); Polymer({is:"yt-including-results-for-renderer",_template:function(){if(void 0!==M8a)return M8a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L8a){var d=document.createElement("template");d.innerHTML="";L8a=d}d=L8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return M8a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object}});var N8a;var O8a;iP("itemSectionRenderer","musicPassFeatureInfoRenderer","yt-music-pass-feature-info-renderer"); Polymer({is:"yt-music-pass-feature-info-renderer",_template:function(){if(void 0!==O8a)return O8a;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N8a){var d=document.createElement("template");d.innerHTML=""; N8a=d}d=N8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return O8a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object},observers:["computeUrlImg_(data)"],computeExtraClasses_:function(a,b){var c="";a&&(c+=" "+a.toLowerCase().replace(/_/g,"-"));b&&(c+=" "+b.toLowerCase().replace(/_/g,"-"));return c}, computeUrlImg_:function(a){a.image&&(this.$.container.style.backgroundImage="url("+MO(a.image.thumbnails,Number.MAX_VALUE)+")")}});var P8a;var Q8a;iP("itemSectionRenderer","noResultsFoundShowingResultsForRenderer","yt-no-results-found-showing-results-for-renderer"); Polymer({is:"yt-no-results-found-showing-results-for-renderer",_template:function(){if(void 0!==Q8a)return Q8a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P8a){var d=document.createElement("template");d.innerHTML="";P8a=d}d=P8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Q8a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object}});var R8a;var S8a;iP("itemSectionRenderer","resultsWithoutQuotesRenderer","yt-results-without-quotes-renderer"); Polymer({is:"yt-results-without-quotes-renderer",_template:function(){if(void 0!==S8a)return S8a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R8a){var d=document.createElement("template");d.innerHTML="";R8a=d}d=R8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return S8a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object}});var T8a;var U8a;iP("itemSectionRenderer","searchNoResultsRenderer","yt-search-no-results-renderer"); Polymer({is:"yt-search-no-results-renderer",_template:function(){if(void 0!==U8a)return U8a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===T8a){var d=document.createElement("template");d.innerHTML=""; T8a=d}d=T8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return U8a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object}});var V8a;var W8a;iP("itemSectionRenderer","showingResultsForRenderer","yt-showing-results-for-renderer"); Polymer({is:"yt-showing-results-for-renderer",_template:function(){if(void 0!==W8a)return W8a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V8a){var d=document.createElement("template");d.innerHTML="";V8a=d}d=V8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return W8a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object}});var WV={}; WV.YtTappableItemBehavior=[V.YtActionSenderBehavior,{properties:{tappableItemBehaviorTapEnabled:{type:Boolean,value:!1,observer:"tappableItemBehaviorOnTapEnabledChanged_"}},observers:["tappableItemBehaviorOnTapChanged_(data.onTap)"],listeners:{"yt-commerce-action-init-done":"tappableItemBehaviorOnServiceRequestFinished_","yt-service-request-error":"tappableItemBehaviorOnServiceRequestFinished_","yt-commerce-action-done":"tappableItemBehaviorOnServiceRequestFinished_"},created:function(){this.tappableItemBehaviorTargetId=""; this.tappableItemBehaviorBoundOnTappableItemKeyDown_=this.tappableItemBehaviorOnTappableItemKeyDown_.bind(this);this.tappableItemBehaviorBoundOnTappableItemTap_=this.tappableItemBehaviorOnTappableItemTap_.bind(this)}, attached:function(){this.tappableItemBehaviorGetTappableTarget_().addEventListener("keydown",this.tappableItemBehaviorBoundOnTappableItemKeyDown_,!0);this.listen(this.tappableItemBehaviorGetTappableTarget_(),"click","tappableItemBehaviorBoundOnTappableItemTap_")}, detached:function(){this.tappableItemBehaviorGetTappableTarget_().removeEventListener("keydown",this.tappableItemBehaviorBoundOnTappableItemKeyDown_,!0);this.unlisten(this.tappableItemBehaviorGetTappableTarget_(),"click","tappableItemBehaviorBoundOnTappableItemTap_")}, tappableItemBehaviorOnTappableItemKeyDown_:function(a){!this.tappableItemBehaviorTapEnabled||13!==a.keyCode&&32!==a.keyCode||a.target!=this.tappableItemBehaviorGetTappableTarget_()||this.tappableItemBehaviorHandleTappableItemTap_()}, tappableItemBehaviorOnTappableItemTap_:function(){this.tappableItemBehaviorTapEnabled&&this.tappableItemBehaviorHandleTappableItemTap_()}, tappableItemBehaviorHandleTappableItemTap_:function(){var a=this.data.onTap;a.ypcGetCartEndpoint?(this.sendServiceRequestAction([a]),this.tappableItemBehaviorTapEnabled=!1):a.ypcOffersEndpoint?this.sendServiceRequestAction([a]):this.sendInnerTubeActions([a],this)}, tappableItemBehaviorOnTapChanged_:function(a){this.tappableItemBehaviorTapEnabled=!!a}, tappableItemBehaviorOnTapEnabledChanged_:function(){var a=this.tappableItemBehaviorGetTappableTarget_();this.tappableItemBehaviorTapEnabled?(a.setAttribute("tabIndex",0),a.setAttribute("role","button")):(a.removeAttribute("tabIndex"),a.removeAttribute("role"))}, tappableItemBehaviorOnServiceRequestFinished_:function(a){a.target==this&&(this.tappableItemBehaviorTapEnabled=!!this.data.onTap)}, tappableItemBehaviorGetTappableTarget_:function(){return this.tappableItemBehaviorTargetId?this.$[this.tappableItemBehaviorTargetId]:this}}];var X8a;var Y8a;var XV=function(){return O.apply(this,arguments)||this}; p(XV,O); XV.prototype.configureRendererStamper=function(){return{"data.sectionHeading":{id:"section-heading",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.image":{id:"image",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.title":{id:"title",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.subtitle":{id:"subtitle",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.additionalMetadata":{id:"additional-metadata",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}, "data.activityMetadata":{id:"activity-metadata",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.menu":{id:"menu",mapping:jP("menuRenderer")}}}; XV.prototype.onMenuTap=function(a){a.stopPropagation()}; h.Object.defineProperties(XV.prototype,{ariaLabel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.accessibilityData&&this.data.accessibilityData.label?this.data.accessibilityData.label:""}}, sectionHeadingVisible:{configurable:!0,enumerable:!0,get:function(){var a,b;return!((null===(a=this.data)||void 0===a||!a.sectionHeading)&&"ACTIVITY_ITEM_LAYOUT_STRETCH"===(null===(b=this.data)||void 0===b?void 0:b.layout))}}, imageVisible:{configurable:!0,enumerable:!0,get:function(){var a,b;return!((null===(a=this.data)||void 0===a||!a.image)&&"ACTIVITY_ITEM_LAYOUT_STRETCH"===(null===(b=this.data)||void 0===b?void 0:b.layout))}}, menuVisible:{configurable:!0,enumerable:!0,get:function(){var a,b;return!((null===(a=this.data)||void 0===a||!a.menu)&&"ACTIVITY_ITEM_LAYOUT_STRETCH"===(null===(b=this.data)||void 0===b?void 0:b.layout))}}}); h.Object.defineProperties(XV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Y8a){var a=document.createElement("template");a.innerHTML="
\n \n
\n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X8a){var d=document.createElement("template");d.innerHTML=""; X8a=d}d=X8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Y8a=a}a=Y8a;return a}}}); var YV=XV;w([P(W.YtRendererBehavior),x("design:type",Object)],YV.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],YV.prototype,"ytRendererstamperBehavior",void 0);w([P(WV.YtTappableItemBehavior),x("design:type",Object)],YV.prototype,"ytTappableItemBehavior",void 0);w([R(),x("design:type",Object)],YV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),zE("data.accessibilityData"),x("design:type",String),x("design:paramtypes",[])],YV.prototype,"ariaLabel",null); w([zE("data.sectionHeading","data.layout"),x("design:type",Boolean),x("design:paramtypes",[])],YV.prototype,"sectionHeadingVisible",null);w([zE("data.image","data.layout"),x("design:type",Boolean),x("design:paramtypes",[])],YV.prototype,"imageVisible",null);w([zE("data.menu","data.layout"),x("design:type",Boolean),x("design:paramtypes",[])],YV.prototype,"menuVisible",null);YV=w([U({is:"yt-activity-item-renderer"})],YV);var Z8a;var $8a;var ZV={},a9a=function(a,b,c){a.removeAttribute("top-"+c);a.removeAttribute("bottom-"+c);a.removeAttribute("left-"+c);a.removeAttribute("right-"+c);b&&(b.top&&a.setAttribute("top-"+c,b.top),b.bottom&&a.setAttribute("bottom-"+c,b.bottom),b.left&&a.setAttribute("left-"+c,b.left),b.right&&a.setAttribute("right-"+c,b.right))}; ZV.YtCardItemBoxBehavior=[{observers:["cardItemContainerMarginChanged_(data.containerMargin)","cardItemContainerPaddingChanged_(data.containerPadding)"],created:function(){this.cardItemBoxBehaviorPaddingTargetId=this.cardItemBoxBehaviorPaddingMarginId=""}, cardItemContainerMarginChanged_:function(a){a9a(this.cardItemBoxBehaviorMarginTargetId&&this.$?this.$[this.cardItemBoxBehaviorMarginTargetId]:this,a,"margin")}, cardItemContainerPaddingChanged_:function(a){a9a(this.cardItemBoxBehaviorPaddingTargetId&&this.$?this.$[this.cardItemBoxBehaviorPaddingTargetId]:this,a,"padding")}}];var $V={CARD_ITEM_COLOR_GENERAL_BACKGROUND_A:"var(--yt-spec-general-background-a)",CARD_ITEM_COLOR_GENERAL_BACKGROUND_B:"var(--yt-spec-general-background-b)",CARD_ITEM_COLOR_ERROR_BACKGROUND:"var(--yt-spec-error-background)",CARD_ITEM_COLOR_TEXT_PRIMARY:"var(--yt-spec-text-primary)",CARD_ITEM_COLOR_TEXT_SECONDARY:"var(--yt-spec-text-secondary)",CARD_ITEM_COLOR_CALL_TO_ACTION:"var(--yt-spec-call-to-action)",CARD_ITEM_COLOR_ICON_INACTIVE:"var(--yt-spec-icon-inactive)",CARD_ITEM_COLOR_ICON_DISABLED:"var(--yt-spec-icon-disabled)", CARD_ITEM_COLOR_BRAND_ICON_ACTIVE:"var(--yt-spec-brand-icon-active)",CARD_ITEM_COLOR_BRAND_ICON_INACTIVE:"var(--yt-spec-brand-icon-inactive)",CARD_ITEM_COLOR_10_PERCENT_LAYER:"var(--yt-spec-10-percent-layer)",CARD_ITEM_COLOR_TEXT_PRIMARY_INVERSE:"var(--yt-spec-text-primary-inverse)",CARD_ITEM_COLOR_ICON_ACTIVE_OTHER:"var(--yt-spec-icon-active-other)",CARD_ITEM_COLOR_THEMED_GREEN:"var(--yt-spec-themed-green)"};var b9a;var c9a,d9a=function(){if(void 0!==c9a)return c9a;var a=document.createElement("template");a.innerHTML=""; return c9a=a};var e9a;Polymer({is:"yt-card-item-text-renderer",_template:function(){if(void 0!==e9a)return e9a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(d9a().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===b9a){var d=document.createElement("template");d.innerHTML=""; b9a=d}d=b9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return e9a=a}, behaviors:[W.YtRendererBehavior,ZV.YtCardItemBoxBehavior],observers:["textColorChanged_(data.textColor)"],properties:{data:Object},textColorChanged_:function(a){this.style.color=$V[a||"CARD_ITEM_COLOR_TEXT_PRIMARY"]}});Polymer({is:"yt-card-item-text-collection-renderer",_template:function(){if(void 0!==$8a)return $8a;var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z8a){var d=document.createElement("template");d.innerHTML=""; Z8a=d}d=Z8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return $8a=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},stampDom:{"data.textRenderers":{id:"text-renderers",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}}}});var f9a;var g9a;Polymer({is:"yt-themed-image-renderer",_template:function(){if(void 0!==g9a)return g9a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(d9a().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===f9a){var d=document.createElement("template");d.innerHTML=""; f9a=d}d=f9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return g9a=a}, behaviors:[W.YtRendererBehavior,Y,ZV.YtCardItemBoxBehavior,NO.YtActionHandlerBehavior],properties:{data:Object,fit:{type:Boolean,value:!1},isDarkTheme_:Boolean,themeImage_:{type:Object,computed:"computeThemeImage_(data, isDarkTheme_)"},themeIcon_:{type:Object,computed:"computeThemeIcon_(data)"},isCircular_:{type:Boolean,reflectToAttribute:!0,value:!1}},actionMap:{"yt-dark-mode-toggled-action":"handleDarkModeToggledAction_"},attached:function(){this.isDarkTheme_=document.documentElement.hasAttribute("dark")}, handleDarkModeToggledAction_:function(a){this.isDarkTheme_=a}, computeThemeImage_:function(a,b){if(!a||!a.imageLight)return!1;this.isCircular_=a.isCircular;a.imageWidth&&(this.style.width=a.imageWidth+"px");a.imageHeight&&(this.style.height=a.imageHeight+"px");return b&&a.imageDark?a.imageDark:a.imageLight}, computeThemeIcon_:function(a){if(!a||!a.themedIcon)return!1;var b=a.themedIcon;this.$.icon.style.color=$V[b.iconColor||"CARD_ITEM_COLOR_GENERAL_BACKGROUND_A"];this.$.icon.style.width=(a.imageWidth||18)+"px";this.$.icon.style.height=(a.imageHeight||18)+"px";return"yt-icons:"+b.icon.iconType}});var h9a;var i9a;yO.YtRendererStamperBehavior=Y;var j9a;var k9a;Polymer({is:"yt-card-item-actions-renderer",_template:function(){if(void 0!==k9a)return k9a;var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===j9a){var d=document.createElement("template");d.innerHTML=""; j9a=d}d=j9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return k9a=a}, behaviors:[yO.YtRendererStamperBehavior,W.YtRendererBehavior],properties:{data:Object},stampDom:{"data.primaryButtonRenderer":{id:"primary-button-renderer",mapping:jP("sharingToggleButtonAndDefaultButton")},"data.secondaryButtonRenderer":{id:"secondary-button-renderer",mapping:jP("sharingToggleButtonAndDefaultButton")}}});var l9a;var m9a;var n9a;var o9a;Polymer({is:"yt-card-item-text-with-image-renderer",_template:function(){if(void 0!==o9a)return o9a;var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n9a){var d=document.createElement("template");d.innerHTML=""; n9a=d}d=n9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return o9a=a}, behaviors:[yO.YtRendererStamperBehavior,W.YtRendererBehavior],properties:{data:Object,imagePlacement:{type:String,value:"CARD_ITEM_IMAGE_PLACEMENT_UNKNOWN",computed:"computeImagePlacement_(data.imagePlacement)",reflectToAttribute:!0}},stampDom:{"data.imageRenderer":{id:"themed-image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.textCollectionRenderer":{id:"card-item-text-collection-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}}, computeImagePlacement_:function(a){return a||"CARD_ITEM_IMAGE_PLACEMENT_UNKNOWN"}});Polymer({is:"yt-card-item-error-renderer",_template:function(){if(void 0!==m9a)return m9a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l9a){var d=document.createElement("template");d.innerHTML=""; l9a=d}d=l9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return m9a=a}, behaviors:[yO.YtRendererStamperBehavior,W.YtRendererBehavior],properties:{data:Object},stampDom:{"data.errorTextRenderer":{id:"error-text-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"},cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"}}}}});var p9a;var q9a;var r9a;var s9a;var aW=function(){return O.apply(this,arguments)||this}; p(aW,O);aW.prototype.configureRendererStamper=function(){return{"data.textCollectionRenderer":{id:"card-item-text-collection-renderer",mapping:{cardItemTextCollectionRenderer:"yt-card-item-text-collection-renderer"}},"data.buttonRenderer":{id:"primary-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; h.Object.defineProperties(aW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===s9a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r9a){var d=document.createElement("template");d.innerHTML="";r9a=d}d=r9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);s9a=a}a= s9a;return a}}}); var bW=aW;w([P(W.YtRendererBehavior),x("design:type",Object)],bW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],bW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],bW.prototype,"data",void 0);bW=w([uO({is:"yt-card-item-text-with-button-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],bW);iP("itemSectionRenderer","CardItemRenderer","yt-card-item-renderer"); Polymer({is:"yt-card-item-renderer",_template:function(){if(void 0!==q9a)return q9a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(d9a().content.cloneNode(!0), a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p9a){var d=document.createElement("template");d.innerHTML=""; p9a=d}d=p9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return q9a=a}, behaviors:[W.YtRendererBehavior,Y,ZV.YtCardItemBoxBehavior,WV.YtTappableItemBehavior],properties:{data:Object,isExpanded_:{type:Boolean,value:!1},isErrorRendererVisible_:{type:Boolean,value:!1}},listeners:{"yt-toggle-button":"onYtToggleButton_"},observers:["backgroundColorChanged_(data.backgroundColor)","errorRendererVisibilityChanged_(data.errorRenderer, isExpanded_)"],stampDom:{"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}, cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"},cardItemTextWithButtonRenderer:{component:"yt-card-item-text-with-button-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.additionalInfoRenderer":{id:"additional-info-renderer",mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"},cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}, themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.errorRenderer":{id:"error-renderer",mapping:{cardItemErrorRenderer:{component:"yt-card-item-error-renderer"}}}},created:function(){this.tappableItemBehaviorTargetId=this.cardItemBoxBehaviorPaddingTargetId="main-content"}, backgroundColorChanged_:function(a){this.$["main-content"].style.backgroundColor=$V[a||"CARD_ITEM_COLOR_UNKNOWN"]||"transparent"}, errorRendererVisibilityChanged_:function(a,b){this.isErrorRendererVisible_=!!a&&!b}, onYtToggleButton_:function(a,b){this.isExpanded_=b.toggled}});var t9a;var u9a;Polymer({is:"yt-offer-item-upsell-renderer",_template:function(){if(void 0!==u9a)return u9a;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===t9a){var d=document.createElement("template");d.innerHTML=""; t9a=d}d=t9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return u9a=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},observers:["backgroundColorChanged_(data.backgroundColor)"],stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}, "data.priceRenderer":{id:"price-renderer",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.actionsRenderer":{id:"actions-renderer",mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}},backgroundColorChanged_:function(a){this.style.backgroundColor=$V[a||"CARD_ITEM_COLOR_UNKNOWN"]||"transparent"}});iP("itemSectionRenderer","CardItemContainerRenderer","yt-card-item-container-renderer"); Polymer({is:"yt-card-item-container-renderer",_template:function(){if(void 0!==i9a)return i9a;var a=document.createElement("template");a.innerHTML="
\n\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h9a){var d=document.createElement("template");d.innerHTML=""; h9a=d}d=h9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return i9a=a}, isInjectionRoot:!0,behaviors:[GU.YtContinuationHandlerBehavior,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,Y,SQ,W.YtRendererBehavior,Uka.InjectBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isExpanded_:{type:Boolean,reflectToAttribute:!0,value:!1},containerStyle_:{type:String,computed:"computeContainerStyle_(data.containerStyle)",reflectToAttribute:!0,value:"CARD_ITEM_CONTAINER_STYLE_DEFAULT"},continuationStatus_:{type:String,value:"not-started"},showSpinner_:{type:Boolean, reflectToAttribute:!0,computed:"computeShowSpinner_(isExpanded_, continuationStatus_)",value:!1},isOnClickCommand_:{type:Boolean,value:!1},showMoreContentsButton_:{type:Boolean,computed:"computeShowMoreContentsButton_(isExpanded_, showSpinner_, isOnClickCommand_, data.continuations, data.contents)",value:!1}},actionMap:{"yt-update-card-item-on-click-command":"updateCardOnClickCommand_"},listeners:{"yt-toggle-button":"onToggleButton_","yt-next-continuation-data-updated":"nextContinuationDataUpdated_"}, stampDom:{"data.baseRenderer":{id:"base",mapping:{cardItemRenderer:{component:"yt-card-item-renderer",noInjection:!0}}},"data.contents":{id:"contents",mapping:{cardItemRenderer:{component:"yt-card-item-renderer",noInjection:!0},offerItemUpsellRenderer:{component:"yt-offer-item-upsell-renderer",noInjection:!0},activityItemRenderer:{component:"yt-activity-item-renderer",noInjection:!0}}},"data.continuationSection":{id:"continuation-section",mapping:jP("sharingItemSection")},"data.moreContentsButtonRenderer":{id:"more-contents-button", mapping:{buttonRenderer:{component:"yt-button-renderer",noInjection:!0}}}},nextContinuation:{continuationType:"sectionListContinuation",contentsArray:"data.continuationSection"},configureContinuationPathMap:function(){return{"yt-append-continuation-items-action":"continuationSection"}}, computeContainerStyle_:function(a){return a}, computeShowSpinner_:function(a,b){return a&&"in-progress"===b}, computeShowMoreContentsButton_:function(a,b,c,d,f){return!(!(d&&d.length||f&&f.length&&c)||!a||b)}, onToggleButton_:function(a){var b=this;a.stopPropagation();(this.isExpanded_=a.detail&&a.detail.toggled)&&!this.data.continuationSection.length&&this.data.continuation&&this.data.continuation.onClickContinuationData&&"in-progress"!==this.continuationStatus_?(this.fire("yt-load-next-continuation",function(c){return b.getContinuationUrl_(b.data.continuation.onClickContinuationData,c)}),this.continuationStatus_="in-progress"):this.isExpanded_&&!this.data.continuationSection.length&&this.data.onClickCommand&& "in-progress"!==this.continuationStatus_&&(this.sendServiceRequestAction([this.data.onClickCommand]),this.continuationStatus_="in-progress")}, onShowMoreContentsButtonClicked_:function(a){var b=this;a.stopPropagation();this.data.continuations&&this.data.continuations[0].nextContinuationData?(this.fire("yt-load-next-continuation",function(c){return b.getContinuationUrl_(b.data.continuations[0].nextContinuationData,c)}),this.continuationStatus_="in-progress"):this.data.onClickCommand&&(this.sendServiceRequestAction([this.data.onClickCommand]),this.continuationStatus_="in-progress",this.data.onClickCommand=void 0,this.isOnClickCommand_=!1)}, getContinuationUrl_:function(a,b){var c=a.continuation;a=a.clickTrackingParams;var d=On();a&&d&&QJ(d,In(a));return Jd(b,{continuation:c})}, nextContinuationDataUpdated_:function(){this.continuationStatus_="complete";var a=this.querySelector("#continuation-section");a&&(a=a.querySelectorAll("ytmusic-item-section-renderer"))&&a.forEach(function(b){return b.classList.add("memberships-and-purchases")})}, dataChanged_:function(){this.isExpanded_=!!this.data.contents;this.data.continuationSection||(this.data.continuationSection=[]);this.data.onClickCommand&&(this.isOnClickCommand_=!0)}, updateCardOnClickCommand_:function(a){a=a.updateCardItemOnClickCommand;this.data&&this.data.targetId&&a&&a.targetId===this.data.targetId&&a.onClickCommand&&(this.data.onClickCommand=a.onClickCommand,this.isOnClickCommand_=!0)}});var v9a;var w9a;var x9a;var y9a;Polymer({is:"yt-generic-faq-question-renderer",_template:function(){if(void 0!==y9a)return y9a;var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.question)]]\n \n \n
\n\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x9a){var d=document.createElement("template");d.innerHTML=""; x9a=d}d=x9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return y9a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object,answerExpanded:{reflectToAttribute:!0,type:Boolean,value:!1}},listeners:{tap:"toggleAnswer_"},toggleAnswer_:function(a){var b=Polymer.dom(a).rootTarget;if(!b||!b.classList.contains("yt-simple-endpoint")&&"yt-endpoint"!=b.getAttribute("is"))a.preventDefault(),a.stopPropagation(),this.answerExpanded=!this.answerExpanded}});iP("itemSectionRenderer","faqSectionRenderer","yt-faq-section-renderer"); Polymer({is:"yt-faq-section-renderer",_template:function(){if(void 0!==w9a)return w9a;var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.header)]]\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===v9a){var d=document.createElement("template");d.innerHTML=""; v9a=d}d=v9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return w9a=a}, behaviors:[Y,W.YtRendererBehavior],properties:{data:Object},stampDom:{"data.questions":{id:"contents",mapping:{genericFaqQuestionRenderer:"yt-generic-faq-question-renderer"}}}});var z9a;var A9a;iP("itemSectionRenderer","OfferItemExpandedRenderer","yt-offer-item-expanded-renderer"); Polymer({is:"yt-offer-item-expanded-renderer",_template:function(){if(void 0!==A9a)return A9a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z9a){var d=document.createElement("template");d.innerHTML=""; z9a=d}d=z9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return A9a=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.additionalInfoRenderer":{id:"additional-info-renderer", mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}}});var B9a;var C9a;iP("itemSectionRenderer","OfferItemRenderer","yt-offer-item-renderer"); Polymer({is:"yt-offer-item-renderer",_template:function(){if(void 0!==C9a)return C9a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B9a){var d=document.createElement("template");d.innerHTML=""; B9a=d}d=B9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return C9a=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.additionalInfoRenderer":{id:"additional-info-renderer", mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}}});var D9a;var E9a;iP("itemSectionRenderer","subscriptionProductHeaderRenderer","yt-subscription-product-header-renderer"); Polymer({is:"yt-subscription-product-header-renderer",_template:function(){if(void 0!==E9a)return E9a;var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.text)]]\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D9a){var d=document.createElement("template");d.innerHTML="";D9a=d}d=D9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return E9a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object,ariaLevel:{type:String,computed:"computeAriaLevel_(data.level)",reflectToAttribute:!0},role:{type:String,value:"heading",reflectToAttribute:!0},tabindex:{type:Number,value:-1,reflectToAttribute:!0}},computeAriaLevel_:function(a){return this.getLevelID_(a)}, getLevelID_:function(a){return(a=a.match(/[0-9]+$/))&&1==a.length?a[0]:"1"}});var F9a;var G9a;iP("itemSectionRenderer","subscriptionProductRenderer","yt-subscription-product-renderer"); Polymer({is:"yt-subscription-product-renderer",_template:function(){if(void 0!==G9a)return G9a;var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n \n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F9a){var d=document.createElement("template");d.innerHTML=""; F9a=d}d=F9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return G9a=a}, behaviors:[W.YtRendererBehavior,Y],listeners:{"yt-rendererstamper-finished":"onStampFinished_"},properties:{data:Object},stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.menu":{id:"menu",mapping:jP("menuRenderer"),events:!0}},onStampFinished_:function(){this.$.menu.children[0].icon="yt-icons:more_vert"}});var H9a;var I9a;iP("itemSectionRenderer","subscriptionProductUpsellOfferRenderer","yt-subscription-product-upsell-offer-renderer"); Polymer({is:"yt-subscription-product-upsell-offer-renderer",_template:function(){if(void 0!==I9a)return I9a;var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n \n \n
\n
\n
\n
\n [[getSimpleString(data.title)]]\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H9a){var d=document.createElement("template");d.innerHTML=""; H9a=d}d=H9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return I9a=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},observers:["imageScrimColorValuesChanged_(data.imageScrimColorValues)"],stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:"yt-button-renderer"}}},imageScrimColorValuesChanged_:function(a){this.$.scrim.style.backgroundColor=a?eO(a[0]):"transparent"}});var J9a;var K9a;var L9a;var M9a;var cW=[V.YtActionSenderBehavior,{openToastWithFormattedMessage:function(a){this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:a}}}},this])}, openToast:function(a){this.openToastWithFormattedMessage(zL(a))}}];var N9a;var O9a;Polymer({is:"yt-single-ypc-offer-renderer",_template:function(){if(void 0!==O9a)return O9a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N9a){var d=document.createElement("template");d.innerHTML=""; N9a=d}d=N9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return O9a=a}, behaviors:[W.YtRendererBehavior,cW],listeners:{"yt-service-request-error":"onYtServiceRequestError_"},properties:{data:Object,collapsible:{type:Boolean,value:!1,reflectToAttribute:!0},isManageRed:{reflectToAttribute:!0,type:Boolean,value:!1}},onYtServiceRequestError_:function(a){this.openToast(a.detail.error.message)}});Polymer({is:"yt-single-ypc-offer-list-renderer",_template:function(){if(void 0!==M9a)return M9a;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L9a){var d=document.createElement("template");d.innerHTML="";L9a=d}d= L9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return M9a=a}, behaviors:[Y,W.YtRendererBehavior],properties:{data:Object,isManageRed:{type:Boolean,reflectToAttribute:!0,value:!1}},stampDom:{"data.singleYpcOfferSupportedRenderers":{id:"contents",mapping:{singleYpcOfferRenderer:{component:"yt-single-ypc-offer-renderer",properties:{isManageRed:"[[isManageRed]]"}}}}}});var P9a;var Q9a;iP("itemSectionRenderer","ypcOffersListRenderer","yt-ypc-offers-list-renderer"); Polymer({is:"yt-ypc-offers-list-renderer",_template:function(){if(void 0!==Q9a)return Q9a;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P9a){var d=document.createElement("template");d.innerHTML="";P9a=d}d=P9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Q9a=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object,isManageRed:{type:Boolean,value:!1}},stampDom:{"data.offersList":{id:"contents",mapping:{singleYpcOfferListRenderer:{component:"yt-single-ypc-offer-list-renderer",properties:{isManageRed:"[[isManageRed]]"}}}}}});iP("itemSectionRenderer","unlimitedManageSubscriptionPageRenderer","yt-unlimited-manage-subscription-page-renderer"); Polymer({is:"yt-unlimited-manage-subscription-page-renderer",_template:function(){if(void 0!==K9a)return K9a;var a=document.createElement("template");a.innerHTML="\n

[[getSimpleString(data.subscriptionTitle)]]

\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J9a){var d=document.createElement("template");d.innerHTML=""; J9a=d}d=J9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return K9a=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},stampDom:{"data.manageFixFopButton":{id:"manage-fix-fop-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.helpButton":{id:"help-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.manageFamilyButton":{id:"manage-family-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.manageSubscriptionButton":{id:"manage-subscription-button", mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.offers":{id:"offers",mapping:{ypcOffersListRenderer:{component:"yt-ypc-offers-list-renderer",params:{isManageRed:!0}}}}}});var R9a;var S9a;Polymer({is:"yt-collapsible-ypc-offer-renderer",_template:function(){if(void 0!==S9a)return S9a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R9a){var d=document.createElement("template");d.innerHTML=""; R9a=d}d=R9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return S9a=a}, behaviors:[Polymer.IronA11yKeysBehavior,Y,W.YtRendererBehavior],hostAttributes:{role:"button",tabindex:0},keyBindings:{"enter:keypress":"onKeypress_"},properties:{data:{type:Object,observer:"dataChanged_"},offersVisible_:{type:Boolean,reflectToAttribute:!0}},stampDom:{"data.singleYpcOfferListSupportedRenderers":{id:"offers",mapping:{singleYpcOfferRenderer:{component:"yt-single-ypc-offer-renderer",params:{collapsible:!0}}}}},onKeypress_:function(a){a.detail.keyboardEvent.target==this&&this.expandOffers_()}, handleHeaderTap_:function(a){a.preventDefault();a.stopPropagation();this.expandOffers_()}, expandOffers_:function(){this.offersVisible_=!0;this.setAttribute("tabindex","-1")}, dataChanged_:function(a){this.offersVisible_=!a.isCollapsed}});var T9a;var U9a;iP("itemSectionRenderer","unlimitedPageHeaderRenderer","yt-unlimited-page-header-renderer"); Polymer({is:"yt-unlimited-page-header-renderer",_template:function(){if(void 0!==U9a)return U9a;var a=document.createElement("template");a.innerHTML="

\n \n \n

\n\n\n\n\n
\n \n \n
\n\n\n
\n\n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===T9a){var d=document.createElement("template");d.innerHTML=""; T9a=d}d=T9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return U9a=a}, behaviors:[Y,W.YtRendererBehavior,cW],listeners:{"yt-service-request-error":"onYtServiceRequestError_"},properties:{data:{type:Object,observer:"dataChanged_"}},stampDom:{"data.moreOffersRenderers":{id:"more-offers",mapping:{collapsibleYpcOfferRenderer:{component:"yt-collapsible-ypc-offer-renderer"}}}},dataChanged_:function(){if(this.data.backgroundImage){var a=MO(this.data.backgroundImage.thumbnails,screen.width),b=this.getScrimLayerColorStops_();this.style["background-image"]=b?"linear-gradient(180deg, "+ b+"), url("+a+")":"url("+a+")";this.data.gtmId&&aWa(this.data.gtmId)}}, onYtServiceRequestError_:function(a){this.openToast(a.detail.error.message)}, getScrimLayerColorStops_:function(){var a=this.get("unlimitedHeaderV2Data.unlimitedHeaderV2Data",this.data);if(!a)return null;var b=100/a.scrimLayerColors.length;return a.scrimLayerColors.map(function(c,d){d*=b;return eO(c)+" "+d+"%"}).join(",")}});var V9a;var W9a;iP("itemSectionRenderer","UnlimitedUserNotificationRenderer","yt-unlimited-user-notification-renderer"); Polymer({is:"yt-unlimited-user-notification-renderer",_template:function(){if(void 0!==W9a)return W9a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V9a){var d=document.createElement("template");d.innerHTML=""; V9a=d}d=V9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return W9a=a}, behaviors:[Y,W.YtRendererBehavior],properties:{data:Object},stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-confirm":!0}}}}}});var X9a;var Y9a;var dW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-viewership-action":"handleUpdateViewershipAction_","yt-update-title-action":"handleUpdateTitleAction_","yt-update-date-text-action":"handleUpdateDateTextAction_","yt-update-sentiment-buttons-action":"handleUpdateSentimentButtonsAction_"};return a}; p(dW,O);e=dW.prototype;e.configureRendererStamper=function(){return{"data.videoActions":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more",styleActionButton:!0}}}},"data.viewCount":{id:"count",mapping:{videoViewCountRenderer:"yt-view-count-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged_=function(){this.scheduleInitialUpdatedMetadataRequest_();this.setSentimentBarWidth_()}; e.scheduleInitialUpdatedMetadataRequest_=function(){this.data&&this.data.updatedMetadataEndpoint&&yk(this.ytTaskEmitterBehavior.getTaskManager(),this.fetchUpdatedMetadata_.bind(this),250)}; e.setSentimentBarWidth_=function(){var a=this;Polymer.RenderStatus.afterNextRender(this,function(){var b=a.$$("ytd-menu-renderer");if(b){b=Polymer.dom(b.root).querySelectorAll("[button-renderer]");for(var c=0,d=0;d

"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X9a){var d=document.createElement("template");d.innerHTML=""; X9a=d}d=X9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Y9a=a}a=Y9a;return a}}}); var eW=dW;eW.prototype.onYtServiceRequestCompleted_=eW.prototype.onYtServiceRequestCompleted_;eW.prototype.onYtServiceRequestSent_=eW.prototype.onYtServiceRequestSent_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],eW.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],eW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],eW.prototype,"ytRendererstamperBehavior",void 0); w([P(OO.YtTaskEmitterBehavior),x("design:type",Object)],eW.prototype,"ytTaskEmitterBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],eW.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],eW.prototype,"data",void 0);w([R({computed:"computeHasDateText_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],eW.prototype,"hasDateText_",void 0); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],eW.prototype,"onYtServiceRequestSent_",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],eW.prototype,"onYtServiceRequestCompleted_",null);eW=w([U({is:"ytd-video-primary-info-renderer"})],eW);var Z9a;var $9a;var fW=function(){return O.apply(this,arguments)||this}; p(fW,O);fW.prototype.notifyLikeChange=function(a){a.status&&this.observeLikeStatus_(a.status)}; fW.prototype.observeLikeStatus_=function(a){this.data&&("DISLIKE"==a?(a=this.data.percentIfDisliked||0,this.activated_=!0):"LIKE"==a?(a=this.data.percentIfLiked||0,this.activated_=!0):(a=this.data.percentIfIndifferent||0,this.activated_=!1),this.$["like-bar"].style.width=a+"%")}; h.Object.defineProperties(fW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$9a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n[[data.tooltip]]\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z9a){var d=document.createElement("template");d.innerHTML=""; Z9a=d}d=Z9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$9a=a}a=$9a;return a}}}); var gW=fW;gW.prototype.observeLikeStatus_=gW.prototype.observeLikeStatus_;w([P(W.YtRendererBehavior),x("design:type",Object)],gW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],gW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],gW.prototype,"activated_",void 0);w([yE("data.likeStatus"),x("design:type",Function),x("design:paramtypes",[String]),x("design:returntype",void 0)],gW.prototype,"observeLikeStatus_",null); gW=w([U({is:"ytd-sentiment-bar-renderer"})],gW);var a$a;var b$a;var c$a=function(){return O.apply(this,arguments)||this}; p(c$a,O); h.Object.defineProperties(c$a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===b$a){var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.viewCount)]][[getSimpleString(data.shortViewCount)]]";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a$a){var d=document.createElement("template");d.innerHTML=""; a$a=d}d=a$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b$a=a}a=b$a;return a}}}); var hW=c$a;w([P(AO.YtComponentBehavior),x("design:type",Object)],hW.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],hW.prototype,"data",void 0);w([R({value:function(){return N("kevlar_fixie_watch_layout")||N("no_sub_count_on_sub_button")}, reflectToAttribute:!0}),x("design:type",Boolean)],hW.prototype,"small_",void 0);hW=w([U({is:"yt-view-count-renderer"})],hW);var d$a;var e$a;var iW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-date-text-action":"handleUpdateDateTextAction","yt-update-description-action":"handleUpdateDescriptionAction","yt-update-horizontal-card-list-action":"handleUpdateHorizontalCardListAction"};return a}; p(iW,O);e=iW.prototype;e.configureRendererStamper=function(){return{subscribeButtonData:{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:{component:"ytd-subscribe-button-renderer",params:{withCount:!0}},subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(a){this.collapsed=!(a&&a.defaultExpanded);this.subscribeButtonData=a.subscribeButton;this.descriptionCollapsedHeight=20*(a.descriptionCollapsedLines||3);this.updateInlineRecs(void 0)}; e.handleUpdateHorizontalCardListAction=function(a){a=this.get("updateHorizontalCardListAction.contents.horizontalCardListRenderer",a);this.updateInlineRecs(a)}; e.updateInlineRecs=function(a){this.inlineRecsListRenderer.set("data",a);this.toggleClass("expanded",!this.inlineRecsListRenderer.empty,this.$["list-container"])}; e.handleUpdateDateTextAction=function(a){this.data&&this.data.dateText&&this.set("data.dateText",a.updateDateTextAction.dateText)}; e.handleUpdateDescriptionAction=function(a){this.$.description.hidden=a.updateDescriptionAction.isEmpty;this.set("data.description",a.updateDescriptionAction.description)}; e.computeMetadataCollapsible=function(a){return!!a&&!!a.rows&&a.rows.length>a.collapsedItemCount}; h.Object.defineProperties(iW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===e$a){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.dateText)]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===d$a){var d=document.createElement("template");d.innerHTML=""; d$a=d}d=d$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);e$a=a}a=e$a;return a}}}); var jW=iW;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],jW.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],jW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],jW.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],jW.prototype,"data",void 0);w([R(),x("design:type",Boolean)],jW.prototype,"collapsed",void 0); w([R(),x("design:type",Boolean)],jW.prototype,"canCollapse",void 0);w([R(),x("design:type",Object)],jW.prototype,"subscribeButtonData",void 0);w([R(),x("design:type",Number)],jW.prototype,"descriptionCollapsedHeight",void 0);w([AE("#inline-recs-list-renderer"),x("design:type",Object)],jW.prototype,"inlineRecsListRenderer",void 0);jW=w([U({is:"ytd-video-secondary-info-renderer"})],jW);var f$a;var g$a;var kW=function(){return O.apply(this,arguments)||this}; p(kW,O);kW.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{subscribeButtonRenderer:"ytd-subscribe-button-renderer",buttonRenderer:"ytd-button-renderer"}}}}; kW.prototype.onTap=function(a){var b=this.data&&this.data.endpoint;b&&!RR(Polymer.dom(a).path,this,["YTD-SUBSCRIBE-BUTTON-RENDERER","YTD-BUTTON-RENDERER"])&&this.fire("yt-navigate",{endpoint:b})}; h.Object.defineProperties(kW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===g$a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n [[getSimpleString(data.title)]]\n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===f$a){var d=document.createElement("template");d.innerHTML=""; f$a=d}d=f$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);g$a=a}a=g$a;return a}}}); var lW=kW;w([P(Y),x("design:type",Object)],lW.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],lW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],lW.prototype,"data",void 0);lW=w([U({is:"ytd-autotagging-metadata-renderer"})],lW);var h$a;var i$a;var mW=function(){return O.apply(this,arguments)||this}; p(mW,O);mW.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{autotaggingMetadataRenderer:"ytd-autotagging-metadata-renderer"}}}}; h.Object.defineProperties(mW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===i$a){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.header)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h$a){var d=document.createElement("template");d.innerHTML=""; h$a=d}d=h$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);i$a=a}a=i$a;return a}}}); var nW=mW;w([P(Y),x("design:type",Object)],nW.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],nW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],nW.prototype,"data",void 0);nW=w([U({is:"ytd-autotagging-metadata-row-renderer"})],nW);var j$a;var k$a;var oW=function(){return O.apply(this,arguments)||this}; p(oW,O); oW.prototype.configureRendererStamper=function(){return{alwaysShownItems:{id:"always-shown",mapping:{metadataRowRenderer:"ytd-metadata-row-renderer",metadataWithImageRowRenderer:"ytd-metadata-with-image-row-renderer",metadataRowHeaderRenderer:"ytd-metadata-row-header-renderer",richMetadataRowRenderer:"ytd-rich-metadata-row-renderer",autotaggingMetadataRowRenderer:"ytd-autotagging-metadata-row-renderer"}},collapsibleItems:{id:"collapsible",mapping:{metadataRowRenderer:"ytd-metadata-row-renderer",metadataWithImageRowRenderer:"ytd-metadata-with-image-row-renderer", metadataRowHeaderRenderer:"ytd-metadata-row-header-renderer",richMetadataRowRenderer:"ytd-rich-metadata-row-renderer",autotaggingMetadataRowRenderer:"ytd-autotagging-metadata-row-renderer"}}}}; oW.prototype.computeCollapsibleItems=function(a,b,c){return void 0===a||void 0===b||void 0===c||c?[]:a.slice(b)}; oW.prototype.computeAlwaysShownItems=function(a,b){return a&&a.length?a.slice(0,b):[]}; h.Object.defineProperties(oW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===k$a){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===j$a){var d=document.createElement("template");d.innerHTML=""; j$a=d}d=j$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);k$a=a}a=k$a;return a}}}); var pW=oW;w([P(W.YtRendererBehavior),x("design:type",Object)],pW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],pW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],pW.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],pW.prototype,"collapsed",void 0);w([R({computed:"computeAlwaysShownItems(data.rows,data.collapsedItemCount)"}),x("design:type",Array)],pW.prototype,"alwaysShownItems",void 0); w([R({computed:"computeCollapsibleItems(data.rows,data.collapsedItemCount,collapsed)"}),x("design:type",Array)],pW.prototype,"collapsibleItems",void 0);pW=w([U({is:"ytd-metadata-row-container-renderer"})],pW);var l$a;var m$a;var qW=function(){return O.apply(this,arguments)||this}; p(qW,O);qW.prototype.computeHasDividerLine=function(a){return a}; h.Object.defineProperties(qW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===m$a){var a=document.createElement("template");a.innerHTML="

\n \n

\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l$a){var d=document.createElement("template");d.innerHTML=""; l$a=d}d=l$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);m$a=a}a=m$a;return a}}}); var rW=qW;w([P(W.YtRendererBehavior),x("design:type",Object)],rW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],rW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),x("design:type",Boolean)],rW.prototype,"hasDividerLine",void 0);rW=w([U({is:"ytd-metadata-row-header-renderer"})],rW);var n$a;var o$a;var sW=function(){return O.apply(this,arguments)||this}; p(sW,O);sW.prototype.computeHasDividerLine=function(a){return a}; h.Object.defineProperties(sW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===o$a){var a=document.createElement("template");a.innerHTML="

\n \n

\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n$a){var d=document.createElement("template");d.innerHTML=""; n$a=d}d=n$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);o$a=a}a=o$a;return a}}}); var tW=sW;w([P(W.YtRendererBehavior),x("design:type",Object)],tW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],tW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),x("design:type",Boolean)],tW.prototype,"hasDividerLine",void 0);tW=w([U({is:"ytd-metadata-row-renderer"})],tW);var p$a;var q$a;var r$a=function(){return O.apply(this,arguments)||this}; p(r$a,O); h.Object.defineProperties(r$a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===q$a){var a=document.createElement("template");a.innerHTML="\n \n \n
\n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p$a){var d=document.createElement("template");d.innerHTML=""; p$a=d}d=p$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);q$a=a}a=q$a;return a}}}); var uW=r$a;w([P(W.YtRendererBehavior),x("design:type",Object)],uW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],uW.prototype,"data",void 0);uW=w([U({is:"ytd-metadata-with-image-row-renderer"})],uW);var s$a;var t$a;var vW=function(){return O.apply(this,arguments)||this}; p(vW,O);e=vW.prototype;e.configureRendererStamper=function(){return{"data.informationButton":{id:"information-button-container",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onDataChanged=function(){this.data&&!this.endpointHref&&(this.endpointLink.classList.add("button-mode"),this.endpointLink.setAttribute("tabindex","0"),this.endpointLink.setAttribute("role","button"),this.endpointLink.addEventListener("keypress",this.onEndpointLinkKeyPress.bind(this)))}; e.onEndpointLinkKeyPress=function(a){a.target===this.endpointLink&&13===a.keyCode&&this.fire("click")}; e.onClick=function(){var a;!this.endpointHref&&(this.endpointLink.blur(),null===(a=this.data)||void 0===a?0:a.endpoint)&&(this.actionSenderBehavior.sendInnerTubeActions([this.data.endpoint],this),this.ytRendererBehavior.logExplicitClick(this.data))}; e.onYtNavigate=function(a){this.endpointHref||a.stopPropagation()}; e.onInformationButtonContainerClick=function(a){"information-button-container"!==a.target.id&&a.stopPropagation()}; e.computeStyle=function(a){return a}; e.computeThumbnailWidth=function(a){switch(a){case"RICH_METADATA_RENDERER_STYLE_THUMBNAIL":return 178;case"RICH_METADATA_RENDERER_STYLE_BOX_ART":return 70;case"RICH_METADATA_RENDERER_STYLE_TOPIC":return 96;case"RICH_METADATA_RENDERER_STYLE_SQUARE":return 100;default:return 68;}}; h.Object.defineProperties(vW.prototype,{endpointHref:{configurable:!0,enumerable:!0,get:function(){var a;return(null===(a=this.data)||void 0===a?0:a.endpoint)?this.componentBehavior.computeOptionalHref_(this.data.endpoint):null}}}); h.Object.defineProperties(vW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===t$a){var a=document.createElement("template");a.innerHTML="\n \n \n
\n
[[getSimpleString(data.title)]]
\n
\n [[getSimpleString(data.subtitle)]]\n
\n \n
\n
[[getSimpleString(data.callToAction)]]
\n \n
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s$a){var d=document.createElement("template");d.innerHTML=""; s$a=d}d=s$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t$a=a}a=t$a;return a}}}); var wW=vW;wW.prototype.onYtNavigate=wW.prototype.onYtNavigate;wW.prototype.onClick=wW.prototype.onClick;wW.prototype.onDataChanged=wW.prototype.onDataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],wW.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],wW.prototype,"componentBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],wW.prototype,"actionSenderBehavior",void 0); w([P(Y),x("design:type",Object)],wW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],wW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),x("design:type",String)],wW.prototype,"componentStyle",void 0);w([R({computed:"computeThumbnailWidth(data.style)"}),x("design:type",Number)],wW.prototype,"thumbnailWidth",void 0);w([AE("#endpoint-link"),x("design:type",HTMLAnchorElement)],wW.prototype,"endpointLink",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],wW.prototype,"onDataChanged",null);w([zE("data.endpoint"),x("design:type",Object),x("design:paramtypes",[])],wW.prototype,"endpointHref",null);w([S("click"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],wW.prototype,"onClick",null); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],wW.prototype,"onYtNavigate",null);wW=w([U({is:"ytd-rich-metadata-renderer"})],wW);var u$a;var v$a;var xW=function(){return O.apply(this,arguments)||this}; p(xW,O);xW.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{richMetadataRenderer:"ytd-rich-metadata-renderer"}}}}; xW.prototype.computeHasDividerLine=function(a){return a}; h.Object.defineProperties(xW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v$a){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u$a){var d=document.createElement("template");d.innerHTML=""; u$a=d}d=u$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v$a=a}a=v$a;return a}}}); var yW=xW;w([P(Y),x("design:type",Object)],yW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],yW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),x("design:type",Boolean)],yW.prototype,"hasDividerLine",void 0);yW=w([U({is:"ytd-rich-metadata-row-renderer"})],yW);var w$a;var x$a;var zW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-button-refresh-action":"handleButtonRefreshAction","yt-unsubscribe-action":"handleUnsubscribeAction"};return a}; p(zW,O);e=zW.prototype;e.configureRendererStamper=function(){return{"data.membershipButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.analyticsButton":{id:"analytics-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.handleButtonRefreshAction=function(a){a.buttonRefreshAction&&this.set("data.membershipButton",a.buttonRefreshAction.membershipButton)}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.handleUnsubscribeAction=function(){this.data&&this.data.membershipButton&&"STYLE_PRIMARY"===this.data.membershipButton.buttonRenderer.style&&this.$$("#sponsor-button ytd-button-renderer").set("data.style","STYLE_SUGGESTIVE")}; h.Object.defineProperties(zW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===x$a){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w$a){var d=document.createElement("template");d.innerHTML=""; w$a=d}d=w$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x$a=a}a=x$a;return a}}}); var AW=zW;AW.prototype.onYtServiceRequestError=AW.prototype.onYtServiceRequestError;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],AW.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],AW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],AW.prototype,"ytRendererstamperBehavior",void 0);w([P(cW),x("design:type",Object)],AW.prototype,"ytOpenToastBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],AW.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],AW.prototype,"data",void 0);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],AW.prototype,"onYtServiceRequestError",null);AW=w([U({is:"ytd-video-owner-renderer"})],AW);var y$a;var z$a;var BW=function(){return O.apply(this,arguments)||this}; p(BW,O);BW.prototype.computeObjectFit=function(a){return"CARD_RENDERER_STYLE_TYPE_UNIVERSAL_WATCH_CARD_MOVIE_POSTER"===a||"CARD_RENDERER_STYLE_TYPE_MOVIE_POSTER"===a?"COVER":"FILL"}; BW.prototype.computeCardStyle=function(a){return a?a.replace("CARD_RENDERER_STYLE_TYPE_","").toLowerCase():""}; h.Object.defineProperties(BW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===z$a){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n
\n
[[getSimpleString(data.query)]]
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y$a){var d=document.createElement("template");d.innerHTML=""; y$a=d}d=y$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z$a=a}a=z$a;return a}}}); var CW=BW;w([P(W.YtRendererBehavior),x("design:type",Object)],CW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],CW.prototype,"data",void 0);w([R({computed:"computeObjectFit(data.searchRefinementCardRendererStyle.value)"}),x("design:type",Number)],CW.prototype,"objectFit",void 0);w([R({reflectToAttribute:!0,computed:"computeCardStyle(data.searchRefinementCardRendererStyle.value)"}),x("design:type",String)],CW.prototype,"cardStyle",void 0); CW=w([U({is:"ytd-search-refinement-card-renderer"})],CW);var A$a;var B$a;var DW=function(){return O.apply(this,arguments)||this}; p(DW,O);DW.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; h.Object.defineProperties(DW.prototype,{showMetadataAtTop:{configurable:!0,enumerable:!0,get:function(){return this.data&&!(!this.data.source&&!this.data.publishedTimeText)&&!!this.data.sourceAtTop}}, showMetadataBelowTitle:{configurable:!0,enumerable:!0,get:function(){return this.data&&!(!this.data.source&&!this.data.publishedTimeText)&&!this.data.sourceAtTop}}, hasMenu:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.menu)}}, truncateParagraphs:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.truncateParagraphs)}}, background:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.background?this.data.background.replace("INFO_PANEL_CONTENT_BACKGROUND_",""):""}}}); h.Object.defineProperties(DW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===B$a){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n
\n \n \n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A$a){var d=document.createElement("template");d.innerHTML=""; A$a=d}d=A$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);B$a=a}a=B$a;return a}}}); var EW=DW;w([P(W.YtRendererBehavior),x("design:type",Object)],EW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],EW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],EW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],EW.prototype,"showVerticalDividers",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],EW.prototype,"showMetadataAtTop",null); w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],EW.prototype,"showMetadataBelowTitle",null);w([R({reflectToAttribute:!0}),zE("data.menu"),x("design:type",Object),x("design:paramtypes",[])],EW.prototype,"hasMenu",null);w([R({reflectToAttribute:!0}),zE("data.truncateParagraphs"),x("design:type",Object),x("design:paramtypes",[])],EW.prototype,"truncateParagraphs",null); w([R({type:String,reflectToAttribute:!0}),zE("data.background"),x("design:type",Object),x("design:paramtypes",[])],EW.prototype,"background",null);EW=w([U({is:"ytd-info-panel-content-renderer"})],EW);var C$a;var D$a;var FW=function(){return O.apply(this,arguments)||this}; p(FW,O);FW.prototype.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{richListHeaderRenderer:"ytd-rich-list-header-renderer"}},"data.contents":{id:"contents",mapping:{gridVideoRenderer:{component:"ytd-grid-video-renderer",properties:{isSearch:"[[isSearch]]"}}}}}}; h.Object.defineProperties(FW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===D$a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C$a){var d=document.createElement("template");d.innerHTML=""; C$a=d}d=C$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);D$a=a}a=D$a;return a}}}); var GW=FW;w([P(W.YtRendererBehavior),x("design:type",Object)],GW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],GW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],GW.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],GW.prototype,"isSearch",void 0);GW=w([U({is:"ytd-preview-card-renderer"})],GW);var E$a;var F$a;var HW=function(){return O.apply(this,arguments)||this}; p(HW,O);HW.prototype.configureRendererStamper=function(){return{"data.channelThumbnail":{id:"avatar",mapping:{channelThumbnailWithLinkRenderer:"yt-channel-thumbnail-with-link-renderer"}}}}; HW.prototype.computeTitleStyle=function(a){return a||null}; HW.prototype.computeAvatarStyle=function(a){return a||null}; h.Object.defineProperties(HW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===F$a){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E$a){var d=document.createElement("template");d.innerHTML=""; E$a=d}d=E$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);F$a=a}a=F$a;return a}}}); var IW=HW;w([P(W.YtRendererBehavior),x("design:type",Object)],IW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],IW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],IW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeTitleStyle(data.titleStyle.style)"}),x("design:type",String)],IW.prototype,"titleStyle",void 0); w([R({reflectToAttribute:!0,computed:"computeAvatarStyle(data.channelThumbnail.channelThumbnailWithLinkRenderer.style)"}),x("design:type",String)],IW.prototype,"avatarStyle",void 0);IW=w([U({is:"ytd-rich-list-header-renderer"})],IW);var G$a;var H$a;Polymer({is:"yt-channel-thumbnail-with-link-renderer",_template:function(){if(void 0!==H$a)return H$a;var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===G$a){var d=document.createElement("template");d.innerHTML=""; G$a=d}d=G$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return H$a=a}, behaviors:[W.YtRendererBehavior],properties:{data:Object,style_:{type:String,reflectToAttribute:!0,computed:"computeStyle_(data.style)"}},computeStyle_:function(a){return a}});var I$a;var J$a;var JW=function(){var a=O.apply(this,arguments)||this;a.isSearch=!1;return a}; p(JW,O);e=JW.prototype; e.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{searchRefinementCardRenderer:"ytd-search-refinement-card-renderer",compactChannelRecommendationCardRenderer:"ytd-compact-channel-recommendation-card-renderer",videoCardRenderer:"ytd-grid-video-renderer",gameCardRenderer:"ytd-game-card-renderer",infoPanelContentRenderer:{component:"ytd-info-panel-content-renderer",params:{showVerticalDividers:!0}},previewCardRenderer:{component:"ytd-preview-card-renderer",properties:{isSearch:"[[isSearch]]"}}}}, "data.header":{id:"header",mapping:{titleAndButtonListHeaderRenderer:"ytd-title-and-button-list-header-renderer",richListHeaderRenderer:"ytd-rich-list-header-renderer"}},"data.sortFilter":{id:"sort-filter",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},"data.button":{id:"header-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.previousButton":{id:"left-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}, attributes:{arrow:!0}}},initialRenderPriority:0,waitForSignal:"eocs"},"data.nextButton":{id:"right-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"},attributes:{arrow:!0}}}}}}; e.getItemsPath=function(){return"data.cards"}; e.dataChanged_=function(){this.ytdHorizontalListBehavior.reset()}; e.computeCardListStyle_=function(a){return a||null}; e.computeEmpty_=function(a){return!this.get("cards.length",a)}; e.computeThumbnailStyle_=function(a){return this.get("header.richListHeaderRenderer.channelThumbnail.channelThumbnailWithLinkRenderer.style",a)||null}; e.computeHasSubtitle_=function(a){return!!this.get("header.richListHeaderRenderer.subtitle",a)}; e.computeInitialCountNumber_=function(a){return"HORIZONTAL_CARD_LIST_STYLE_TYPE_CHANNEL_SHELF"===a?6:"HORIZONTAL_CARD_LIST_STYLE_TYPE_INLINE_RECOMMENDATIONS"===a?8:"HORIZONTAL_CARD_LIST_STYLE_TYPE_NARROW_SHELF"===a?10:4}; e.computeUseFloorScrolling_=function(a){return"HORIZONTAL_CARD_LIST_STYLE_TYPE_RELATED_CHANNELS"===a}; e.computeHasGameCard_=function(a){return(a=this.get("cards",a))?a.some(function(b){return b.gameCardRenderer}):!1}; e.computeHasInfoPanel=function(a){var b;return null===(b=null===a||void 0===a?void 0:a.cards)||void 0===b?void 0:b.some(function(c){return c.infoPanelContentRenderer})}; e.handleKeyDown_=function(){this.ytdHorizontalListBehavior.fillRemainingListItems();this.ytRendererBehavior.markDirty()}; h.Object.defineProperties(JW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===J$a){var a=document.createElement("template");a.innerHTML="
\n

\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===I$a){var d=document.createElement("template");d.innerHTML=""; I$a=d}d=I$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);J$a=a}a=J$a;return a}}}); var KW=JW;w([P(W.YtRendererBehavior),x("design:type",Object)],KW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],KW.prototype,"ytRendererstamperBehavior",void 0);w([P(NQ.YtdHorizontalListBehavior),x("design:type",Object)],KW.prototype,"ytdHorizontalListBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],KW.prototype,"data",void 0);w([R({computed:"computeInitialCountNumber_(data.style.type)"}),x("design:type",Number)],KW.prototype,"initialCount",void 0); w([R({computed:"computeUseFloorScrolling_(data.style.type)"}),x("design:type",Boolean)],KW.prototype,"useFloorScrolling",void 0);w([R({reflectToAttribute:!0,computed:"computeCardListStyle_(data.style.type)"}),x("design:type",Object)],KW.prototype,"cardListStyle",void 0);w([R({value:!0,reflectToAttribute:!0,computed:"computeEmpty_(data)"}),x("design:type",Boolean)],KW.prototype,"empty",void 0); w([R({reflectToAttribute:!0,computed:"computeHasSubtitle_(data)"}),x("design:type",Boolean)],KW.prototype,"hasSubtitle",void 0);w([R({reflectToAttribute:!0,computed:"computeThumbnailStyle_(data)"}),x("design:type",Boolean)],KW.prototype,"thumbnailStyle_",void 0);w([R({readOnly:!0,reflectToAttribute:!0,computed:"computeHasGameCard_(data)"}),x("design:type",Boolean)],KW.prototype,"hasGameCard",void 0); w([R({readOnly:!0,reflectToAttribute:!0,computed:"computeHasInfoPanel(data)"}),x("design:type",Boolean)],KW.prototype,"hasInfoPanel",void 0);w([R(),x("design:type",Object)],KW.prototype,"isSearch",void 0);KW=w([U({is:"ytd-horizontal-card-list-renderer"})],KW);var K$a;var L$a;var M$a=function(){return O.apply(this,arguments)||this}; p(M$a,O); h.Object.defineProperties(M$a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===L$a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K$a){var d=document.createElement("template");d.innerHTML=""; K$a=d}d=K$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);L$a=a}a=L$a;return a}}}); var LW=M$a;w([P(W.YtRendererBehavior),x("design:type",Object)],LW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],LW.prototype,"data",void 0);LW=w([U({is:"ytd-title-and-button-list-header-renderer"})],LW);var N$a;var O$a;var MW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-description-action":"handleUpdateDescriptionAction"};return a}; p(MW,O);e=MW.prototype;e.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:{component:"ytd-subscribe-button-renderer",params:{withCount:!0}},subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}},"data.membershipButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.expand=function(){this.expanded=!0;this.fire("yt-metadata-expanded",!0)}; e.collapse=function(){this.expanded&&(this.expanded=!1,this.fire("yt-metadata-expanded",!1))}; e.handleUpdateDescriptionAction=function(a){this.description.hidden=a.updateDescriptionAction.isEmpty;this.set("data.description",a.updateDescriptionAction.description)}; h.Object.defineProperties(MW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O$a){var a=document.createElement("template");a.innerHTML="
\u2014 [[getSimpleString(data.description)]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N$a){var d=document.createElement("template");d.innerHTML=""; N$a=d}d=N$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O$a=a}a=O$a;return a}}}); var NW=MW;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],NW.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],NW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],NW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],NW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],NW.prototype,"expanded",void 0); w([AE("#description"),x("design:type",Object)],NW.prototype,"description",void 0);NW=w([U({is:"ytd-video-secondary-info-renderer-fixie"})],NW);var P$a;var Q$a;var OW=function(){var a=O.apply(this,arguments)||this;a.isCollapsed=!1;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction_","yt-update-donation-shelf-command":"handleUpdate_","yt-open-popup-action":"handleOpenPopupAction_"};return a}; p(OW,O);e=OW.prototype;e.configureRendererStamper=function(){return{"data.donateButton":{id:"donate-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme_=document.documentElement.hasAttribute("dark")}; e.onDonateTap_=function(){var a=this.get("data.donateButton.buttonRenderer.command");if(a){var b=On(),c=this.get("data.donateButton.buttonRenderer.trackingParams");b&&c&&QJ(b,In(c));this.ytOpenPopupBehavior.openPopup(a)}}; e.onShowMore_=function(){this.isCollapsed=!1;var a=On(),b=this.get("data.expandButton.buttonRenderer.trackingParams");a&&b&&QJ(a,In(b))}; e.onShowLess_=function(){this.isCollapsed=!0}; e.dataChanged_=function(){this.updateStyles({"--progress-bar-completion":100*this.data.progress+"%"})}; e.onDarkModeToggledAction_=function(a){this.isDarkTheme_=a}; e.handleUpdate_=function(a){if(a=this.get("updateDonationShelfCommand.donationShelf.donationShelfRenderer",a))this.set("data.startLabel",a.startLabel),this.set("data.endLabel",a.endLabel),this.set("data.progress",a.progress),this.set("data.amountRaisedLabel",a.amountRaisedLabel),this.dataChanged_()}; e.handleOpenPopupAction_=function(a){this.get("openPopupAction.popup.ypcTransactionErrorMessageRenderer",a)&&this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["yt-loading-renderer"])}; e.computeHeaderBackgroundUrl_=function(a,b){if(a)return b?a.headerBackgroundDarkUrl:a.headerBackgroundUrl}; e.isProgressBarVisible=function(a){return!(!a||void 0===a.progress)}; e.headerBackgroundClass=function(){return"rtl"===A("HTML_DIR",void 0)?"flip":""}; h.Object.defineProperties(OW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Q$a){var a=document.createElement("template");a.innerHTML="
\n
\n [[getSimpleString(data.headerTitle)]]\n
\n \n
\n\n
\n
\n \n \n
\n
\n [[getSimpleString(data.campaignTitle)]]\n
\n
\n [[getSimpleString(data.campaignSubtitle)]]\n
\n
\n
\n
\n \n \n \n
\n\n\n\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P$a){var d=document.createElement("template");d.innerHTML=""; P$a=d}d=P$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Q$a=a}a=Q$a;return a}}}); var PW=OW;w([P(aP.YtOpenPopupBehavior),x("design:type",Object)],PW.prototype,"ytOpenPopupBehavior",void 0);w([P(Y),x("design:type",Object)],PW.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],PW.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],PW.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],PW.prototype,"ytActionSenderBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],PW.prototype,"data",void 0);w([R(),x("design:type",Object)],PW.prototype,"isCollapsed",void 0);w([R({computed:"computeHeaderBackgroundUrl_(data, isDarkTheme_)"}),x("design:type",String)],PW.prototype,"headerBackgroundUrl_",void 0);w([R(),x("design:type",Boolean)],PW.prototype,"isDarkTheme_",void 0);PW=w([U({is:"ytd-donation-shelf-renderer"})],PW);var R$a;var S$a;var T$a=function(){return O.apply(this,arguments)||this}; p(T$a,O); h.Object.defineProperties(T$a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===S$a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R$a){var d=document.createElement("template");d.innerHTML=""; R$a=d}d=R$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);S$a=a}a=S$a;return a}}}); var U$a=T$a;w([R(),x("design:type",Object)],U$a.prototype,"data",void 0);U$a=w([U({is:"ytd-donation-unavailable-renderer"})],U$a);var V$a;var W$a;var QW=function(){var a=O.apply(this,arguments)||this;a.playerListenerConfig=null;return a}; p(QW,O);e=QW.prototype;e.dataChanged=function(){var a=ZM(this);a&&a.getPlayerPromise().then(this.maybeRemovePlayerListeners.bind(this));var b=this.data&&this.data.survey;b&&((b=(b=b.singleOptionSurveyRenderer||b.checkboxSurveyRenderer)&&b.watchPageDisplayTriggers)?this.triggerWatchPageSurvey(a,b):this.openSurvey())}; e.triggerWatchPageSurvey=function(a,b){return Ya(this,function d(){var f=this,g,l,m,n,r,u,z;return ya(d,function(C){if(1==C.nextAddress)return a?q(C,a.getPlayerPromise(),2):C.return();f.player=C.yieldResult;if(!f.player)return C.return();g={};l=k(b);for(m=l.next();!m.done;m=l.next())n=m.value,r=k(f.createEventListenerPair(n)),u=r.next().value,z=r.next().value,u&&z&&(g[u]=z,f.ytPlayerListenerBehavior.listenToPlayerEvent(f.player,u,z));f.playerListenerConfig=g;oa(C)})})}; e.createEventListenerPair=function(a){var b=a.playbackEventTrigger;return b?this.handlePlaybackTrigger(b):(a=a.watchTimeTrigger)?this.handleWatchTimeTrigger(a):[void 0,void 0]}; e.handleWatchTimeTrigger=function(a){var b=this;this.accumulatedMediaTime=this.lastKnownPlaybackPosition=0;var c=a.videoWatchFraction,d=a.watchTimeSec;return d&&c?["onVideoProgress",function(){b.player&&b.isWatchTimeConditionMet(b.player,c,d)&&b.showSurvey()}]:[void 0, void 0]}; e.isWatchTimeConditionMet=function(a,b,c){var d=a.getProgressState(),f=d.current-this.lastKnownPlaybackPosition;5>f&&(this.accumulatedMediaTime+=f);this.lastKnownPlaybackPosition=d.current;d=Math.round(this.accumulatedMediaTime/d.duration*1E3)/1E3;return a.getPresentingPlayerType&&1===a.getPresentingPlayerType()&&(this.accumulatedMediaTime>c||d>b)}; e.handlePlaybackTrigger=function(a){var b=this;a=a.playbackEvent;if("SURVEY_DISPLAY_TRIGGER_PLAYBACK_EVENT_PLAYBACK_FINISH"===a){var c="onStateChange";var d=function(f){0===f&&b.showSurvey()}}else"SURVEY_DISPLAY_TRIGGER_PLAYBACK_EVENT_CONTENT_VIDEO_START"===a?(c="onVideoProgress",d=function(f){b.player&&b.player.getPresentingPlayerType&&1===b.player.getPresentingPlayerType()&&f&&b.showSurvey()}):"SURVEY_DISPLAY_TRIGGER_PLAYBACK_EVENT_AD_FINISH"===a&&(c="onAdEnd",d=this.showSurvey); return[c,d]}; e.showSurvey=function(){this.openSurvey();this.player&&this.maybeRemovePlayerListeners(this.player)}; e.openSurvey=function(){this.ytdOpenPopupBehavior.openPopup({openPopupAction:{popupType:"SURVEY",popup:this.data&&this.data.survey}})}; e.maybeRemovePlayerListeners=function(a){if(this.playerListenerConfig){for(var b=k(Object.keys(this.playerListenerConfig)),c=b.next();!c.done;c=b.next())c=c.value,this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(a,c,this.playerListenerConfig[c]);this.playerListenerConfig=null}}; h.Object.defineProperties(QW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===W$a){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V$a){var d=document.createElement("template");d.innerHTML="";V$a=d}d=V$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);W$a=a}a=W$a;return a}}}); var RW=QW;RW.prototype.dataChanged=RW.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],RW.prototype,"ytRendererBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],RW.prototype,"ytdOpenPopupBehavior",void 0);w([P(cQ),x("design:type",I0a)],RW.prototype,"ytPlayerListenerBehavior",void 0);w([R(),x("design:type",Object)],RW.prototype,"data",void 0);w([R(),x("design:type",Object)],RW.prototype,"playerListenerConfig",void 0); w([R({value:0}),x("design:type",Number)],RW.prototype,"lastKnownPlaybackPosition",void 0);w([R({value:0}),x("design:type",Number)],RW.prototype,"accumulatedMediaTime",void 0);w([R(),x("design:type",Object)],RW.prototype,"player",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RW.prototype,"dataChanged",null);RW=w([U({is:"ytd-survey-trigger-renderer"})],RW);var X$a;var Y$a;iP("itemSectionRenderer","infoPanelContainerRenderer","ytd-info-panel-container-renderer");var SW=function(){return O.apply(this,arguments)||this}; p(SW,O);SW.prototype.configureRendererStamper=function(){return{"data.menu":{id:"header-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.content":{id:"content",mapping:{infoPanelContentRenderer:"ytd-info-panel-content-renderer",horizontalCardListRenderer:"ytd-horizontal-card-list-renderer"}}}}; h.Object.defineProperties(SW.prototype,{background:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.background?this.data.background.replace("INFO_PANEL_CONTAINER_BACKGROUND_",""):""}}}); h.Object.defineProperties(SW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Y$a){var a=document.createElement("template");a.innerHTML="
\n

\n \n \n \n

\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X$a){var d=document.createElement("template");d.innerHTML=""; X$a=d}d=X$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Y$a=a}a=Y$a;return a}}}); var TW=SW;w([P(W.YtRendererBehavior),x("design:type",Object)],TW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],TW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],TW.prototype,"data",void 0);w([R({type:String,reflectToAttribute:!0}),zE("data.background"),x("design:type",Object),x("design:paramtypes",[])],TW.prototype,"background",null);TW=w([U({is:"ytd-info-panel-container-renderer"})],TW);var Z$a;var $$a;var aab=function(a){$a.call(this,a)}; p(aab,$a);var bab=function(a){$a.call(this,a)}; p(bab,aab);var cab=function(a){$a.call(this,a)}; p(cab,aab);var UW=function(){return O.apply(this,arguments)||this}; p(UW,O);UW.prototype.onTap=function(){var a=this,b=!1,c=this.get("serviceEndpoint.selectActiveIdentityEndpoint.supportedTokens",this.data);c&&c.forEach(function(d){if(d.accountSigninToken)if(b=!0,a.onAccountItemTap)a.onAccountItemTap(d.accountSigninToken.signinUrl);else gO(d.accountSigninToken.signinUrl,void 0,void 0,window.top)}); b||Um(new bab("Did not handle account switch tap. No token."))}; h.Object.defineProperties(UW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$$a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z$a){var d=document.createElement("template");d.innerHTML=""; Z$a=d}d=Z$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$$a=a}a=$$a;return a}}}); var VW=UW;VW.prototype.onTap=VW.prototype.onTap;w([P(W.YtRendererBehavior),x("design:type",Object)],VW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],VW.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Function)],VW.prototype,"onAccountItemTap",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],VW.prototype,"onTap",null);VW=w([U({is:"ytd-account-item-renderer"})],VW);var dab;var eab;var WW=function(){return O.apply(this,arguments)||this}; p(WW,O);WW.prototype.configureRendererStamper=function(){return{"data.searchBox":{id:"search-box",mapping:{searchBoxRenderer:"ytd-search-box-renderer",channelSwitcherSearchBoxRenderer:"ytd-channel-switcher-search-box-renderer"}}}}; h.Object.defineProperties(WW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===eab){var a=document.createElement("template");a.innerHTML="

\n \n

\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dab){var d=document.createElement("template");d.innerHTML=""; dab=d}d=dab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);eab=a}a=eab;return a}}}); var XW=WW;w([P(W.YtRendererBehavior),x("design:type",Object)],XW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],XW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],XW.prototype,"data",void 0);XW=w([U({is:"ytd-channel-switcher-header-renderer"})],XW);var fab;var gab;var YW=function(){var a=O.apply(this,arguments)||this;a.boundSubmitSearch=a.submitSearch.bind(a);a.boundClearSearch=a.clearSearch.bind(a);return a}; p(YW,O);e=YW.prototype;e.configureRendererStamper=function(){return{"data.searchButton":{id:"search-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundSubmitSearch]]"}}}},"data.clearButton":{id:"clear-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundClearSearch]]"}}}}}}; e.toggleClearButton=function(){this.hideClearButton=ve||!this.input.value}; e.submitOnEnterKeyUp=function(a){13!==a.keyCode||this.input.invalid||this.submit(this.input.value)}; e.clearSearch=function(){this.submit("")}; e.submitSearch=function(){this.input.invalid||this.submit(this.input.value)}; e.submit=function(a){var b=y.unsafeClone(this.data.endpoint);b.getAccountsListInnertubeEndpoint&&(b.getAccountsListInnertubeEndpoint.channelSwitcherQuery=a,this.actionSenderBehavior.sendServiceRequestAction([b]))}; h.Object.defineProperties(YW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gab){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fab){var d=document.createElement("template");d.innerHTML=""; fab=d}d=fab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);gab=a}a=gab;return a}}}); var ZW=YW;ZW.prototype.toggleClearButton=ZW.prototype.toggleClearButton;w([P(W.YtRendererBehavior),x("design:type",Object)],ZW.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],ZW.prototype,"ytRendererstamperBehavior",void 0);w([P([V.YtActionSenderBehavior]),x("design:type",Object)],ZW.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],ZW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],ZW.prototype,"hideClearButton",void 0); w([R(),x("design:type",Object)],ZW.prototype,"boundSubmitSearch",void 0);w([R(),x("design:type",Object)],ZW.prototype,"boundClearSearch",void 0);w([AE("#input"),x("design:type",Object)],ZW.prototype,"input",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],ZW.prototype,"toggleClearButton",null);ZW=w([U({is:"ytd-channel-switcher-search-box-renderer"})],ZW);var hab;var iab;var $W=function(){var a=O.apply(this,arguments)||this;a.boundSubmit=a.submit.bind(a);return a}; p($W,O);e=$W.prototype;e.configureRendererStamper=function(){return{"data.searchButton":{id:"search-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundSubmit]]"}}}},"data.clearButton":{id:"clear-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.ready=function(){this.form.addEventListener("submit",this.onSubmit.bind(this))}; e.onSubmit=function(a){a.preventDefault();return!1}; e.toggleClearButton=function(){this.hideClearButton=ve||!this.input.value}; e.submitOnEnterKeyUp=function(a){13===a.keyCode&&this.submit()}; e.submit=function(){var a=this.data.endpoint,b=y.unsafeClone(a);N("kevlar_include_query_in_search_endpoint")&&(b.browseEndpoint?b.browseEndpoint.query=this.input.value:b.searchEndpoint&&(b.searchEndpoint.query=this.input.value));b.commandMetadata&&b.commandMetadata.webCommandMetadata&&b.commandMetadata.webCommandMetadata.url?(b.commandMetadata.webCommandMetadata.url=Nd(b.commandMetadata.webCommandMetadata.url,"query",this.input.value),this.fire("yt-navigate",{endpoint:b})):b.getAccountsListInnertubeEndpoint?( b.getAccountsListInnertubeEndpoint.channelSwitcherQuery=this.input.value,this.actionSenderBehavior.sendServiceRequestAction([b])):Um(Error("Error: Trying to navigate to an endpoint without url: "+JSON.stringify(a)))}; e.getUrl=function(a){return this.get("commandMetadata.webCommandMetadata.url",a)}; h.Object.defineProperties($W,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===iab){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hab){var d=document.createElement("template");d.innerHTML=""; hab=d}d=hab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);iab=a}a=iab;return a}}}); var aX=$W;aX.prototype.toggleClearButton=aX.prototype.toggleClearButton;w([P(W.YtRendererBehavior),x("design:type",Object)],aX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],aX.prototype,"ytRendererstamperBehavior",void 0);w([P([V.YtActionSenderBehavior]),x("design:type",Object)],aX.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],aX.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],aX.prototype,"hideClearButton",void 0); w([R(),x("design:type",Object)],aX.prototype,"boundSubmit",void 0);w([AE("#form"),x("design:type",HTMLFormElement)],aX.prototype,"form",void 0);w([AE("#input"),x("design:type",Object)],aX.prototype,"input",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aX.prototype,"toggleClearButton",null);aX=w([U({is:"ytd-search-box-renderer"})],aX);var jab;var kab;var bX=function(){var a=O.apply(this,arguments)||this;a.hasContents=!1;a.actionMap={"yt-update-channel-switcher-page-action":"updateChannelSwitcherAction"};return a}; p(bX,O);e=bX.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.computeHasContents=function(a){var b;return(null===a||void 0===a?0:a.contents)&&0<(null===(b=null===a||void 0===a?void 0:a.contents)||void 0===b?void 0:b.length)?!0:!1}; e.updateChannelSwitcherAction=function(a){var b,c;void 0!==(null===(c=null===(b=null===a||void 0===a?void 0:a.updateChannelSwitcherPageAction)||void 0===b?void 0:b.page)||void 0===c?void 0:c.channelSwitcherPageRenderer)&&(this.data=a.updateChannelSwitcherPageAction.page.channelSwitcherPageRenderer)}; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{channelSwitcherHeaderRenderer:"ytd-channel-switcher-header-renderer"}},"data.contents":{id:"contents",mapping:{buttonRenderer:"ytd-button-renderer",accountItemRenderer:"ytd-account-item-renderer",continuationItemRenderer:{component:"ytd-continuation-item-renderer",params:{showButton:!0}}}}}}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents"}}; h.Object.defineProperties(bX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kab){var a=document.createElement("template");a.innerHTML="
\n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jab){var d=document.createElement("template");d.innerHTML=""; jab=d}d=jab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kab=a}a=kab;return a}}}); var cX=bX;w([P(W.YtRendererBehavior),x("design:type",Object)],cX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],cX.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],cX.prototype,"actionHandlerBehavior",void 0);w([P(FU),x("design:type",Object)],cX.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],cX.prototype,"data",void 0); w([R({reflectToAttribute:!0,computed:"computeHasContents(data)"}),x("design:type",Boolean)],cX.prototype,"hasContents",void 0);cX=w([U({is:"ytd-channel-switcher-page-renderer"})],cX);var lab;var mab;var dX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(dX,O);dX.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme=document.documentElement.hasAttribute("dark")}; dX.prototype.computeBannerImageUrl=function(a,b){if(void 0!==a){var c=a.thumbnail.thumbnails;b&&(c=a.thumbnailDark.thumbnails);this.bannerImageUrl=(a=MO(c,24,void 0,"height"))?a:void 0}}; dX.prototype.onDarkModeToggledAction=function(a){this.isDarkTheme=a}; dX.prototype.computeHasText=function(a){return!!a}; h.Object.defineProperties(dX.prototype,{bannerStyle:{configurable:!0,enumerable:!0,get:function(){if(this.bannerImageUrl)return dc({"background-image":$b(this.bannerImageUrl)})}}}); h.Object.defineProperties(dX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mab){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lab){var d=document.createElement("template");d.innerHTML=""; lab=d}d=lab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mab=a}a=mab;return a}}}); var eX=dX;eX.prototype.computeHasText=eX.prototype.computeHasText;eX.prototype.computeBannerImageUrl=eX.prototype.computeBannerImageUrl;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],eX.prototype,"ytActionHandlerBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],eX.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],eX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],eX.prototype,"data",void 0); w([R(),x("design:type",Boolean)],eX.prototype,"isDarkTheme",void 0);w([R(),x("design:type",String)],eX.prototype,"bannerImageUrl",void 0);w([R({reflectToAttribute:!0,computed:"computeHasText(data.text)"}),x("design:type",Boolean)],eX.prototype,"hasText",void 0);w([yE("data","isDarkTheme"),x("design:type",Function),x("design:paramtypes",[Object,Boolean]),x("design:returntype",void 0)],eX.prototype,"computeBannerImageUrl",null); w([yE("data.text"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],eX.prototype,"computeHasText",null);w([zE("bannerImageUrl"),x("design:type",Object),x("design:paramtypes",[])],eX.prototype,"bannerStyle",null);eX=w([U({is:"ytd-backstage-prefilled-post-dialog-header-renderer"})],eX);var nab;var oab;var pab=function(){return O.apply(this,arguments)||this}; p(pab,O); h.Object.defineProperties(pab,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===oab){var a=document.createElement("template");a.innerHTML="\n[[getSimpleString(data.title)]]\n[[getSimpleString(data.text)]]\n\n[[getSimpleString(data.footer)]]\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nab){var d=document.createElement("template");d.innerHTML=""; nab=d}d=nab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);oab=a}a=oab;return a}}}); var fX=pab;w([P(W.YtRendererBehavior),x("design:type",Object)],fX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],fX.prototype,"data",void 0);fX=w([U({is:"ytd-backstage-zero-state-renderer"})],fX);var qab;var rab;var sab={"data.actionButton":{id:"schedule-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},gX=function(){return O.apply(this,arguments)||this}; p(gX,O);gX.prototype.configureRendererStamper=function(){return sab}; h.Object.defineProperties(gX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rab){var a=document.createElement("template");a.innerHTML="\n[[getSimpleString(data.title)]]\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qab){var d=document.createElement("template");d.innerHTML=""; qab=d}d=qab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rab=a}a=rab;return a}}}); var hX=gX;w([P(W.YtRendererBehavior),x("design:type",Object)],hX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],hX.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],hX.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],hX.prototype,"icon",void 0);hX=w([U({is:"ytd-post-scheduling-zero-state-renderer"})],hX);var tab;var uab;var iX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-posts-total-count-action":"handleUpdatePostsTotalCountAction"};return a}; p(iX,O);iX.prototype.onTabsActivate=function(a){this.data&&this.data.tabs&&this.fire("yt-navigate",{endpoint:this.data.tabs[a.detail.selected].navigationEndpoint})}; iX.prototype.shouldShowTotalCount=function(a){return a&&void 0!==a.totalCount}; iX.prototype.handleUpdatePostsTotalCountAction=function(a){var b=this.get(["data.tabs",1,"totalCount"]),c=this.get("updatePostsTotalCountAction.updateType",a);a=this.get("updatePostsTotalCountAction.number",a);void 0!==b&&"UPDATE_POSTS_TOTAL_COUNT_TYPE_UNKNOWN"!==c&&a&&("UPDATE_POSTS_TOTAL_COUNT_TYPE_ADD"===c?this.set(["data.tabs",1,"totalCount"],Number(b)+a):"UPDATE_POSTS_TOTAL_COUNT_TYPE_REMOVE"===c&&this.set(["data.tabs",1,"totalCount"],Number(b)-a))}; h.Object.defineProperties(iX.prototype,{selected:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.tabs)for(var a=0,b=this.data.tabs.length;a
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tab){var d=document.createElement("template");d.innerHTML=""; tab=d}d=tab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);uab=a}a=uab;return a}}}); var jX=iX;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],jX.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],jX.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],jX.prototype,"data",void 0);w([zE("data.tabs"),x("design:type",Number),x("design:paramtypes",[])],jX.prototype,"selected",null);jX=w([U({is:"ytd-post-stream-filter-renderer"})],jX);var vab;var wab;var kX=function(){var a=O.apply(this,arguments)||this;a.isOpen=!1;a.commentDialog_=null;a.actionMap={"yt-create-comment-action":"onCreateCommentAction_"};return a}; p(kX,O);e=kX.prototype;e.configureRendererStamper=function(){return{"data.imageButton":{id:"image-button",mapping:{buttonRenderer:"ytd-button-renderer"}},commentDialog_:{id:"comment-dialog",mapping:{commentDialogRenderer:{component:"ytd-comment-dialog-renderer",properties:{zeroStepFooterText:"[[data.zeroStep.zeroStepChannelCreationRenderer.footerText]]"}}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){var a=this,b=this.$["placeholder-area"],c=function(d){d.stopPropagation();"keypress"===d.type&&13!==d.keyCode&&32!==d.keyCode||a.openDialog()}; this.$["simplebox-placeholder"].addEventListener("focus",c);b.addEventListener("tap",c);b.addEventListener("keypress",c)}; e.dataChanged_=function(){this.commentDialog_=null;this.isOpen=!1}; e.openDialog=function(){this.data&&(this.data.prepareAccountEndpoint?this.fire("yt-navigate",{endpoint:this.data.prepareAccountEndpoint}):(this.commentDialog_||(this.commentDialog_={commentDialogRenderer:this.computeCommentDialog_(this.data)}),this.isOpen=!0,this.$["comment-dialog"].firstElementChild.focus()))}; e.onYtCommentboxDismiss_=function(a){a.stopPropagation();this.isOpen=!1}; e.onCreateCommentAction_=function(a){this.get("createCommentAction.contents",a)&&(this.isOpen=!1)}; e.computeCommentDialog_=function(a){return{placeholderText:a.placeholderText,authorThumbnail:a.authorThumbnail,submitButton:a.submitButton,imageButton:a.imageButton,cancelButton:a.cancelButton,emojiButton:a.emojiButton,emojis:a.emojis,emojiPicker:a.emojiPicker,unicodeEmojisUrl:a.unicodeEmojisUrl}}; h.Object.defineProperties(kX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wab){var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vab){var d=document.createElement("template");d.innerHTML=""; vab=d}d=vab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wab=a}a=wab;return a}}}); var lX=kX;lX.prototype.onYtCommentboxDismiss_=lX.prototype.onYtCommentboxDismiss_;w([P(Y),x("design:type",Object)],lX.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],lX.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],lX.prototype,"ytActionHandlerBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],lX.prototype,"data",void 0); w([R(),x("design:type",Object)],lX.prototype,"isOpen",void 0);w([R(),x("design:type",Object)],lX.prototype,"commentDialog_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],lX.prototype,"enableCreationBox",void 0);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],lX.prototype,"onYtCommentboxDismiss_",null);lX=w([U({is:"ytd-comment-simplebox-renderer"})],lX);var xab;var yab;var mX=function(){var a=O.apply(this,arguments)||this;a.isPostSchedulingEnabled=N("enable_post_scheduling");a.hasFinishedStamping_=!1;a.handleOpenPostCommentDialogActionAfterStamp_=!1;a.actionMap={"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"};return a}; p(mX,O);e=mX.prototype; e.configureRendererStamper=function(){return{"data.createRenderer":{id:"simple-box",mapping:{commentSimpleboxRenderer:"ytd-comment-simplebox-renderer"}},backstagePostDialog_:{id:"backstage-post-dialog",mapping:{backstagePostDialogRenderer:{component:"ytd-backstage-post-dialog-renderer"}},events:!0},"data.sortMenu":{id:"sort-menu",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},"data.alerts":{id:"alert",mapping:{alertWithButtonRenderer:"ytd-alert-with-button-renderer"},renderPriority:0, waitForSignal:"eocs"},"data.zeroStateMessage":{id:"zero-state-message",mapping:{backstageZeroStateRenderer:"ytd-backstage-zero-state-renderer"}},"data.prefilledCreateDialogHeaderMessage":{id:"prefilled-dialog-header",mapping:{backstagePrefilledPostDialogHeaderRenderer:"ytd-backstage-prefilled-post-dialog-header-renderer"}},"data.postStreamFilter":{id:"post-stream-filter",mapping:{postStreamFilterRenderer:"ytd-post-stream-filter-renderer"}},"data.schedulingZeroStateMessage":{id:"scheduling-zero-state-message", mapping:{postSchedulingZeroStateRenderer:"ytd-post-scheduling-zero-state-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasActionsChange_&&this.observePrefilledBackstagePostDialog_()}; e.onStampFinished_=function(){this.hasFinishedStamping_=!0;this.hasActionsChange_&&this.observePrefilledBackstagePostDialog_();this.handleOpenPostCommentDialogActionAfterStamp_&&this.handleSignalActionOpenPostCommentDialogAction_()}; e.onYtServiceRequestSent_=function(a,b){if(!N("kevlar_command_handler")&&b.actions)for(a=0;a ytd-backstage-post-dialog-renderer").openSchedulingPanel(c.showSchedulingPanelCommand)}}; e.observePrefilledBackstagePostDialog_=function(){var a;if(this.hasFinishedStamping_){if(this.hasActionsChange_=!1,this.getPrefilledBackstagePostDialog_(null===(a=this.data)||void 0===a?void 0:a.actions)){this.$["prefilled-dialog-header"].hidden=!1;var b=this.$["backstage-post-dialog"].firstElementChild;b&&Polymer.RenderStatus.afterNextRender(this,function(){b.focus();b.openDialog&&b.openDialog()})}}else this.hasActionsChange_=!0}; e.computeIsBackstage_=function(a){return a}; e.onYtCommentboxDismiss_=function(){this.$["prefilled-dialog-header"].hidden=!0;this.removePrefilledDialog_(this.data)}; e.removePrefilledDialog_=function(a){if(null===a||void 0===a?0:a.actions){for(var b=a.actions.length-1;0<=b;b--){var c=a.actions[b];c.createBackstagePostDialogEndpoint&&c.createBackstagePostDialogEndpoint.dialog&&delete a.actions[b]}this.set("data",void 0);this.set("data",a)}}; e.getPrefilledBackstagePostDialog_=function(a){if(a)for(var b=0;b\n\n
\n
\n
\n
\n\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xab){var d=document.createElement("template");d.innerHTML=""; xab=d}d=xab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);yab=a}a=yab;return a}}}); var nX=mX;nX.prototype.onYtCommentboxDismiss_=nX.prototype.onYtCommentboxDismiss_;nX.prototype.observePrefilledBackstagePostDialog_=nX.prototype.observePrefilledBackstagePostDialog_;nX.prototype.onYtServiceRequestSent_=nX.prototype.onYtServiceRequestSent_;nX.prototype.onStampFinished_=nX.prototype.onStampFinished_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],nX.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],nX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],nX.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],nX.prototype,"data",void 0);w([R({computed:"computeIsBackstage_(data.isBackstageContent)",reflectToAttribute:!0}),x("design:type",Boolean)],nX.prototype,"isBackstage",void 0); w([R({readOnly:!0,computed:"computeBackstagePostDialog_(data)"}),x("design:type",Object)],nX.prototype,"backstagePostDialog_",void 0);w([R(),x("design:type",Object)],nX.prototype,"isPostSchedulingEnabled",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nX.prototype,"onStampFinished_",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],nX.prototype,"onYtServiceRequestSent_",null);w([yE("data.actions"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nX.prototype,"observePrefilledBackstagePostDialog_",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],nX.prototype,"onYtCommentboxDismiss_",null); nX=w([U({is:"ytd-comments-header-renderer"})],nX);var zab;var Aab;var oX=function(){var a=O.apply(this,arguments)||this;a.isDisplayed=!0;return a}; p(oX,O);e=oX.prototype;e.configureRendererStamper=function(){return{"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged=function(){this.isDisplayed=!0}; e.computeType=function(a){return a||"UNKNOWN"}; e.onYtServiceRequestCompleted=function(a){a.stopPropagation();this.isDisplayed=!1}; e.onClose=function(){this.isDisplayed=!1}; h.Object.defineProperties(oX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Aab){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zab){var d=document.createElement("template");d.innerHTML=""; zab=d}d=zab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Aab=a}a=Aab;return a}}}); var pX=oX;pX.prototype.onYtServiceRequestCompleted=pX.prototype.onYtServiceRequestCompleted;w([P(W.YtRendererBehavior),x("design:type",Object)],pX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],pX.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],pX.prototype,"data",void 0);w([R({computed:"computeType(data.type)",reflectToAttribute:!0}),x("design:type",String)],pX.prototype,"type",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],pX.prototype,"isDisplayed",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],pX.prototype,"onYtServiceRequestCompleted",null);pX=w([U({is:"ytd-alert-with-button-renderer"})],pX);var Bab;var Cab;var Dab=function(){return O.apply(this,arguments)||this}; p(Dab,O); h.Object.defineProperties(Dab,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cab){var a=document.createElement("template");a.innerHTML="\n \n
\n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bab){var d=document.createElement("template");d.innerHTML=""; Bab=d}d=Bab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cab=a}a=Cab;return a}}}); var qX=Dab;w([R(),x("design:type",Object)],qX.prototype,"data",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],qX.prototype,"ytRendererBehavior",void 0);qX=w([U({is:"ytd-destination-button-renderer"})],qX);var Eab;var Fab;var rX=function(){var a=O.apply(this,arguments)||this;a.isExpanded=!1;a.gridStateActionMap={"ytd-update-grid-state-action":"handleUpdateGridStateAction"};return a}; p(rX,O);e=rX.prototype;e.configureRendererStamper=function(){return{"data.destinationButtons":{id:"destination-buttons",mapping:{destinationButtonRenderer:{component:"ytd-destination-button-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.registerActionMap(this.gridStateActionMap)}; e.handleUpdateGridStateAction=function(){this.updateDestinationButtonsVisibility()}; e.updateDestinationButtonsVisibility=function(){var a;if(!this.isExpanded){var b=this.clientWidth;if(b&&null!==(a=this.data)&&void 0!==a&&a.destinationButtons){b=Math.floor((b+4)/214);var c=this.data.destinationButtons.length,d=Math.ceil(c/b);this.fullyVisibleRows=2===d&&1===c%b?1:2;this.isShowMoreVisible=this.fullyVisibleRows
\n
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Eab){var d=document.createElement("template");d.innerHTML=""; Eab=d}d=Eab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fab=a}a=Fab;return a}}}); var sX=rX;w([R(),x("design:type",Object)],sX.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Number)],sX.prototype,"fullyVisibleRows",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],sX.prototype,"isShowMoreVisible",void 0);w([R(),x("design:type",Boolean)],sX.prototype,"isExpanded",void 0);w([R(),x("design:type",Object)],sX.prototype,"gridStateActionMap",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],sX.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],sX.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],sX.prototype,"ytActionHandlerBehavior",void 0);sX=w([U({is:"ytd-destination-shelf-renderer"})],sX);var Gab;var Hab;var tX=function(){return O.apply(this,arguments)||this}; p(tX,O);tX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}}; h.Object.defineProperties(tX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hab){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gab){var d=document.createElement("template");d.innerHTML=""; Gab=d}d=Gab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hab=a}a=Hab;return a}}}); var uX=tX;w([P(W.YtRendererBehavior),x("design:type",Object)],uX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],uX.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],uX.prototype,"ytdDismissableItemBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],uX.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],uX.prototype,"thumbnailWidth",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"":"94"}}), x("design:type",String)],uX.prototype,"customThumbnailSize",void 0);w([R(),x("design:type",Object)],uX.prototype,"data",void 0);uX=w([U({is:"ytd-compact-playlist-renderer"})],uX);var Iab;var Jab;var vX=function(){return O.apply(this,arguments)||this}; p(vX,O);vX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}}; vX.prototype.attached=function(){this.classList.add("use-ellipsis")}; vX.prototype.onYtNavigate=function(a,b){var c=this;if(b.endpoint===this.data.navigationEndpoint&&this.get("endpoint.watchEndpoint.continuePlayback",b)){var d=this.get("watchEndpoint.videoId",b.endpoint),f=this.actionSenderBehavior.sendOptionalAction("yt-get-current-video-id-action")[0];N("kevlar_mix_handle_first_endpoint_different")&&d&&f&&d!==f||(a.stopPropagation(),aN(this).getPlayerPromise().then(function(g){if(0===g.getPlayerState()&&c.data.secondaryNavigationEndpoint)var l=c.data.secondaryNavigationEndpoint;else l=Object.assign({},b.endpoint),l.commandMetadata&&l.commandMetadata.webCommandMetadata&&(g=Math.floor(g.getCurrentTime()),l.commandMetadata.webCommandMetadata.url=Jd(l.commandMetadata.webCommandMetadata.url,{t:g}),!N("kevlar_add_start_time_to_mix_endpoint_killswitch")&&l.watchEndpoint&&(l.watchEndpoint.startTimeSeconds=g));c.fire("yt-navigate",{endpoint:l})}))}}; h.Object.defineProperties(vX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jab){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Iab){var d=document.createElement("template");d.innerHTML=""; Iab=d}d=Iab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jab=a}a=Jab;return a}}}); var wX=vX;wX.prototype.onYtNavigate=wX.prototype.onYtNavigate;w([P(W.YtRendererBehavior),x("design:type",Object)],wX.prototype,"ytRendererBehavior",void 0);w([P(dP.YtEndpointBehavior),x("design:type",Object)],wX.prototype,"ytEndpointBehavior",void 0);w([P(Y),x("design:type",Object)],wX.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],wX.prototype,"ytdDismissableItemBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],wX.prototype,"actionSenderBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],wX.prototype,"ytdLockupBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],wX.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],wX.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],wX.prototype,"data",void 0);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],wX.prototype,"onYtNavigate",null);wX=w([U({is:"ytd-compact-radio-renderer"})],wX);var Kab;var Lab;var xX=function(){return O.apply(this,arguments)||this}; p(xX,O);xX.prototype.configureRendererStamper=function(){return{"data.button":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!1}}}}}}; h.Object.defineProperties(xX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Lab){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Kab){var d=document.createElement("template");d.innerHTML=""; Kab=d}d=Kab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lab=a}a=Lab;return a}}}); var yX=xX;w([R(),x("design:type",Object)],yX.prototype,"data",void 0);w([P(Y),x("design:type",Object)],yX.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],yX.prototype,"rendererBehavior",void 0);yX=w([U({is:"ytd-compact-text-promo-renderer"})],yX);var Mab;var Nab;var zX=function(){return O.apply(this,arguments)||this}; p(zX,O);zX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; zX.prototype.isMetaBlockEmpty=function(a){return!a||!a.longBylineText&&!a.shortBylineText&&!a.shortViewCountText&&!a.viewCountText}; h.Object.defineProperties(zX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Nab){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mab){var d=document.createElement("template");d.innerHTML=""; Mab=d}d=Mab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nab=a}a=Nab;return a}}}); var AX=zX;w([P(W.YtRendererBehavior),x("design:type",Object)],AX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],AX.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],AX.prototype,"ytdDismissableItemBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],AX.prototype,"ytdLockupBehavior",void 0); w([P(HQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],AX.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([R({reflectToAttribute:!0,computed:"isMetaBlockEmpty(data)"}),x("design:type",Boolean)],AX.prototype,"metaBlockEmpty",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],AX.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],AX.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],AX.prototype,"data",void 0);AX=w([U({is:"ytd-compact-video-renderer"})],AX);iP("itemSectionRenderer","counterfactualRenderer","ytd-counterfactual-renderer");var Oab=function(){return O.apply(this,arguments)||this}; p(Oab,O);var BX=Oab;w([P(W.YtRendererBehavior),x("design:type",Object)],BX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],BX.prototype,"data",void 0);BX=w([U({is:"ytd-counterfactual-renderer"})],BX);var Pab;var Qab;var CX=function(){return O.apply(this,arguments)||this}; p(CX,O);CX.prototype.computeStyle=function(a){return a?a:""}; h.Object.defineProperties(CX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qab){var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.title)]]
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pab){var d=document.createElement("template");d.innerHTML=""; Pab=d}d=Pab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qab=a}a=Qab;return a}}}); var DX=CX;w([P(W.YtRendererBehavior),x("design:type",Object)],DX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],DX.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.titleStyle)"}),x("design:type",String)],DX.prototype,"titleStyle",void 0);DX=w([U({is:"ytd-item-section-header-renderer"})],DX);var Rab;var Sab;var Uab;iP("sharingItemSection","itemSectionRenderer","ytd-item-section-renderer");var EX=function(){var a=O.apply(this,arguments)||this;a.continuationShowButton=!1;a.isSearch=!1;a.actionMap={"yt-item-section-continuation-action":"handleYtItemSectionContinuation_","yt-item-section-replace-action":"handleYtItemSectionReplace_"};a.nextContinuation={continuationType:"itemSectionContinuation",usePost:!0};return a}; p(EX,O);e=EX.prototype;e.getItemsPath=function(){return"data.contents"}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents","yt-reload-continuation-items-command-body":"contents","yt-reload-continuation-items-command-header":"header"}}; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{commentsHeaderRenderer:"ytd-comments-header-renderer",sortFilterHeaderRenderer:"ytd-sort-filter-header-renderer",itemSectionHeaderRenderer:"ytd-item-section-header-renderer"}},shownItems:{id:"contents",mapping:{activityItemRenderer:"yt-activity-item-renderer",backgroundPromoRenderer:"ytd-background-promo-renderer",backstagePostThreadRenderer:"ytd-backstage-post-thread-renderer",buttonRenderer:"ytd-button-renderer",carouselAdRenderer:"ytd-carousel-ad-renderer", cardItemContainerRenderer:"yt-card-item-container-renderer",cardItemRenderer:"yt-card-item-renderer",carouselItemRenderer:"ytd-carousel-item-renderer",channelAboutFullMetadataRenderer:"ytd-channel-about-metadata-renderer",channelFeaturedContentRenderer:"ytd-channel-featured-content-renderer",channelRenderer:"ytd-channel-renderer",channelSwitcherPageRenderer:"ytd-channel-switcher-page-renderer",channelVideoPlayerRenderer:"ytd-channel-video-player-renderer",clarificationRenderer:"ytd-clarification-renderer", commentHistoryEntryRenderer:"ytd-comment-history-entry-renderer",commentThreadRenderer:"ytd-comment-thread-renderer",compactMovieRenderer:"ytd-compact-movie-renderer",compactPlaylistRenderer:"ytd-compact-playlist-renderer",compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",compactTextPromoRenderer:"ytd-compact-text-promo-renderer",compactVideoRenderer:"ytd-compact-video-renderer",compactRadioRenderer:"ytd-compact-radio-renderer",connectedAppRenderer:"ytd-connected-app-renderer",counterfactualRenderer:"ytd-counterfactual-renderer", destinationShelfRenderer:"ytd-destination-shelf-renderer",didYouMeanRenderer:"yt-did-you-mean-renderer",displayAdRenderer:"ytd-display-ad-renderer",emergencyOneboxRenderer:"ytd-emergency-onebox-renderer",exploratoryResultsRenderer:"ytd-exploratory-results-renderer",factCheckRenderer:"ytd-fact-check-renderer",faqSectionRenderer:"yt-faq-section-renderer",feedbackElicitationSingleQuestionRenderer:"ytd-feedback-elicitation-single-question-renderer",feedEntryRenderer:"ytd-feed-entry-renderer",gridRenderer:"ytd-grid-renderer", hashtagTileRenderer:"ytd-hashtag-tile-renderer",horizontalCardListRenderer:{component:"ytd-horizontal-card-list-renderer",properties:{isSearch:"[[isSearch]]"}},includingResultsForRenderer:"yt-including-results-for-renderer",infoPanelContainerRenderer:"ytd-info-panel-container-renderer",inlineSurveyRenderer:"ytd-inline-survey-renderer",labsEditRenderer:"ytd-labs-edit-renderer",labsHeaderRenderer:"ytd-labs-header-renderer",labsItemRenderer:"ytd-labs-item-renderer",liveChatHistoryEntryRenderer:"ytd-live-chat-history-entry-renderer", messageRenderer:"ytd-message-renderer",movieRenderer:"ytd-movie-renderer",musicPassFeatureInfoRenderer:"yt-music-pass-feature-info-renderer",newspaperRenderer:"ytd-newspaper-renderer",noResultsFoundShowingResultsForRenderer:"yt-no-results-found-showing-results-for-renderer",notificationRenderer:"ytd-notification-renderer",offerItemExpandedRenderer:"yt-offer-item-expanded-renderer",offerItemRenderer:"yt-offer-item-renderer",offerItemUpsellRenderer:"yt-offer-item-upsell-renderer",playlistRenderer:{component:"ytd-playlist-renderer", properties:{isSearch:"[[isSearch]]"}},pageIntroductionRenderer:"ytd-page-introduction-renderer",playlistShowMetadataRenderer:"ytd-playlist-show-metadata-renderer",playlistVideoListRenderer:"ytd-playlist-video-list-renderer",premiumBrowseFooterRenderer:"ytd-premium-browse-footer-renderer",productDetailsRenderer:"ytd-product-details-renderer",promotedSparklesTextSearchRenderer:"ytd-promoted-sparkles-text-search-renderer",purchaseItemRenderer:"ytd-purchase-item-renderer",radioRenderer:"ytd-radio-renderer", redCancelSurveyRenderer:"ytd-red-cancel-survey-renderer",resultsWithoutQuotesRenderer:"yt-results-without-quotes-renderer",searchHistoryQueryRenderer:"ytd-search-history-query-renderer",searchNoResultsRenderer:"yt-search-no-results-renderer",searchPyvRenderer:"ytd-search-pyv-renderer",settingsOptionsRenderer:"ytd-settings-options-renderer",shelfRenderer:{component:"ytd-shelf-renderer",properties:{isSearch:"[[isSearch]]"}},showingResultsForRenderer:"yt-showing-results-for-renderer",showRenderer:"ytd-show-renderer", simpleTextSectionRenderer:"ytd-simple-text-section-renderer",statementBannerRenderer:"ytd-statement-banner-renderer",subscriptionProductHeaderRenderer:"yt-subscription-product-header-renderer",subscriptionProductRenderer:"yt-subscription-product-renderer",subscriptionProductUpsellOfferRenderer:"yt-subscription-product-upsell-offer-renderer",toggleFormFieldRenderer:"yt-toggle-form-field-renderer",unlimitedManageSubscriptionPageRenderer:"yt-unlimited-manage-subscription-page-renderer",unlimitedPageFeatureInfoRenderer:"ytd-unlimited-page-feature-info-renderer", unlimitedPageHeaderRenderer:"yt-unlimited-page-header-renderer",unlimitedUserNotificationRenderer:"yt-unlimited-user-notification-renderer",videoRenderer:{component:"ytd-video-renderer",properties:{isSearch:"[[isSearch]]"}},webAnswerRenderer:"ytd-web-answer-renderer",ypcOffersListRenderer:"yt-ypc-offers-list-renderer",redeemCodeRenderer:"ytd-redeem-code-renderer",primetimePromoRenderer:"ytd-primetime-promo-renderer",continuationItemRenderer:{component:"ytd-continuation-item-renderer",properties:{showButton:"[[continuationShowButton]]"}}, infoPanelContentRenderer:"ytd-info-panel-content-renderer"}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]",disablePrescanVisibility:"[[continuationDisablePrescanVisibility]]"}},reloadContinuationData:{component:"yt-reload-continuation"}},renderPriority:N("kevlar_low_priority_continuation")?0:void 0,usePageScheduler:N("kevlar_low_priority_continuation")}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.created=function(){this.cachedViewportHeight_=A("initialInnerHeight",void 0)||window.innerHeight;ue&&N("polymer2_aggressive_batching")&&(this.ytLazyListBehavior.initialCount=20,this.ytLazyListBehavior.minChunkSize=12)}; e.onRetrieveLocation_=function(a,b){this.containsComments_()&&(this.firstCommentsLoaded_=b.hasComments=!0)}; e.containsComments_=function(){return"comment-item-section"===this.get("data.sectionIdentifier")}; e.onLoadReloadContinuation_=function(a,b){var c=this;a.stopPropagation();this.isReloading_=!0;this.fire("yt-retrieve-location",{locationRetrieved:function(d){var f=c.ytComponentBehavior.getInterfaceForTs("yt-network-manager");d=b(d);f.postData(d).then(function(g){return c.onReloadContinuationData_(g)})}})}; e.onReloadContinuationData_=function(a){if(a=this.get("response.continuationContents.itemSectionContinuation",a)||this.get("response.contents.itemSectionRenderer",a)||this.get("response.continuationContents.sectionListContinuation.contents.0.itemSectionRenderer",a)||this.get("response.continuationContents.relatedChipsContinuation.continuation.watchNextSecondaryResultsRenderer",a))this.set("data.contents",a.contents||a.results),a.header&&this.set("data.header",a.header),this.set("data.continuations", a.continuations||[]);this.isReloading_=!1}; e.computeContentsClass_=function(a){return a?"reloading":""}; e.computeShowButton_=function(){return!!this.firstCommentsLoaded_&&this.containsComments_()&&N("kevlar_disable_comments_auto_load")}; e.computeIsReloading_=function(){return this.isReloading_||this.ytContinuationHandlerBehavior.continuationIsReloading}; e.computeHasDestinationShelfRenderer=function(a){var b,c;return!(null===(c=null===(b=null===a||void 0===a?void 0:a.contents)||void 0===b?void 0:b[0])||void 0===c||!c.destinationShelfRenderer)}; e.dataChanged_=function(){this.firstCommentsLoaded_=!1}; e.onYtDismissableItemDismissedChange_=function(a){this._setItemDismissed("yt-dismissable-item-dismissed"==a.type)}; e.triggerContinuations=function(){for(var a=this.$.continuations.children,b=0;b
\n
\n \n \n
\n
\n
\n"; var b=a.content,c=b.insertBefore;if(void 0===Sab){var d=document.createElement("template");d.innerHTML=""; Sab=d}d=Sab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===Rab&&(d=document.createElement("template"),d.innerHTML="", Rab=d);d=Rab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Uab=a}a=Uab;return a}}}); var FX=EX;FX.prototype.onYtDismissableItemDismissedChange_=FX.prototype.onYtDismissableItemDismissedChange_;FX.prototype.onLoadReloadContinuation_=FX.prototype.onLoadReloadContinuation_;FX.prototype.onRetrieveLocation_=FX.prototype.onRetrieveLocation_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],FX.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],FX.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],FX.prototype,"ytRendererstamperBehavior",void 0);w([P(MQ),x("design:type",Object)],FX.prototype,"ytLazyListBehavior",void 0);w([P(SQ),x("design:type",Object)],FX.prototype,"ytNextContinuationBehavior",void 0);w([P(GU.YtContinuationHandlerBehavior),x("design:type",Object)],FX.prototype,"ytContinuationHandlerBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],FX.prototype,"ytComponentBehavior",void 0); w([R({notify:!0,observer:"dataChanged_"}),x("design:type",Object)],FX.prototype,"data",void 0);w([R({observer:"continuationShowButtonChanged"}),x("design:type",Object)],FX.prototype,"continuationShowButton",void 0);w([R({value:!0}),x("design:type",Boolean)],FX.prototype,"autoFill",void 0);w([R(),x("design:type",Boolean)],FX.prototype,"continuationDisablePrescanVisibility",void 0);w([R(),x("design:type",Boolean)],FX.prototype,"isReloading_",void 0); w([R(),x("design:type",Object)],FX.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,computed:"computeUseHeightHack_(isSearch)"}),x("design:type",Boolean)],FX.prototype,"useHeightHack",void 0);w([R({computed:"computeShowButton_(data.sectionIdentifier, firstCommentsLoaded_)"}),x("design:type",Boolean)],FX.prototype,"showButton_",void 0);w([R(),x("design:type",Boolean)],FX.prototype,"firstCommentsLoaded_",void 0);w([R(),x("design:type",Boolean)],FX.prototype,"isSearchDova",void 0); w([R({reflectToAttribute:!0,readOnly:!0}),x("design:type",Boolean)],FX.prototype,"itemDismissed",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDestinationShelfRenderer(data)"}),x("design:type",Boolean)],FX.prototype,"hasDestinationShelfRenderer",void 0);w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],FX.prototype,"onRetrieveLocation_",null); w([S("yt-load-reload-continuation"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Function]),x("design:returntype",void 0)],FX.prototype,"onLoadReloadContinuation_",null);w([S("yt-dismissable-item-dismissed"),S("yt-dismissable-item-undismissed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],FX.prototype,"onYtDismissableItemDismissedChange_",null);FX=w([U({is:"ytd-item-section-renderer"})],FX);var Vab;var Wab;var Xab=function(){return O.apply(this,arguments)||this}; p(Xab,O); h.Object.defineProperties(Xab,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wab){var a=document.createElement("template");a.innerHTML="\n\n\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vab){var d=document.createElement("template");d.innerHTML=""; Vab=d}d=Vab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wab=a}a=Wab;return a}}}); var GX=Xab;w([R(),x("design:type",Object)],GX.prototype,"data",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],GX.prototype,"rendererBehavior",void 0);GX=w([U({is:"ytd-premium-browse-footer-renderer"})],GX);var Yab;var Zab;var HX=function(){return O.apply(this,arguments)||this}; p(HX,O);e=HX.prototype; e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:!N("defer_menus")||N("desktop_persistent_menu")&&TN?void 0:0,waitForSignal:"eocs"},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.onDataChanged=function(a){var b,c,d,f=this.get("channelThumbnailSupportedRenderers.channelThumbnailWithLinkRenderer",a);f&&(f.title=null===(d=null===(c=null===(b=null===a||void 0===a?void 0:a.shortBylineText)||void 0===b?void 0:b.runs)||void 0===c?void 0:c[0])||void 0===d?void 0:d.text,this.set("data.owner",f));f=a.thumbnailRenderer;!a.thumbnail&&f&&f.playlistVideoThumbnailRenderer&&this.set("data.thumbnail",f.playlistVideoThumbnailRenderer.thumbnail)}; e.onDetailsTap=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.navigationEndpoint;c&&!RR(Polymer.dom(a).path,this,["A","BUTTON"])&&this.fire("yt-navigate",{endpoint:c})}; e.onRendererTap=function(){var a,b=null===(a=this.data)||void 0===a?void 0:a.serviceEndpoint;(null===b||void 0===b?0:b.feedbackEndpoint)&&this.actionSenderBehavior.sendServiceRequestAction([b])}; e.onMovingThumbnailPreviewEnd=function(){N("web_inline_player_after_video_preview")&&this.actionSenderBehavior.sendAction("yt-open-video-preview-action",[this.data,this.offsetTop,this.offsetLeft])}; e.computeDescriptionSnippet=function(a,b){return b?null===a||void 0===a?void 0:a.description:null===a||void 0===a?void 0:a.descriptionSnippet}; e.computeHideDescriptionSnippet=function(a,b,c){return!b||!c||N("hide_desktop_search_grid_result_metadata")}; e.computeHidePlaylistVideos=function(a,b){return!(null===a||void 0===a?0:a.videos)||!b||N("hide_desktop_search_grid_result_metadata")}; e.getFirstTwoPlaylistVideos=function(a){var b;return null===(b=null===a||void 0===a?void 0:a.videos)||void 0===b?void 0:b.slice(0,2)}; e.computeMetaBlockClass=function(a){return a?"":"grid"}; h.Object.defineProperties(HX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zab){var a=document.createElement("template");a.innerHTML="

"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Yab){var d=document.createElement("template");d.innerHTML=""; Yab=d}d=Yab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zab=a}a=Zab;return a}}}); var IX=HX;IX.prototype.onMovingThumbnailPreviewEnd=IX.prototype.onMovingThumbnailPreviewEnd;IX.prototype.onDataChanged=IX.prototype.onDataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],IX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],IX.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],IX.prototype,"ytdDismissableItemBehavior",void 0); w([P(GQ.YtdLockupBehavior),x("design:type",Object)],IX.prototype,"ytdLockupBehavior",void 0);w([P(HQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],IX.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([P(IQ),x("design:type",Object)],IX.prototype,"ytdReduxBehavior",void 0);w([P([V.YtActionSenderBehavior]),x("design:type",Object)],IX.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],IX.prototype,"data",void 0); w([R(),x("design:type",Boolean)],IX.prototype,"noEndpoints",void 0);w([R({value:!1}),x("design:type",Boolean)],IX.prototype,"isRadio",void 0);w([R({value:!1}),x("design:type",Boolean)],IX.prototype,"isPromotedVideo",void 0);w([R({value:!1}),x("design:type",Boolean)],IX.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,selector:tT}),x("design:type",Boolean)],IX.prototype,"miniMode",void 0); w([R({computed:"computeHidePlaylistVideos(data, isSearch)"}),x("design:type",Boolean)],IX.prototype,"hidePlaylistVideos",void 0);w([R({computed:"computeDescriptionSnippet(data, isPromotedVideo)"}),x("design:type",String)],IX.prototype,"descriptionSnippet",void 0);w([R({computed:"computeHideDescriptionSnippet(data, descriptionSnippet, isSearch)"}),x("design:type",Boolean)],IX.prototype,"hideDescriptionSnippet",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],IX.prototype,"onDataChanged",null);w([S("yt-moving-thumbnail-ended"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],IX.prototype,"onMovingThumbnailPreviewEnd",null);IX=w([U({is:"ytd-rich-grid-media"})],IX);var $ab;var abb;var JX=function(){return O.apply(this,arguments)||this}; p(JX,O); JX.prototype.configureRendererStamper=function(){return N("enable_menu_on_rich_grid_movie")?{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:!N("defer_menus")||N("desktop_persistent_menu")&&TN?void 0:0,waitForSignal:"eocs"},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}},"data.offerButton":{id:"offer-button", mapping:{buttonRenderer:"ytd-button-renderer"}}}:{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; JX.prototype.computeHideMetadataContainer=function(a,b){return N("hide_desktop_search_grid_result_metadata")||b||!(null===a||void 0===a?0:a.descriptionSnippet)&&!(null===a||void 0===a?0:a.topMetadataItems)&&!(null===a||void 0===a?0:a.bottomMetadataItems)}; h.Object.defineProperties(JX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===abb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$ab){var d=document.createElement("template");d.innerHTML=""; $ab=d}d=$ab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);abb=a}a=abb;return a}}}); var KX=JX;w([P(W.YtRendererBehavior),x("design:type",Object)],KX.prototype,"ytRendererBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],KX.prototype,"ytdLockupBehavior",void 0);w([P(Y),x("design:type",Object)],KX.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],KX.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],KX.prototype,"data",void 0); w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],KX.prototype,"isMovieInShelf",void 0);w([R({computed:"computeHideMetadataContainer(data, isMovieInShelf)"}),x("design:type",Boolean)],KX.prototype,"hideMetadataContainer",void 0);KX=w([U({is:"ytd-rich-grid-movie"})],KX);var bbb;var cbb;var LX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-rich-item-index-update-action":"onIndexUpdateAction"};return a}; p(LX,O); LX.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{postRenderer:{component:"ytd-post-renderer",params:{isRichGrid_:!0}},sharedPostRenderer:{component:"ytd-shared-post-renderer",params:{isRichGrid_:!0}},primetimePromoDetailsRenderer:"ytd-primetime-promo-details-renderer",primetimePromoPanelRenderer:"ytd-primetime-promo-panel-renderer",movieRenderer:{component:"ytd-rich-grid-movie",properties:{isMovieInShelf:"[[isMovieInShelf]]"}},videoRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!1}, properties:{isSearch:"[[isSearch]]"}},radioRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!0},properties:{isSearch:"[[isSearch]]"}},playlistRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!1},properties:{isSearch:"[[isSearch]]"}},promotedVideoRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!1,isPromotedVideo:!0},properties:{isSearch:"[[isSearch]]"}},displayAdRenderer:{component:"ytd-display-ad-renderer"},channelRenderer:"ytd-rich-grid-channel"}}}}; LX.prototype.onIndexUpdateAction=function(){var a,b=On();b&&(null===(a=this.data)||void 0===a?0:a.trackingParams)&&this.data.hasOwnProperty("colIndex")&&this.data.hasOwnProperty("rowIndex")&&nNa(b,In(this.data.trackingParams),{gridData:{veColumnCoordinate:this.data.colIndex,veRowCoordinate:this.data.rowIndex}})}; LX.prototype.isMovieRendererInShelf=function(a,b){var c;return b&&!(null===(c=null===a||void 0===a?void 0:a.content)||void 0===c||!c.movieRenderer)}; LX.prototype.isPostRenderer=function(){var a,b,c,d;return!(null===(b=null===(a=this.data)||void 0===a?void 0:a.content)||void 0===b||!b.postRenderer)||!(null===(d=null===(c=this.data)||void 0===c?void 0:c.content)||void 0===d||!d.sharedPostRenderer)}; h.Object.defineProperties(LX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===cbb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bbb){var d=document.createElement("template");d.innerHTML=""; bbb=d}d=bbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);cbb=a}a=cbb;return a}}}); var MX=LX;w([P(Y),x("design:type",Object)],MX.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],MX.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],MX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],MX.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"isPostRenderer(data)"}),x("design:type",Boolean)],MX.prototype,"isPost",void 0); w([R({value:!1}),x("design:type",Boolean)],MX.prototype,"isShelfItem",void 0);w([R({reflectToAttribute:!0,computed:"isMovieRendererInShelf(data, isShelfItem)"}),x("design:type",Boolean)],MX.prototype,"isMovieInShelf",void 0);w([R({value:!1}),x("design:type",Boolean)],MX.prototype,"isSearch",void 0);MX=w([U({is:"ytd-rich-item-renderer"})],MX);var dbb;var ebb;var NX=function(){return O.apply(this,arguments)||this}; p(NX,O);e=NX.prototype;e.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; e.onClick=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.navigationEndpoint;!RR(Polymer.dom(a).path,this,["YTD-SUBSCRIBE-BUTTON-RENDERER"])&&c&&(c.ypcGetOffersEndpoint?(this.ytActionSenderBehavior.sendServiceRequestAction([c]),a.preventDefault()):this.fire("yt-navigate",{endpoint:c}))}; e.computeChannelEndpoint=function(a){return a&&a.ypcGetOffersEndpoint?null:a}; e.computeHrefEndpoint=function(a){return(null===a||void 0===a?0:a.ypcGetOffersEndpoint)?null:this.componentBehavior.computeHref_(a)}; e.computeHideDot=function(a){return!(a&&a.subscriberCountText&&a.videoCountText)}; e.computeHideDescriptionSnippet=function(a){return!(null===a||void 0===a?0:a.descriptionSnippet)||N("hide_desktop_search_grid_result_metadata")}; h.Object.defineProperties(NX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ebb){var a=document.createElement("template");a.innerHTML="
\n \n
\n

\n \n \n \n \n

\n
\n [[getSimpleString(data.subscriberCountText)]]\n \n [[getSimpleString(data.videoCountText)]]\n
\n \n
\n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dbb){var d=document.createElement("template");d.innerHTML=""; dbb=d}d=dbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ebb=a}a=ebb;return a}}}); var OX=NX;w([P(W.YtRendererBehavior),x("design:type",Object)],OX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],OX.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],OX.prototype,"ytActionSenderBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],OX.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],OX.prototype,"data",void 0); w([R({value:!1,computed:"computeHideDescriptionSnippet(data)"}),x("design:type",Boolean)],OX.prototype,"hideDescriptionSnippet",void 0);OX=w([U({is:"ytd-rich-grid-channel"})],OX);var fbb;var gbb;var PX=function(){return O.apply(this,arguments)||this}; p(PX,O);PX.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(PX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gbb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fbb){var d=document.createElement("template");d.innerHTML=""; fbb=d}d=fbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);gbb=a}a=gbb;return a}}}); var QX=PX;w([P(W.YtRendererBehavior),x("design:type",Object)],QX.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],QX.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],QX.prototype,"data",void 0);QX=w([U({is:"ytd-primetime-promo-details-renderer"})],QX);var hbb;var ibb;var RX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"handleDarkModeToggledAction"};return a}; p(RX,O);RX.prototype.attached=function(){this.isDarkTheme=document.documentElement.hasAttribute("dark");this.actionHandlerBehavior.actionMap=this.actionMap}; RX.prototype.handleDarkModeToggledAction=function(a){this.isDarkTheme=a}; RX.prototype.computeHeaderLogoThumbnail=function(a,b){if(a)return b?a.darkLogo:a.lightLogo}; h.Object.defineProperties(RX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ibb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hbb){var d=document.createElement("template");d.innerHTML=""; hbb=d}d=hbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ibb=a}a=ibb;return a}}}); var SX=RX;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],SX.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],SX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],SX.prototype,"data",void 0);w([R({computed:"computeHeaderLogoThumbnail(data,isDarkTheme)"}),x("design:type",Object)],SX.prototype,"themeLogo",void 0);w([R(),x("design:type",Boolean)],SX.prototype,"isDarkTheme",void 0); SX=w([U({is:"ytd-primetime-promo-header-renderer"})],SX);var jbb;var kbb;iP("itemSectionRenderer","primetimePromoRenderer","ytd-primetime-promo-renderer");var TX=function(){var a=O.apply(this,arguments)||this;a.isPrimetimeRedesign=!1;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction"};return a}; p(TX,O);e=TX.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.requestElementsPerRow()}; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{primetimePromoPanelRenderer:"ytd-primetime-promo-panel-renderer",horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{useFloorScrolling:!0}}}},"data.panels":{id:"panels",mapping:{richItemRenderer:"ytd-rich-item-renderer"}},"data.header":{id:"header-contents",mapping:{primetimePromoHeaderRenderer:"ytd-primetime-promo-header-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}, "data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onDataChange=function(){var a=this;this.isPrimetimeRedesign=!!this.data&&!!this.data.panels;Polymer.RenderStatus.afterNextRender(this,function(){a.updateItemVisibility()})}; e.onUpdateElementsPerRowAction=function(a){a&&this.elementsPerRow!==a&&(this.elementsPerRow=a,this.updateItemVisibility())}; e.updateItemVisibility=function(){var a=this;this.data&&this.data.panels&&Polymer.dom(this.root).querySelectorAll("ytd-rich-item-renderer").forEach(function(b,c){b.hidden=c>a.elementsPerRow-1})}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; h.Object.defineProperties(TX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kbb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jbb){var d=document.createElement("template");d.innerHTML=""; jbb=d}d=jbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kbb=a}a=kbb;return a}}}); var UX=TX;UX.prototype.onDataChange=UX.prototype.onDataChange;w([P(Y),x("design:type",Object)],UX.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],UX.prototype,"ytdDismissableItemBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],UX.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],UX.prototype,"actionHandlerBehavior",void 0); w([R(),x("design:type",Object)],UX.prototype,"data",void 0);w([R({value:3}),x("design:type",Number)],UX.prototype,"elementsPerRow",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],UX.prototype,"isPrimetimeRedesign",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],UX.prototype,"onDataChange",null);UX=w([U({is:"ytd-primetime-promo-renderer"})],UX);var lbb;var mbb;var VX=function(){return O.apply(this,arguments)||this}; p(VX,O);VX.prototype.configureRendererStamper=function(){return{"data.filterMenu":{id:"filter-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{isRightAligned:!0}}}}}}; h.Object.defineProperties(VX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mbb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lbb){var d=document.createElement("template");d.innerHTML=""; lbb=d}d=lbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mbb=a}a=mbb;return a}}}); var WX=VX;w([P(Y),x("design:type",Object)],WX.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],WX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],WX.prototype,"data",void 0);WX=w([U({is:"ytd-sort-filter-header-renderer"})],WX);var nbb;var obb;var XX=function(){return O.apply(this,arguments)||this}; p(XX,O);XX.prototype.computeThumbnailStyle=function(a){if(a&&(a=dO(a)))return dc({"background-color":a})}; h.Object.defineProperties(XX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===obb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nbb){var d=document.createElement("template");d.innerHTML=""; nbb=d}d=nbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);obb=a}a=obb;return a}}}); var YX=XX;w([P(W.YtRendererBehavior),x("design:type",Object)],YX.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],YX.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],YX.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return fk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],YX.prototype,"prominentThumbStyle",void 0);YX=w([U({is:"ytd-hashtag-tile-renderer"})],YX);var pbb;var qbb;var ZX=function(){return O.apply(this,arguments)||this}; p(ZX,O);ZX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; h.Object.defineProperties(ZX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qbb){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pbb){var d=document.createElement("template");d.innerHTML=""; pbb=d}d=pbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qbb=a}a=qbb;return a}}}); var $X=ZX;w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],$X.prototype,"ytdDismissableItemBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],$X.prototype,"ytdLockupBehavior",void 0);w([P(Y),x("design:type",Object)],$X.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],$X.prototype,"ytRendererBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],$X.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],$X.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],$X.prototype,"data",void 0);$X=w([U({is:"ytd-compact-movie-renderer"})],$X);var rbb;var sbb;var tbb;var ubb;Polymer({is:"yt-copy-link-renderer",_template:function(){if(void 0!==ubb)return ubb;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tbb){var d=document.createElement("template");d.innerHTML=""; tbb=d}d=tbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ubb=a}, behaviors:[NO.YtActionHandlerBehavior,W.YtRendererBehavior],properties:{data:Object,rendererStyle:{type:String,reflectToAttribute:!0,computed:"computeStyle_(data.style)"}},listeners:{tap:"handleTap_"},actionMap:{"yt-share-panel-set-timestamp-action":"handleSetTimestamp_","yt-signal-action-copy-share-url":"handleSignalActionCopyShareUrl_"},handleSetTimestamp_:function(a){this.data&&this.data.shortUrl&&(this.$["share-url"].value=a.isSet?Kd(this.data.shortUrl,"t",a.timestamp):this.data.shortUrl)}, handleSignalActionCopyShareUrl_:function(){this.copyUrlToClipboard_()}, handleTap_:function(a){this.copyUrlToClipboard_();a.stopPropagation();a.preventDefault()}, copyUrlToClipboard_:function(){this.trackCopyUrl_();window.getSelection().removeAllRanges();this.$["share-url"].select();document.execCommand("copy")}, trackCopyUrl_:function(){this&&this.data&&this.data.copyButton&&this.data.copyButton.buttonRenderer&&this.logExplicitClick(this.data.copyButton.buttonRenderer)}, computeStyle_:function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}});iP("itemSectionRenderer","toggleFormFieldRenderer","yt-toggle-form-field-renderer"); Polymer({is:"yt-toggle-form-field-renderer",_template:function(){if(void 0!==sbb)return sbb;var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.label)]]
\n \n \n
\n\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rbb){var d=document.createElement("template");d.innerHTML=""; rbb=d}d=rbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return sbb=a}, behaviors:[NO.YtActionHandlerBehavior,Y,W.YtRendererBehavior],properties:{data:{type:Object,notify:!0},description_:{type:Boolean,computed:"computeDescription_(data.*)"},useKeyboardFocused:{type:Boolean,value:function(){return!!this.getInterface(eP)&&N("kevlar_keyboard_button_focus")}, reflectToAttribute:!0},keyboardFocused:{type:Boolean,value:!1,reflectToAttribute:!0}},stampDom:{"data.footer":{id:"footer-container",mapping:{copyLinkRenderer:"yt-copy-link-renderer"}}},actionMap:{"yt-update-toggle-action":"handleUpdateToggleAction_"},attached:function(){this.keyboardFocused=!1}, onToggleButtonFocusin_:function(){if(this.useKeyboardFocused){var a=this.getInterface(eP);a&&(this.keyboardFocused=a.isKeyBoardInUse())}}, onToggleButtonFocusout_:function(){this.keyboardFocused=!1}, computeDescription_:function(){if(this.data){if(this.data.toggled&&this.data.toggledDescription)return this.data.toggledDescription;if(!this.data.toggled&&this.data.description)return this.data.description}}, onChange_:function(){var a=this.data.toggled?this.data.toggleOnAction:this.data.toggleOffAction;a&&this.sendServiceRequestAction([a]);this.data.requireChangeConfirmation&&this.set("data.toggled",!this.data.toggled)}, handleUpdateToggleAction_:function(a){a&&a.updateToggleAction&&this.data&&(a=a.updateToggleAction,a.targetId==this.data.targetId&&this.set("data.toggled",a.toggled))}, toBoolean_:function(a){return!!a}, reset:function(){}});var vbb=document.createElement("template");vbb.innerHTML="";document.head.appendChild(vbb.content);var wbb;var xbb;var aY=function(){return O.apply(this,arguments)||this}; p(aY,O);aY.prototype.computeIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; h.Object.defineProperties(aY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xbb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wbb){var d=document.createElement("template");d.innerHTML=""; wbb=d}d=wbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xbb=a}a=xbb;return a}}}); var bY=aY;w([P(W.YtRendererBehavior),x("design:type",Object)],bY.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],bY.prototype,"data",void 0);bY=w([U({is:"ytd-limited-state-message-renderer"})],bY);var ybb;var zbb;var cY=function(){return O.apply(this,arguments)||this}; p(cY,O);cY.prototype.dataChanged=function(){this.data&&(this.data.impressionCommand&&this.data.impressionCommand.clickTrackingParams&&delete this.data.impressionCommand.clickTrackingParams,this.macroReplacementBehavior.sendServiceRequestAction([this.data.impressionCommand]),this.data.backgroundColor&&(this.enableColors=!0,this.style.backgroundColor=dO(this.data.backgroundColor)))}; cY.prototype.onHeadlineClick=function(){if(this.data&&this.data.headline){var a=this.getFormattedStringLoggingDirectives(this.data.headline);a&&this.rendererBehavior.logExplicitClick(a)}}; cY.prototype.onDescriptionClick=function(){if(this.data&&this.data.description){var a=this.getFormattedStringLoggingDirectives(this.data.description);a&&this.rendererBehavior.logExplicitClick(a)}}; cY.prototype.getFormattedStringLoggingDirectives=function(a){return a&&a.runs&&0\n\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ybb){var d=document.createElement("template");d.innerHTML=""; ybb=d}d=ybb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zbb=a}a=zbb;return a}}}); var dY=cY;dY.prototype.dataChanged=dY.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],dY.prototype,"rendererBehavior",void 0);w([P(vV.YtMacroReplacementBehavior),x("design:type",Object)],dY.prototype,"macroReplacementBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],dY.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],dY.prototype,"data",void 0);w([R(),x("design:type",Object)],dY.prototype,"navigationEndpoint",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],dY.prototype,"enableColors",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],dY.prototype,"dataChanged",null);dY=w([U({is:"ytd-action-basic-immersive-content-renderer"})],dY);var Abb;var Bbb;var eY=function(){return O.apply(this,arguments)||this}; p(eY,O);eY.prototype.configureRendererStamper=function(){return{"data.sitelinkRenderers":{id:"sitelinks",mapping:{sitelinkRenderer:"ytd-sitelink-renderer"}},"data.actionButton":{id:"action",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; eY.prototype.dataChanged=function(){var a=this;this.data&&this.data.impressionCommands&&this.data.impressionCommands.forEach(function(b){b.clickTrackingParams&&delete b.clickTrackingParams;a.ytMacroReplacementBehavior.sendServiceRequestAction([b])})}; eY.prototype.shouldHideFooter=function(a){return!(a&&N("use_ads_engagement_panel_desktop_footer_cta"))}; h.Object.defineProperties(eY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Bbb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Abb){var d=document.createElement("template");d.innerHTML=""; Abb=d}d=Abb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bbb=a}a=Bbb;return a}}}); var fY=eY;fY.prototype.dataChanged=fY.prototype.dataChanged;w([P(vV.YtMacroReplacementBehavior),x("design:type",Object)],fY.prototype,"ytMacroReplacementBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],fY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],fY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],fY.prototype,"data",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],fY.prototype,"dataChanged",null);fY=w([U({is:"ytd-action-engagement-panel-content-renderer"})],fY);var Cbb;var Dbb;var gY=function(){return O.apply(this,arguments)||this}; p(gY,O);gY.prototype.onSitelinkTap=function(){this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint});this.data&&this.data.clickCommands&&this.actionSenderBehavior.sendInnerTubeActions(this.data.clickCommands,this)}; h.Object.defineProperties(gY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Dbb){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Cbb){var d=document.createElement("template");d.innerHTML=""; Cbb=d}d=Cbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Dbb=a}a=Dbb;return a}}}); var hY=gY;w([P(V.YtActionSenderBehavior),x("design:type",Object)],hY.prototype,"actionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],hY.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],hY.prototype,"data",void 0);hY=w([U({is:"ytd-sitelink-renderer"})],hY);var Ebb;var Fbb;var iY=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-ad-engagement-panel-click-action":"handleAdsEngagementPanelClick"};return a}; p(iY,O);e=iY.prototype;e.configureRendererStamper=function(){return{"data.contentRenderer":{id:"content",mapping:{actionEngagementPanelContentRenderer:"ytd-action-engagement-panel-content-renderer",basicImmersiveEngagementPanelContentRenderer:"ytd-action-basic-immersive-content-renderer"}}}}; e.attached=function(){this.getDataFromPlayerAndRender()}; e.dataChanged=function(){this.getDataFromPlayerAndRender()}; e.detached=function(){this.player&&(this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"updateEngagementPanelAction",this.sendUpdateEngagementPanelAction),this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"changeEngagementPanelVisibility",this.sendChangeEngagementPanelVisibilityAction),this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"scrollToEngagementPanel",this.sendScrollToEngagementPanelCommand))}; e.getDataFromPlayerAndRender=function(){var a=this,b=ZM(this);b&&b.getPlayerPromise().then(function(c){a.getCachedDataAndListen(c)})}; e.getCachedDataAndListen=function(a){this.resolveCachedActions();this.player||(this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"updateEngagementPanelAction",this.sendUpdateEngagementPanelAction),this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"changeEngagementPanelVisibility",this.sendChangeEngagementPanelVisibilityAction),this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"scrollToEngagementPanel",this.sendScrollToEngagementPanelCommand),this.player=a)}; e.resolveCachedActions=function(){var a=Ja("yt.www.ads.eventcache.getLastUpdateEngagementPanelAction");(a=a&&a())&&!y.isEmpty(a)&&this.sendUpdateEngagementPanelAction(a);(a=(a=Ja("yt.www.ads.eventcache.getLastChangeEngagementPanelVisibilityAction"))&&a())&&!y.isEmpty(a)&&this.sendChangeEngagementPanelVisibilityAction(a);(a=(a=Ja("yt.www.ads.eventcache.getLastScrollToEngagementPanelCommand"))&&a())&&!y.isEmpty(a)&&this.sendScrollToEngagementPanelCommand(a)}; e.sendUpdateEngagementPanelAction=function(a){this.actionSenderBehavior.sendAction("yt-update-engagement-panel-action",[a])}; e.sendChangeEngagementPanelVisibilityAction=function(a){this.actionSenderBehavior.sendAction("yt-change-engagement-panel-visibility-action",[a])}; e.sendScrollToEngagementPanelCommand=function(a){this.actionSenderBehavior.sendAction("yt-scroll-to-engagement-panel-command",[a])}; e.handleAdsEngagementPanelClick=function(){if(this.player)this.player.onAdUxClicked("ads-engagement-panel");else vm(Error("Missing player in YtdAdsEngagementPanelContentRenderer."))}; h.Object.defineProperties(iY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Fbb){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ebb){var d=document.createElement("template");d.innerHTML="";Ebb=d}d=Ebb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);Fbb=a}a=Fbb;return a}}}); var jY=iY;jY.prototype.dataChanged=jY.prototype.dataChanged;w([P(V.YtActionSenderBehavior),x("design:type",Object)],jY.prototype,"actionSenderBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],jY.prototype,"actionHandlerBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],jY.prototype,"componentBehavior",void 0);w([P(cQ),x("design:type",Object)],jY.prototype,"ytPlayerListenerBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],jY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],jY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],jY.prototype,"data",void 0);w([R(),x("design:type",Object)],jY.prototype,"player",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],jY.prototype,"dataChanged",null);jY=w([U({is:"ytd-ads-engagement-panel-content-renderer"})],jY);var Gbb;var Hbb;var kY=function(){return O.apply(this,arguments)||this}; p(kY,O);e=kY.prototype; e.onKeyDown=function(a){if(0!==this.snippetElements.length&&(a=a.keyCode,38===a||40===a)){0<=this.highlightedIndex&&this.removeSnippetHighlight(this.snippetElements[this.highlightedIndex]);38===a?this.highlightedIndex--:this.highlightedIndex++;this.highlightedIndex=Uf(this.highlightedIndex,-1,this.snippetElements.length);a=this.snippetElements.length;var b=this.highlightedIndex%a;this.highlightedIndex=0>b*a?b+a:b;a=this.snippetElements[this.highlightedIndex];this.highlightSnippet(a);this.ensureVisible(a)}}; e.onKeyUp=function(a){var b=this;fBa(a)&&(13===a.keyCode?(this.selectSnippet(this.snippetElements[this.highlightedIndex]),this.inputElement.blur()):this.filterSnippets(this.snippets,this.typedValue),this.inputTimerId&&Bk.cancelJob(this.inputTimerId),this.inputTimerId=yk(Bk,function(){b.typedValue&&(b.fetchSnippets(b.typedValue),b.logInputGesture(b.data))},1E3))}; e.onClick=function(a){(a=Ng(a.target,"snippet-item"))&&this.selectSnippet(a)}; e.panelContentVisibleChanged=function(){this.panelContentVisible&&this.inputElement.focus()}; e.created=function(){this.ytActionHandlerBehavior.actionMap={"yt-update-search-in-video-results-action":"onUpdateSearchInVideoResults"}}; e.ready=function(){var a=this;this.inputElement.addEventListener("focus",function(){a.snippetsWrapper.style.removeProperty("display")})}; e.dataChanged=function(){this.typedValue="";this.snippets=[];this.fetchSnippets("")}; e.fetchSnippets=function(a){a={getSearchInVideoCommand:{externalVideoId:this.ytActionSenderBehavior.sendAction("yt-get-current-video-id-action")[0],query:null!==a&&void 0!==a?a:""},commandMetadata:{webCommandMetadata:{apiUrl:"/youtubei/v1/in_video/search",sendPost:!0,url:"/service_ajax"}}};this.ytActionSenderBehavior.sendServiceRequestAction([a])}; e.filterSnippets=function(a,b){var c=this;if(b){this.filteredSnippets=y.unsafeClone(a);var d=RegExp(Bba(b),"i");this.filteredSnippets=this.filteredSnippets.filter(function(l){return d.test(c.ytRendererBehavior.getSimpleString(l.snippet))}); a=k(this.filteredSnippets);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=this.ytRendererBehavior.getSimpleString(f.snippet);f.snippet={runs:[{text:g.substring(0,g.toLowerCase().indexOf(b))},{text:g.substring(g.toLowerCase().indexOf(b),g.toLowerCase().indexOf(b)+b.length),bold:!0},{text:g.substring(g.toLowerCase().indexOf(b)+b.length,g.length)}]}}}else this.filteredSnippets=a}; e.onUpdateSearchInVideoResults=function(a){var b,c,d,f;0c&&(this.snippetsWrapper.scrollTop+=a-c)}; e.seekPlayer=function(a){return Ya(this,function c(){var d,f=this,g;return ya(c,function(l){if(1==l.nextAddress){if(!a)return l.jumpTo(0);d=Number(a.dataset.startOffset);return q(l,aN(f).getPlayerPromise(),3)}g=l.yieldResult;g.seekTo(d/1E3,!0);g.wakeUpControls();oa(l)})})}; e.logInputGesture=function(a){var b=On();b&&(null===a||void 0===a?0:a.trackingParams)&&mNa(b,In(a.trackingParams),"INTERACTION_LOGGING_GESTURE_TYPE_INPUT_TEXT")}; h.Object.defineProperties(kY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hbb){var a=document.createElement("template");a.innerHTML="\n \n \n\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gbb){var d=document.createElement("template");d.innerHTML=""; Gbb=d}d=Gbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hbb=a}a=Hbb;return a}}}); var lY=kY;lY.prototype.panelContentVisibleChanged=lY.prototype.panelContentVisibleChanged;lY.prototype.onClick=lY.prototype.onClick;lY.prototype.onKeyUp=lY.prototype.onKeyUp;lY.prototype.onKeyDown=lY.prototype.onKeyDown;w([P(W.YtRendererBehavior),x("design:type",Object)],lY.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],lY.prototype,"ytActionHandlerBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],lY.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],lY.prototype,"data",void 0);w([R({value:[]}),x("design:type",Array)],lY.prototype,"snippets",void 0);w([R({value:[]}),x("design:type",Array)],lY.prototype,"filteredSnippets",void 0);w([R({value:[]}),x("design:type",Array)],lY.prototype,"snippetElements",void 0);w([AE("#siv-input"),x("design:type",HTMLElement)],lY.prototype,"inputElement",void 0); w([AE("#siv-snippets-wrapper"),x("design:type",HTMLElement)],lY.prototype,"snippetsWrapper",void 0);w([R({notify:!0}),x("design:type",String)],lY.prototype,"typedValue",void 0);w([R({value:-1}),x("design:type",Number)],lY.prototype,"highlightedIndex",void 0);w([S("keydown"),x("design:type",Function),x("design:paramtypes",[ii]),x("design:returntype",void 0)],lY.prototype,"onKeyDown",null); w([S("keyup"),x("design:type",Function),x("design:paramtypes",[ii]),x("design:returntype",void 0)],lY.prototype,"onKeyUp",null);w([S("click"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],lY.prototype,"onClick",null);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],lY.prototype,"panelContentVisible",void 0); w([yE("panelContentVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],lY.prototype,"panelContentVisibleChanged",null);lY=w([U({is:"ytd-search-in-video-renderer"})],lY);var Ibb;var Jbb;var Kbb=function(){return O.apply(this,arguments)||this}; p(Kbb,O); h.Object.defineProperties(Kbb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jbb){var a=document.createElement("template");a.innerHTML="

[[getSimpleString(data.title)]]

[[data.brandName]]
[[getSimpleString(data.ctaText)]]
";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ibb){var d=document.createElement("template");d.innerHTML=""; Ibb=d}d=Ibb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jbb=a}a=Jbb;return a}}}); var mY=Kbb;w([P(W.YtRendererBehavior),x("design:type",Object)],mY.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],mY.prototype,"data",void 0);mY=w([U({is:"ytd-product-list-item-renderer"})],mY);var Lbb;var Mbb;var nY=function(){return O.apply(this,arguments)||this}; p(nY,O);nY.prototype.created=function(){this.ytRendererBehavior.monitorScroll=!0}; nY.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{productListItemRenderer:"ytd-product-list-item-renderer"}}}}; nY.prototype.attached=function(){return Ya(this,function b(){var c=this;return ya(b,function(d){if(1==d.nextAddress)return q(d,aN(c).getPlayerPromise(),2);c.playerApi=d.yieldResult;oa(d)})})}; nY.prototype.panelContentVisibleChanged=function(a){var b;null===(b=this.playerApi)||void 0===b?void 0:b.productsInVideoVisibilityUpdated(a);!N("products_in_video_overlay_include_scroll_to_ep_command")&&a&&this.ytActionSenderBehavior.sendAction("yt-scroll-to-watch-columns")}; h.Object.defineProperties(nY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mbb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lbb){var d=document.createElement("template");d.innerHTML=""; Lbb=d}d=Lbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mbb=a}a=Mbb;return a}}}); var oY=nY;w([P(W.YtRendererBehavior),x("design:type",Object)],oY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],oY.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],oY.prototype,"ytActionSenderBehavior",void 0);w([R({reflectToAttribute:!0,observer:"panelContentVisibleChanged"}),x("design:type",Boolean)],oY.prototype,"panelContentVisible",void 0);w([R(),x("design:type",Object)],oY.prototype,"data",void 0); oY=w([U({is:"ytd-product-list-renderer"})],oY);var Nbb;var Obb;var pY=function(){var a=O.apply(this,arguments)||this;a.hideTimestamps=!!rK("hide-transcript-timestamps");a.panel=N("kevlar_transcript_engagement_panel");a.refresh=N("kevlar_transcript_panel_refreshed_styles");a.currentCueIndex_=-1;a.flatCues_=[];a.actionMap={"yt-signal-action-toggle-transcript-timestamps":"handleSignalActionToggleTranscriptTimestamps_","yt-player-time-changed":"onYtPlayerTimeChanged_"};return a}; p(pY,O);e=pY.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.hideTimestampsChanged_=function(a){qK("hide-transcript-timestamps",a)}; e.toggleTranscriptTimestampAction_=function(){this.hideTimestamps=!this.hideTimestamps}; e.handleSignalActionToggleTranscriptTimestamps_=function(){this.toggleTranscriptTimestampAction_()}; e.dataChanged_=function(a){var b=this;a&&a.cueGroups&&(this.flatCues_.length=0,this.currentCueIndex_=-1,a.cueGroups.forEach(function(c){c.transcriptCueGroupRenderer.cues.forEach(function(d){b.flatCues_.push(parseInt(d.transcriptCueRenderer.startOffsetMs,10))})}))}; e.onYtPlayerTimeChanged_=function(a){if(!(0>a)){for(var b=this.currentCueIndex_,c=b;;){var d=0<=c?this.flatCues_[c]/1E3:-1;if(a+.5d)c+=1;else break}c!=b&&(0<=b&&((a=this.getCueElement_(b))&&a.classList.remove("active"),(b=this.getCueGroupElement_(b))&&b.classList.remove("active")),(b=this.getCueElement_(c))&&b.classList.add("active"),(b=this.getCueGroupElement_(c))&&b.classList.add("active"),this.currentCueIndex_=c,this.isHovered_|| this.scrollElementToTop_(c))}}; e.scrollElementToTop_=function(a){a=this.getCueElement_(3<=a?a-3:0);this.scrollTop=Math.min(a.offsetTop-this.offsetTop,this.scrollHeight-this.offsetHeight)}; e.getCueElement_=function(a){return this.$$(".cue[start-offset=\""+this.flatCues_[a]+"\"]")}; e.getCueGroupElement_=function(a){return(a=this.getCueElement_(a))&&a.parentElement?a.parentElement.parentElement:null}; e.onTap_=function(a){var b=Polymer.dom(a).rootTarget;a.target.classList.contains("cue")&&this.seekCueElement_(b)}; e.onKeyPress_=function(a){13==a.keyCode&&(a=Ng(a.target,"cue"))&&this.seekCueElement_(a)}; e.seekCueElement_=function(a){a=parseInt(a.getAttribute("start-offset"),10);this.ytActionSenderBehavior.sendAction("yt-transcript-player-seek",[a/1E3])}; e.onMouseEnter_=function(){this.isHovered_=!0}; e.onMouseLeave_=function(){this.isHovered_=!1}; h.Object.defineProperties(pY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Obb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nbb){var d=document.createElement("template");d.innerHTML=""; Nbb=d}d=Nbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Obb=a}a=Obb;return a}}}); var qY=pY;qY.prototype.onMouseLeave_=qY.prototype.onMouseLeave_;qY.prototype.onMouseEnter_=qY.prototype.onMouseEnter_;qY.prototype.onKeyPress_=qY.prototype.onKeyPress_;qY.prototype.onTap_=qY.prototype.onTap_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],qY.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],qY.prototype,"ytRendererBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],qY.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],qY.prototype,"data",void 0);w([R({observer:"hideTimestampsChanged_",reflectToAttribute:!0}),x("design:type",Object)],qY.prototype,"hideTimestamps",void 0);w([R(),x("design:type",Boolean)],qY.prototype,"isHovered_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],qY.prototype,"panel",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],qY.prototype,"refresh",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],qY.prototype,"onTap_",null);w([S("keypress"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],qY.prototype,"onKeyPress_",null);w([S("mouseenter"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],qY.prototype,"onMouseEnter_",null); w([S("mouseleave"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],qY.prototype,"onMouseLeave_",null);qY=w([U({is:"ytd-transcript-body-renderer"})],qY);var Pbb;var Qbb;var rY=function(){return O.apply(this,arguments)||this}; p(rY,O);rY.prototype.configureRendererStamper=function(){return{"data.languageMenu":{id:"menu",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}}}}; h.Object.defineProperties(rY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qbb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pbb){var d=document.createElement("template");d.innerHTML=""; Pbb=d}d=Pbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qbb=a}a=Qbb;return a}}}); var sY=rY;w([P(W.YtRendererBehavior),x("design:type",Object)],sY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],sY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],sY.prototype,"data",void 0);sY=w([U({is:"ytd-transcript-footer-renderer"})],sY);var Rbb;var Sbb;var tY=function(){return O.apply(this,arguments)||this}; p(tY,O);tY.prototype.configureRendererStamper=function(){return{"data.overflowMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"close",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(tY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Sbb){var a=document.createElement("template");a.innerHTML="

\n [[getSimpleString(data.formattedTitle)]]\n

\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rbb){var d=document.createElement("template");d.innerHTML=""; Rbb=d}d=Rbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Sbb=a}a=Sbb;return a}}}); var uY=tY;w([P(W.YtRendererBehavior),x("design:type",Object)],uY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],uY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],uY.prototype,"data",void 0);uY=w([U({is:"ytd-transcript-header-renderer"})],uY);var Tbb;var Ubb;var vY=function(){var a=O.apply(this,arguments)||this;a.player=null;a.playerPollJobId=0;return a}; p(vY,O);e=vY.prototype;e.panelContentVisibleChanged=function(){this.updatePlayerPolling()}; e.onLoadReloadContinuation=function(a){N("kevlar_transcript_engagement_panel")&&this.ytActionSenderBehavior.sendServiceRequestAction([{clickTrackingParams:a.target.data.clickTrackingParams,getTranscriptEndpoint:{params:a.target.data.continuation},commandMetadata:{webCommandMetadata:{apiUrl:"/youtubei/v1/get_transcript",sendPost:!0,url:"/service_ajax"}}}])}; e.configureRendererStamper=function(){return{"data.footer":{id:"footer",mapping:{transcriptFooterRenderer:"ytd-transcript-footer-renderer"}},"data.body":{id:"body",mapping:{transcriptBodyRenderer:"ytd-transcript-body-renderer"}},"data.header":{id:"header",mapping:{transcriptHeaderRenderer:"ytd-transcript-header-renderer"}}}}; e.created=function(){N("kevlar_transcript_engagement_panel")&&(this.ytActionHandlerBehavior.actionMap={"yt-transcript-player-seek":"onYtTranscriptPlayerSeek"})}; e.attached=function(){N("kevlar_transcript_engagement_panel")&&this.updatePlayerPolling()}; e.detached=function(){N("kevlar_transcript_engagement_panel")&&this.updatePlayerPolling()}; e.updatePlayerPolling=function(){this.isAttached&&this.panelContentVisible?(this.player&&this.stopPollingPlayerTime(),this.startPollingPlayerTime()):this.stopPollingPlayerTime()}; e.startPollingPlayerTime=function(){return Ya(this,function b(){var c=this,d;return ya(b,function(f){if(1==f.nextAddress)return(d=ZM(c))?q(f,d.getPlayerPromise(),2):f.return();c.player=f.yieldResult;c.playerPollJobId=yk(Bk,c.getPlayerVideoProgress.bind(c),1E3);oa(f)})})}; e.getPlayerVideoProgress=function(){Bk.cancelJob(this.playerPollJobId);if(this.player){var a=this.player.getCurrentTime();this.ytActionSenderBehavior.sendAction("yt-player-time-changed",[a])}this.playerPollJobId=yk(Bk,this.getPlayerVideoProgress.bind(this),1E3)}; e.stopPollingPlayerTime=function(){this.player=null;Bk.cancelJob(this.playerPollJobId)}; e.onYtTranscriptPlayerSeek=function(a){this.player&&this.player.seekTo(a,!0)}; h.Object.defineProperties(vY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ubb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tbb){var d=document.createElement("template");d.innerHTML=""; Tbb=d}d=Tbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ubb=a}a=Ubb;return a}}}); var wY=vY;wY.prototype.onLoadReloadContinuation=wY.prototype.onLoadReloadContinuation;wY.prototype.panelContentVisibleChanged=wY.prototype.panelContentVisibleChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],wY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],wY.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],wY.prototype,"ytActionHandlerBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],wY.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],wY.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:N("kevlar_transcript_engagement_panel")}),x("design:type",Boolean)],wY.prototype,"panel",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_transcript_panel_refreshed_styles")}}), x("design:type",Boolean)],wY.prototype,"refresh",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],wY.prototype,"panelContentVisible",void 0);w([yE("panelContentVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],wY.prototype,"panelContentVisibleChanged",null);w([S("yt-load-reload-continuation"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],wY.prototype,"onLoadReloadContinuation",null); wY=w([U({is:"ytd-transcript-renderer"})],wY);var Vbb;var Wbb;var xY=function(){return O.apply(this,arguments)||this}; p(xY,O);xY.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!1}}}}}}; h.Object.defineProperties(xY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wbb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n \n
\n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vbb){var d=document.createElement("template");d.innerHTML=""; Vbb=d}d=Vbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wbb=a}a=Wbb;return a}}}); var yY=xY;w([P(W.YtRendererBehavior),x("design:type",Object)],yY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],yY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],yY.prototype,"data",void 0);yY=w([U({is:"ytd-media-upsell-renderer"})],yY);var Xbb;var Ybb;var zY=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-change-engagement-panel-visibility-action":"onYtChangeEngagementPanelVisibilityAction","yt-scroll-to-engagement-panel-command":"onYtScrollToEngagementPanelCommand","yt-update-engagement-panel-action":"onYtUpdateEngagementPanelAction","yt-show-engagement-panel-scrim-action":"onYtShowEngagementPanelScrimAction","yt-hide-engagement-panel-scrim-action":"onYtHideEngagementPanelScrimAction"};return a}; p(zY,O);e=zY.prototype; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{engagementPanelTitleHeaderRenderer:"ytd-engagement-panel-title-header-renderer"},events:!0},"data.content":{id:"content",mapping:{continuationItemRenderer:"ytd-continuation-item-renderer",transcriptRenderer:"ytd-transcript-renderer",clipSectionRenderer:"yt-clip-section-renderer",adsEngagementPanelContentRenderer:"ytd-ads-engagement-panel-content-renderer",macroMarkersListRenderer:"ytd-macro-markers-list-renderer",searchInVideoRenderer:"ytd-search-in-video-renderer", mediaUpsellRenderer:"ytd-media-upsell-renderer",productListRenderer:"ytd-product-list-renderer"},events:!0}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.onYtRendererstamperFinished=function(){var a;this.updateChildVisibilityProperties();if(null===(a=this.data)||void 0===a?0:a.targetId){var b=this.$.content.firstElementChild;b&&b.setAttribute("panel-target-id",this.data.targetId)}}; e.dataChanged=function(a){this.visibility=a&&a.visibility}; e.visibilityChanged=function(a,b){var c,d;this.updateChildVisibilityProperties();var f="ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"===a,g=b&&"ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"!==b;(null===(c=this.data)||void 0===c?0:c.onShowCommands)&&a&&"ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"!==a&&(!b||"ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"===b)?this.actionSenderBehavior.sendInnerTubeActions(this.data.onShowCommands,this):(null===(d=this.data)||void 0===d?0:d.onHideCommands)&&f&&g&&this.actionSenderBehavior.sendInnerTubeActions(this.data.onHideCommands, this)}; e.updateChildVisibilityProperties=function(){var a=this.visibility,b=this.$.header.firstElementChild;if(b){var c="ENGAGEMENT_PANEL_VISIBILITY_COLLAPSED"===a;b.collapsed=c;(b=b.$["visibility-button"].firstElementChild)&&"ytd-toggle-button-renderer"===b.is&&b.data.isToggled!==c&&b.set("data.isToggled",c)}if(c=this.$.content.firstElementChild)a&&"ENGAGEMENT_PANEL_VISIBILITY_EXPANDED"!==a?c.removeAttribute("panel-content-visible"):(c.setAttribute("panel-content-visible",""),c.markDirty())}; e.onYtChangeEngagementPanelVisibilityAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.changeEngagementPanelVisibilityAction;c&&(null===a||void 0===a?void 0:a.targetId)===c&&(this.visibility=a.visibility)}; e.onYtScrollToEngagementPanelCommand=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.scrollToEngagementPanelCommand;c&&(null===a||void 0===a?void 0:a.targetId)===c&&"ENGAGEMENT_PANEL_VISIBILITY_EXPANDED"===this.visibility&&(N("enable_scroll_to_ep_minimal_scrolling")?this.actionSenderBehavior.sendAction("yt-scroll-to-watch-element",[this]):this.actionSenderBehavior.sendAction("yt-scroll-to-watch-columns"))}; e.onYtUpdateEngagementPanelAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.updateEngagementPanelAction;c&&(null===a||void 0===a?void 0:a.targetId)===c&&((null===a||void 0===a?0:a.header)&&this.set("data.header",a.header),(null===a||void 0===a?0:a.content)&&this.set("data.content",a.content),this.updateChildVisibilityProperties())}; e.onYtShowEngagementPanelScrimAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.showEngagementPanelScrimAction;c&&(null===a||void 0===a?void 0:a.engagementPanelTargetId)===c&&(this.scrimmed=!0)}; e.onYtHideEngagementPanelScrimAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.hideEngagementPanelScrimAction;c&&(null===a||void 0===a?void 0:a.engagementPanelTargetId)===c&&(this.scrimmed=!1)}; h.Object.defineProperties(zY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ybb){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xbb){var d=document.createElement("template");d.innerHTML=""; Xbb=d}d=Xbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ybb=a}a=Ybb;return a}}}); var AY=zY;AY.prototype.onYtRendererstamperFinished=AY.prototype.onYtRendererstamperFinished;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],AY.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],AY.prototype,"actionSenderBehavior",void 0);w([P(Y),x("design:type",Object)],AY.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],AY.prototype,"data",void 0); w([R({reflectToAttribute:!0,observer:"visibilityChanged"}),x("design:type",Object)],AY.prototype,"visibility",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],AY.prototype,"scrimmed",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],AY.prototype,"onYtRendererstamperFinished",null);AY=w([U({is:"ytd-engagement-panel-section-list-renderer"})],AY);var Zbb;var $bb;var BY=function(){return O.apply(this,arguments)||this}; p(BY,O);BY.prototype.onTap=function(){this.data&&(this.data.navigationEndpoint&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}),this.data.clickCommand&&this.actionSenderBehavior.sendInnerTubeActions([this.data.clickCommand],this))}; BY.prototype.computeHideMediaQuery=function(){return"(min-width: 600px) and (max-width: "+(EN()+1E3)+"px)"}; h.Object.defineProperties(BY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$bb){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zbb){var d=document.createElement("template");d.innerHTML=""; Zbb=d}d=Zbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$bb=a}a=$bb;return a}}}); var CY=BY;w([P(V.YtActionSenderBehavior),x("design:type",Object)],CY.prototype,"actionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],CY.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],CY.prototype,"data",void 0);w([R(),x("design:type",Boolean)],CY.prototype,"shouldHide",void 0);CY=w([U({is:"ytd-ad-engagement-panel-banner-renderer"})],CY);var acb;var bcb;var DY=function(){return O.apply(this,arguments)||this}; p(DY,O);DY.prototype.computeHideDefaultAdBadge=function(a,b){return this.data&&!this.data.badges||b}; h.Object.defineProperties(DY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bcb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===acb){var d=document.createElement("template");d.innerHTML=""; acb=d}d=acb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bcb=a}a=bcb;return a}}}); var EY=DY;w([R(),x("design:type",Object)],EY.prototype,"data",void 0);w([R({value:function(){return N("enable_basic_immersive_desktop_color_extraction")}}), x("design:type",Boolean)],EY.prototype,"useCustomAdBadge",void 0);w([R({value:function(){return mL("AD_BADGE_TEXT",void 0,"Ad")}}), x("design:type",String)],EY.prototype,"adBadgeText",void 0);w([R({computed:"computeHideDefaultAdBadge(data, useCustomAdBadge)"}),x("design:type",Boolean)],EY.prototype,"hideDefaultAdBadge",void 0);EY=w([U({is:"ytd-engagement-panel-ad-subtitle-renderer"})],EY);var ccb;var dcb;var FY=function(){return O.apply(this,arguments)||this}; p(FY,O);e=FY.prototype; e.configureRendererStamper=function(){return{"data.visibilityButton":{id:"visibility-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.subtitleComplex":{id:"subtitle-complex",mapping:{engagementPanelAdSubtitleRenderer:"ytd-engagement-panel-ad-subtitle-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.informationButton":{id:"information-button", mapping:{buttonRenderer:"ytd-button-renderer"}},"data.banner":{id:"banner",mapping:{adEngagementPanelBannerRenderer:"ytd-ad-engagement-panel-banner-renderer"}}}}; e.dataChanged_=function(a){a&&a.backgroundColor&&N("enable_basic_immersive_desktop_color_extraction")?(this.disableDefaultColors=!0,this.$.header.style.backgroundColor=dO(a.backgroundColor)):this.disableDefaultColors=!1}; e.onHeaderClick_=function(a){this.shouldTriggerHeaderClick_(a)&&this.data&&(this.data.navigationEndpoint||this.data.onClickCommand?(this.data.navigationEndpoint&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}),this.data.onClickCommand&&this.ytActionSenderBehavior.sendInnerTubeActions([this.data.onClickCommand],this)):(a=this.getVisibilityToggleButton_())&&a.click())}; e.onVisibilityButtonClick_=function(){if(this.data&&this.data.visibilityButton){var a=this.data.visibilityButton.buttonRenderer||this.data.visibilityButton.toggleButtonRenderer;a&&this.ytRendererBehavior.logExplicitClick(a)}}; e.getVisibilityToggleButton_=function(){var a=this.$["visibility-button"].firstElementChild;return a&&"ytd-toggle-button-renderer"==a.is?a:null}; e.shouldTriggerHeaderClick_=function(a){return!RR(Polymer.dom(a).path||[],this,["YTD-MENU-RENDERER","YTD-BUTTON-RENDERER","YTD-TOGGLE-BUTTON-RENDERER"])}; h.Object.defineProperties(FY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dcb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n

\n \n

\n
\n
\n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ccb){var d=document.createElement("template");d.innerHTML=""; ccb=d}d=ccb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dcb=a}a=dcb;return a}}}); var GY=FY;w([P(V.YtActionSenderBehavior),x("design:type",Object)],GY.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],GY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],GY.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],GY.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],GY.prototype,"disableDefaultColors",void 0); GY=w([U({is:"ytd-engagement-panel-title-header-renderer"})],GY);var ecb;var fcb;var HY=function(){var a=O.apply(this,arguments)||this;a.active=!1;return a}; p(HY,O);HY.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; HY.prototype.onEndpointClick=function(){this.data&&this.ytRendererBehavior.logExplicitClick(this.data)}; h.Object.defineProperties(HY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fcb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.timeDescription)]]
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ecb){var d=document.createElement("template");d.innerHTML=""; ecb=d}d=ecb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fcb=a}a=fcb;return a}}}); var IY=HY;w([P(W.YtRendererBehavior),x("design:type",Object)],IY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],IY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],IY.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],IY.prototype,"active",void 0);IY=w([U({is:"ytd-macro-markers-list-item-renderer"})],IY);var gcb;var hcb;var JY=function(){var a=O.apply(this,arguments)||this;a.browsingMode=!1;a.actionMap={"yt-set-active-panel-item-action":"handleSetActivePanelItemAction"};return a}; p(JY,O);e=JY.prototype;e.created=function(){var a=this;this.scrollAnimation=new KL(function(b){a.$.contents.scrollTop=b}); this.boundExitBrowsingMode=this.exitBrowsingMode.bind(this)}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.detached=function(){this.removePlayerSeekListener()}; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{macroMarkersListItemRenderer:"ytd-macro-markers-list-item-renderer"}}}}; e.dataChanged=function(){this.exitBrowsingMode()}; e.computeSyncEnabled=function(a){return!(null===a||void 0===a||!a.syncButtonLabel)}; e.getItemByIndex=function(a){return this.$.contents.children[a]}; e.setActiveItem=function(a){this.currentActiveItem&&(this.currentActiveItem.active=!1);a.active=!0;this.currentActiveItem=a}; e.handleSetActivePanelItemAction=function(a){(a=a.setActivePanelItemAction)&&this.panelTargetId===a.panelTargetId&&(a=this.getItemByIndex(a.itemIndex),this.setActiveItem(a),!this.browsingMode&&this.panelContentVisible&&this.scrollToItem(a))}; e.scrollToItem=function(a){a=this.getScrollPositionForItem(a);var b=this.$.contents;b.scrollTop!==a&&this.scrollAnimation.start(b.scrollTop,a,300)}; e.getScrollPositionForItem=function(a){var b=this.$.contents;a=vh(a).y+b.scrollTop-vh(b).y;return Math.min(a,b.scrollHeight-b.offsetHeight)}; e.onScroll=function(){this.ytRendererBehavior.markDirty();var a=this.$.contents;this.syncEnabled&&!this.browsingMode&&this.currentActiveItem&&!this.scrollAnimation.isAnimating_&&10
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gcb){var d=document.createElement("template");d.innerHTML=""; gcb=d}d=gcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hcb=a}a=hcb;return a}}}); var KY=JY;KY.prototype.dataChanged=KY.prototype.dataChanged;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],KY.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],KY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],KY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],KY.prototype,"data",void 0);w([R({computed:"computeSyncEnabled(data)"}),x("design:type",Boolean)],KY.prototype,"syncEnabled",void 0); w([R({reflectToAttribute:!0}),x("design:type",String)],KY.prototype,"panelTargetId",void 0);w([R({reflectToAttribute:!0,observer:"panelContentVisibleChanged"}),x("design:type",Boolean)],KY.prototype,"panelContentVisible",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],KY.prototype,"browsingMode",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],KY.prototype,"dataChanged",null);KY=w([U({is:"ytd-macro-markers-list-renderer"})],KY);var icb;var jcb;Polymer({is:"yt-clip-attribution-renderer",_template:function(){if(void 0!==jcb)return jcb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n
\n [[getSimpleString(data.clipAuthor)]]\n
\n
\n [[getSimpleString(data.createdText)]]\n
\n
\n
\n
\n [[getSimpleString(data.title)]]\n
\n [[getSimpleString(data.viewCount)]]\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===icb){var d=document.createElement("template");d.innerHTML=""; icb=d}d=icb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return jcb=a}, properties:{data:Object},behaviors:[yO.YtRendererStamperBehavior,V.YtActionSenderBehavior,W.YtRendererBehavior,cQ],stampDom:{"data.authorBadges":{id:"badges",mapping:{}},"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.returnToVideo":{id:"under",mapping:{buttonRenderer:"yt-button-renderer"}}},created:function(){this.player_=null;this.playerEvents_=new Map([["onLoopRangeChange",this.onLoopRangeChange_]])}, attached:function(){var a=this;ZM(this).getPlayerPromise().then(function(b){a.setPlayer_(b)})}, setPlayer_:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.playerEvents_);this.set("player_",a);a&&this.listenToPlayerEvents(a,this.playerEvents_)}, onLoopRangeChange_:function(a){!a&&this.data.onScrubExit&&this.sendInnerTubeActions([this.data.onScrubExit],this)}});var kcb;var lcb;Polymer({is:"yt-clip-ad-state-renderer",_template:function(){if(void 0!==lcb)return lcb;var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.title)]]
\n
[[getSimpleString(data.body)]]
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kcb){var d=document.createElement("template");d.innerHTML=""; kcb=d}d=kcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return lcb=a}, properties:{data:Object},behaviors:[W.YtRendererBehavior]});var mcb;var ncb;function ocb(a,b,c,d){a=Math.max(c,a);b=Math.min(b,d-c);a+b>d?(c=d,a=c-b):c=a+b;return{start:a,end:c}} function pcb(a,b,c,d,f,g){ad&&(a=d-f);b>d&&(b=d);b=Math.min(a+g,Math.max(a+f,b));return{start:a,end:b}} function qcb(a,b,c,d,f,g){b>d?b=d:b-f\n";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);return ucb=a}, properties:{start:{type:Number,value:0},end:{type:Number,value:30},visible:{type:Boolean,value:!1},player_:{type:Object},tickSpacing:{type:Number},windowSizeSec:{type:Number},rulerWidth:{type:Number,value:0},rulerShift:{type:Number,value:0},canvasReady_:{type:Boolean,value:!1},storyboardImages_:{type:Array,value:function(){return[]}}, disabled:{type:Boolean,value:!1,reflectToAttribute:!0},forceRender_:{type:Number,value:0},devicePixelRatio_:{type:Number,value:0}},behaviors:[NO.YtActionHandlerBehavior,W.YtRendererBehavior],observers:["drawRuler_(visible, canvasReady_, player_, tickSpacing, windowSizeSec, rulerShift, start, end, storyboardImages_.*, forceRender_, disabled)","setUpCanvas_(visible, devicePixelRatio_, rulerWidth)"],actionMap:{"yt-dark-mode-toggled-action":"onDarkModeToggled_","yt-clip-creation-enable":"onClipCreationEnable_"}, created:function(){this.pendingStoryboardImages_={};this.pixelRatioBreakpoints_=["1dppx","1.5dppx","2dppx","3dppx"];this.tickLabelInterval=15;this.mediumTickInterval=5;this.largeTickInterval=15;this.aboveRulerHeight=28;this.rulerHeight=50;this.smallTickHeight=4;this.mediumTickHeight=8;this.largeTickHeight=16}, attached:function(){var a=this;ZM(this).getPlayerPromise().then(function(b){a.setPlayer(b)}); this.updatePixelRatio_();this.pixelRatioBreakpoints_.forEach(function(b){window.matchMedia("screen and (min-resolution: "+b+")").addListener(function(){return a.updatePixelRatio_()}); window.matchMedia("screen and (max-resolution: "+b+")").addListener(function(){return a.updatePixelRatio_()})})}, detached:function(){var a=this;this.setPlayer(null);this.pixelRatioBreakpoints_.forEach(function(b){window.matchMedia("screen and (min-resolution: "+b+")").removeListener(function(){return a.updatePixelRatio_()}); window.matchMedia("screen and (max-resolution: "+b+")").removeListener(function(){return a.updatePixelRatio_()})}); this.storyboardImages_&&this.splice("storyboardImages_",0,this.storyboardImages_.length)}, setPlayer:function(a){a&&this.set("player_",a)}, updatePixelRatio_:function(){this.set("devicePixelRatio_",Math.max(1,window.devicePixelRatio))}, setUpCanvas_:function(a,b,c){this.set("canvasReady_",!1);a&&0!==b&&(a=this.$.ticks,a.width=c*b,a.height=78*b,a.style.width=this.rulerWidth_+"px",a.style.height="78px",a.getContext("2d").scale(b,b),this.set("canvasReady_",!0))}, drawRuler_:function(a,b,c,d,f,g,l,m){a&&c&&b&&(a=this.$.ticks,b=a.getContext("2d"),b.clearRect(0,0,a.width,a.height),b.strokeStyle=this.getComputedStyleValue("--yt-spec-10-percent-layer"),b.lineWidth=2,b.beginPath(),b.moveTo(0,this.aboveRulerHeight),b.lineTo(a.width,this.aboveRulerHeight),b.moveTo(0,a.height),b.lineTo(a.width,a.height),b.stroke(),this.drawRulerTicks_(a,g,f,d),this.drawStoryboardImages_(a,c,g,f,d),b.fillStyle=this.getComputedStyleValue("--yt-spec-themed-overlay-background"),b.fillRect(0, this.aboveRulerHeight,this.timeToPixels_(l-g,d,!1),this.rulerHeight),c=this.timeToPixels_(m-g,d,!1),b.fillRect(c,this.aboveRulerHeight,a.width-c,this.rulerHeight))}, drawRulerTicks_:function(a,b,c,d){var f=a.getContext("2d");f.lineWidth=1;for(var g=Math.floor(Math.max(0,b-this.tickLabelInterval));gd&&(d="0"+d);var f="";(void 0===b?0:b)&&(f="."+Math.round(10*(a-Math.floor(a))));return c+":"+d+f}, timeToPixels_:function(a,b,c){a*=b;return void 0===c||c?a+"px":a}, onDarkModeToggled_:function(){this.set("forceRender_",this.forceRender_+1)}});var vcb;var wcb;Polymer({is:"yt-clip-creation-scrubber-view",_template:function(){if(void 0!==wcb)return wcb;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
[[durationLabel]]
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vcb){var d=document.createElement("template");d.innerHTML=""; vcb=d}d=vcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return wcb=a}, properties:{start:{type:Number,value:0},end:{type:Number,value:30},duration:{type:Number,computed:"computeDuration_(start, end)"},lengthTemplate:{type:String},durationLabel:{type:String,computed:"computeDurationLabel_(lengthTemplate, duration)"},visible:{type:Boolean,value:!1,observer:"onVisibleChanged_"},player_:{type:Object},draggingLeft_:{type:Boolean,value:!1,observer:"onDragStateChanged_"},draggingRight_:{type:Boolean,value:!1,observer:"onDragStateChanged_"},draggingRuler_:{type:Boolean,value:!1, reflectToAttribute:!0,observer:"onDragStateChanged_"},draggingWindow_:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"onDragStateChanged_"},tickSpacing_:{type:Number,computed:"computeTickSpacing_(windowSizeSec_, rulerWidth_)"},seekableStart:{type:Number,value:0},seekableEnd:{type:Number,value:0},windowSizeMs:{type:Number},windowSizeSec_:{type:Number,computed:"computeWindowSizeSec_(windowSizeMs, seekableStart, seekableEnd)"},rulerWidth_:{type:Number,value:0},rulerShift_:{type:Number,value:0}, disabled:{type:Boolean,value:!1,reflectToAttribute:!0},initialized:{type:Boolean,value:!1,observer:"onInitializedChanged_"},durationAccessibilityLabel:{type:String,value:""}},behaviors:[NO.YtActionHandlerBehavior,cQ,W.YtRendererBehavior],observers:["updateLoopRange_(player_, visible, disabled, initialized, start, end)","updateHandles_(start, end, rulerShift_, tickSpacing_, windowSizeSec_)","updateRuler_(start, end)"],actionMap:{"yt-clip-creation-disable":"onClipCreationDisable_"},created:function(){var a= this;this.activeLoopRange_=!1;this.windowDragEndTime_=this.windowDragStartTime_=this.windowDragMouseStart_=this.rulerDragEndTime_=this.rulerDragStartTime_=this.rulerDragRulerStart_=this.rulerDragMouseStart_=0;this.playerEvents=new Map;this.playerEvents.set("onVideoProgress",this.onVideoProgress_);this.playerEvents.set("SEEK_COMPLETE",this.onSeekComplete_);this.playerEvents.set("onStateChange",this.onStateChange_);this.boundHandlers_={};var b={mouseup:this.endDrag_,mousemove:this.handleMouseDrag_, resize:this.updateRulerSize_,handles_mousedown:this.beginHandleDrag_,ruler_mousedown:this.beginRulerDrag_};Object.keys(b).forEach(function(c){a.boundHandlers_[c]=b[c].bind(a)})}, attached:function(){var a=this;ZM(this).getPlayerPromise().then(function(b){a.setPlayer(b)}); this.activeLoopRange_=!1;this.$.handles.addEventListener("mousedown",this.boundHandlers_.handles_mousedown);this.$.ticks.addEventListener("mousedown",this.boundHandlers_.ruler_mousedown);window.addEventListener("resize",this.boundHandlers_.resize)}, detached:function(){this.setPlayer(null);window.removeEventListener("resize",this.boundHandlers_.resize);this.storyboardImages_&&this.splice("storyboardImages_",0,this.storyboardImages_.length);this.removeMouseEventHandlers_();this.$.handles.removeEventListener("mousedown",this.boundHandlers_.handles_mousedown);this.$.ticks.removeEventListener("mousedown",this.boundHandlers_.ruler_mousedown)}, setPlayer:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.playerEvents);a&&(this.set("player_",a),this.listenToPlayerEvents(a,this.playerEvents))}, addMouseEventHandlers_:function(){window.addEventListener("mouseup",this.boundHandlers_.mouseup);window.addEventListener("mousemove",this.boundHandlers_.mousemove)}, removeMouseEventHandlers_:function(){window.removeEventListener("mouseup",this.boundHandlers_.mouseup);window.removeEventListener("mousemove",this.boundHandlers_.mousemove)}, beginHandleDrag_:function(a){this.disabled||(a.preventDefault(),this.draggingWindow_=this.draggingRuler_=this.draggingRight_=this.draggingLeft_=!1,a.target===this.$["handle-left"]?this.beginLeftHandleDrag_():a.target===this.$["handle-right"]?this.beginRightHandleDrag_():this.beginWindowDrag_(a))}, beginLeftHandleDrag_:function(){this.draggingLeft_=!0;this.beginDrag_()}, beginRightHandleDrag_:function(){this.draggingRight_=!0;this.beginDrag_()}, beginWindowDrag_:function(a){this.disabled||(this.draggingWindow_=!0,this.windowDragMouseStart_=a.clientX,this.windowDragStartTime_=this.start,this.windowDragEndTime_=this.end,this.beginDrag_())}, beginRulerDrag_:function(a){this.disabled||(a.preventDefault(),this.draggingRight_=this.draggingLeft_=!1,this.draggingRuler_=!0,this.draggingWindow_=!1,this.rulerDragMouseStart_=a.clientX,this.rulerDragRulerStart_=this.rulerShift_,this.rulerDragStartTime_=this.start,this.rulerDragEndTime_=this.end,this.beginDrag_())}, beginDrag_:function(){this.player_.pauseVideo();this.addMouseEventHandlers_()}, endDrag_:function(){var a=this.draggingRight_;this.draggingWindow_=this.draggingRuler_=this.draggingRight_=this.draggingLeft_=!1;this.updateLoopRange_(this.player_,this.visible,this.disabled,this.initialized,this.start,this.end,a);this.removeMouseEventHandlers_()}, onVisibleChanged_:function(a){a&&this.updateRulerSize_()}, updateRulerSize_:function(){this.set("rulerWidth_",this.$.ruler.getBoundingClientRect().width)}, handleMouseDrag_:function(a){0==a.buttons&&(this.draggingLeft_||this.draggingRight_||this.draggingRuler_||this.draggingWindow_)&&this.endDrag_();this.disabled||(this.draggingRuler_?this.handleRulerDrag_(a):this.draggingLeft_||this.draggingRight_?this.handleWindowHandleDrag_(a):this.draggingWindow_&&this.handleWindowDrag_(a))}, handleRulerDrag_:function(a){a=this.pixelsToTime_(a.clientX-this.rulerDragMouseStart_);a=this.capRulerOffset_(this.rulerDragRulerStart_-a);this.set("rulerShift_",a);var b=this.rulerDragStartTime_-(this.rulerDragRulerStart_-a);this.fire("set-fixed-length-range",{start:b,duration:this.rulerDragEndTime_-(this.rulerDragRulerStart_-a)-b})}, handleWindowDrag_:function(a){a=this.pixelsToTime_(a.clientX-this.windowDragMouseStart_);this.fire("set-fixed-length-range",{start:this.windowDragStartTime_+a,duration:this.windowDragEndTime_-this.windowDragStartTime_,startLimit:this.rulerShift_,endLimit:this.rulerShift_+this.windowSizeSec_})}, capRulerOffset_:function(a){return Math.min(Math.max(this.seekableStart,a),this.seekableEnd-this.windowSizeSec_)}, handleWindowHandleDrag_:function(a){var b=this.$.ruler.getBoundingClientRect();a=a.clientX-b.left;a=Math.max(0,Math.min(a,b.width));b=this.pixelsToTime_(a)+this.rulerShift_;if(this.draggingLeft_){var c=b;var d=this.end}else this.draggingRight_&&(c=this.start,d=b);this.fire("set-range",{start:c,end:d,startLimit:this.rulerShift_,endLimit:this.rulerShift_+this.windowSizeSec_})}, onVideoProgress_:function(a){this.disabled||(a=this.timeToPixels_(a-this.rulerShift_,this.tickSpacing_),this.$.playhead.style.transform="translateX("+a+")")}, onClipCreationDisable_:function(){this.endDrag_()}, timeToPixels_:function(a,b,c){a*=b;return void 0===c||c?a+"px":a}, pixelsToTime_:function(a){return a/this.tickSpacing_}, onInitializedChanged_:function(a){a&&this.centerRuler_(this.start,this.end,this.windowSizeSec_)}, centerRuler_:function(a,b,c){this.set("rulerShift_",this.capRulerOffset_(a+(b-a)/2-c/2))}, updateLoopRange_:function(a,b,c,d,f,g,l){a&&(b&&d&&!c?(this.draggingLeft_||this.draggingRuler_||this.draggingWindow_?(a.pauseVideo(),a.seekTo(f,!1)):this.draggingRight_?(a.pauseVideo(),a.seekTo(g-.1,!1)):(l?a.seekTo(g-1,!0):(b=a.getCurrentTime(),bg?a.seekTo(f,!0):a.seekTo(b,!0)),a.playVideo()),a.setLoopRange({startTimeMs:1E3*f,endTimeMs:1E3*g}),this.activeLoopRange_=!0,this.onVideoProgress_(a.getCurrentTime())):this.activeLoopRange_&&(a.setLoopRange(null),this.activeLoopRange_=!1))}, updateHandles_:function(a,b,c,d){this.$.handles.style.left=this.timeToPixels_(a-c,d);this.$.handles.style.width=this.timeToPixels_(b-a,d)}, updateRuler_:function(a,b){var c=this.rulerShift_+this.windowSizeSec_;(ac)&&this.centerRuler_(this.start,this.end,this.windowSizeSec_)}, computeDurationLabel_:function(a,b){return a?a.replace("$clip_length",parseFloat(b).toFixed(1)):""}, computeDuration_:function(a,b){return this.isValidTime_(a)&&this.isValidTime_(b)&&aa?!1:this.player?a>=this.seekableStart&&a<=this.seekableEnd:!0}, computeWindowSizeSec_:function(a,b,c){return Math.min((a||12E4)/1E3,c-b)}, computeTickSpacing_:function(a,b){return b?b/a:1}, onDragStateChanged_:function(){this.fire("clips-drag-state",{startChanging:this.draggingLeft_||this.draggingWindow_||this.draggingRuler_,endChanging:this.draggingRight_||this.draggingWindow_||this.draggingRuler_})}, centerRangeOnTime_:function(a){a=rcb(!0,a,this.duration,this.seekableStart,this.seekableEnd);this.fire("set-fixed-length-range",{start:a.start,duration:a.end-a.start})}, onSeekComplete_:function(){var a=this.draggingLeft_||this.draggingRight_||this.draggingWindow_||this.draggingRuler_;!this.visible||this.disabled||a||(a=this.player_.getCurrentTime(),(!this.player_.getLoopRange()||athis.end)&&this.centerRangeOnTime_(a))}, onStateChange_:function(a){this.visible&&!this.disabled&&0==a&&this.centerRangeOnTime_(this.seekableEnd)}});Polymer({is:"yt-clip-creation-scrubber-renderer",_template:function(){if(void 0!==tcb)return tcb;var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \u2013\n \n \n \n \n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===scb){var d=document.createElement("template");d.innerHTML=""; scb=d}d=scb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return tcb=a}, properties:{data:Object,start:{type:Number,value:0,observer:"onStartChanged_"},startValid:{type:Boolean,value:!0},startWillUpdate:{type:Boolean,value:!1,reflectToAttribute:!0},end:{type:Number,value:30,observer:"onEndChanged_"},endValid:{type:Boolean,value:!0},endWillUpdate:{type:Boolean,value:!1,reflectToAttribute:!0},minLengthSec:{type:Number,computed:"computeMinLengthSec_(data.minLengthMs)"},maxLengthSec:{type:Number,computed:"computeMaxLengthSec_(data.maxLengthMs)"},defaultLengthSec:{type:Number, computed:"computeDefaultLengthSec_(data.defaultLengthMs)"},visible_:{type:Boolean,value:!1},player_:{type:Object},seekableStart_:{type:Number,value:null,computed:"computeSeekableStart_(player_, visible_)"},seekableEnd_:{type:Number,computed:"computeSeekableEnd_(player_, visible_)"},initialized:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},highlightStart:{type:Boolean,value:!1,reflectToAttribute:!0},highlightEnd:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[NO.YtActionHandlerBehavior, W.YtRendererBehavior],observers:["initializeClipRange_(player_, visible_, seekableStart_, seekableEnd_)","updateInputs_(start, end)"],listeners:{"set-fixed-length-range":"onSetFixedLengthRange_","set-range":"onSetRange_","clips-drag-state":"onDragState_"},actionMap:{"yt-clip-creation-visibility-changed":"onVisibilityChangedAction_","yt-clip-creation-disable":"onClipCreationDisable_","yt-clip-creation-enable":"onClipCreationEnable_"},created:function(){this.endHighlightTimeout=this.startHighlightTimeout= 0}, attached:function(){var a=this;ZM(this).getPlayerPromise().then(function(b){a.setPlayer(b)}); this.$.start.addEventListener("input",function(b){return a.handleStartInput_(b)}); this.$.end.addEventListener("input",function(b){return a.handleEndInput_(b)}); this.$.start.addEventListener("focusout",function(b){return a.handleStartBlur_(b)}); this.$.end.addEventListener("focusout",function(b){return a.handleEndBlur_(b)})}, setPlayer:function(a){this.set("player_",a)}, onSetFixedLengthRange_:function(a){var b=a.detail;a=b.start;var c=b.duration,d=b.startLimit;b=b.endLimit;d||(d=this.seekableStart_);b||(b=this.seekableEnd_);a=ocb(a,c,d,b);this.setProperties({start:a.start,end:a.end})}, onSetRange_:function(a){var b=a.detail;a=b.start;var c=b.end,d=b.startLimit;b=b.endLimit;d||(d=this.seekableStart_);b||(b=this.seekableEnd_);(a=pcb(a,c,d,b,this.minLengthSec,this.maxLengthSec))&&this.setProperties({start:a.start,end:a.end})}, updateInputs_:function(a,b){this.$.start.focused||(this.$.start.value=this.formatTime_(a,!0));this.$.end.focused||(this.$.end.value=this.formatTime_(b,!0))}, handleStartInput_:function(a){a=this.parseTime_(a.target.value);if(null===a)this.set("startValid",!1);else{var b=this.end,c=pcb(a,this.end,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec);c?(this.set("endWillUpdate",c.end!==b),this.set("startValid",c.start===a)):this.set("startValid",!1)}}, handleEndInput_:function(a){a=this.parseTime_(a.target.value);if(null===a)this.set("endValid",!1);else{var b=this.start,c=qcb(this.start,a,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec);c?(this.set("startWillUpdate",c.start!==b),this.set("endValid",c.end===a)):this.set("endValid",!1)}}, handleStartBlur_:function(a){a=this.parseTime_(a.target.value);null===a?this.$.start.value=this.formatTime_(this.start,!0):this.forceUpdateInputs_(pcb(a,this.end,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec))}, handleEndBlur_:function(a){a=this.parseTime_(a.target.value);null===a?this.$.end.value=this.formatTime_(this.end,!0):this.forceUpdateInputs_(qcb(this.start,a,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec))}, forceUpdateInputs_:function(a){a&&this.setProperties({start:a.start,end:a.end});this.$.start.value=this.formatTime_(this.start,!0);this.$.end.value=this.formatTime_(this.end,!0);this.setProperties({startValid:!0,endValid:!0,endWillUpdate:!1,startWillUpdate:!1})}, initializeClipRange_:function(a,b,c,d){if(!a||!b||null===c||!d)this.set("initialized",!1);else if(!this.initialized){b=a.getCurrentTime();var f=this.getDefaultLengthSec_();a=rcb(1==a.getPlayerState(),b,f,c,d);this.setProperties({start:a.start,end:a.end});this.set("initialized",!0);this.$.start.value=this.formatTime_(this.start,!0);this.$.end.value=this.formatTime_(this.end,!0)}}, onStartChanged_:function(a,b){var c=this;this.fire("start-changed",{start:a});isNaN(b)||(this.set("highlightStart",!0),clearTimeout(this.startHighlightTimeout),this.startHighlightTimeout=setTimeout(function(){c.set("highlightStart",!1);c.startHighlightTimeout=0},3E3))}, onEndChanged_:function(a,b){var c=this;this.fire("end-changed",{end:a});isNaN(b)||(this.set("highlightEnd",!0),clearTimeout(this.endHighlightTimeout),this.endHighlightTimeout=setTimeout(function(){c.set("highlightEnd",!1);c.endHighlightTimeout=0},3E3))}, parseTime_:function(a){var b="hh:mm:ss hh:mm:ss. hh:mm:ss.S mm:ss mm:ss. mm:ss.S sss sss. sss.S .S".split(" ").map(function(c){var d=new RF(c),f=new Date(0);return{num:d.parse(a,f),date:f,pattern:c}}).reduce(function(c,d){return d.num>c.num?d:c},{num:-Infinity, date:null,pattern:null});return b.date?b.date.getTime()/1E3:null}, formatTime_:function(a,b){var c=Math.floor(a/60),d=Math.floor(a)%60;10>d&&(d="0"+d);var f="";(void 0===b?0:b)&&(f="."+Math.round(10*(a-Math.floor(a))));return c+":"+d+f}, onVisibilityChangedAction_:function(a){this.set("visible_",a.visible)}, computeMinLengthSec_:function(a){return a/1E3||5}, computeMaxLengthSec_:function(a){return a/1E3||60}, computeDefaultLengthSec_:function(a){return a/1E3}, getDefaultLengthSec_:function(){return this.defaultLengthSec||30}, computeSeekableStart_:function(a,b){return a&&b?a.getProgressState(1).seekableStart:0}, computeSeekableEnd_:function(a,b){return a&&b?a.getProgressState(1).seekableEnd:0}, onClipCreationDisable_:function(){this.set("disabled",!0)}, onClipCreationEnable_:function(){this.set("disabled",!1)}, onDragState_:function(a){this.set("highlightStart",a.detail.startChanging);this.set("highlightEnd",a.detail.endChanging)}});var xcb;var ycb;Polymer({is:"yt-clip-creation-text-input-renderer",_template:function(){if(void 0!==ycb)return ycb;var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xcb){var d=document.createElement("template");d.innerHTML=""; xcb=d}d=xcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ycb=a}, properties:{data:Object,value:{type:String,value:"",observer:"onValueChanged_"},valid:{type:Boolean,value:!1,observer:"onValidChanged_"},fieldValid:{type:Boolean,computed:"computeFieldValid_(valid, userChangedValue_)"},userChangedValue_:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1}},behaviors:[NO.YtActionHandlerBehavior,W.YtRendererBehavior],listeners:{keydown:"handleKeyDown_",input:"handleInput_",blur:"handleBlur_"},actionMap:{"yt-clip-creation-disable":"onClipCreationDisable_","yt-clip-creation-enable":"onClipCreationEnable_", "yt-clip-creation-visibility-changed":"onClipCreationVisibilityChange_"},detached:function(){this.userChangedValue_=!1}, handleInput_:function(){var a=this.$.title.value.replace(/\r|\n/g," ");this.set("value",a);this.$.title.value=a;this.valid=this.$.title.validate();this.userChangedValue_=!0}, handleKeyDown_:function(a){a.keyCode==(we?gBa(13):ye&&xe?hBa(13):13)&&a.preventDefault()}, handleBlur_:function(){this.valid=this.$.title.validate()}, onValueChanged_:function(a){this.fire("title-changed",{title:a})}, onValidChanged_:function(a){this.fire("title-valid-changed",{valid:a})}, computeFieldValid_:function(a,b){return!b||a}, setInput:function(a){(this.shadowRoot||this).querySelector("paper-textarea").value=a;this.handleInput_()}, onClipCreationDisable_:function(){this.set("disabled",!0)}, onClipCreationEnable_:function(){this.set("disabled",!1)}, onClipCreationVisibilityChange_:function(a){var b=this;a.visible?requestAnimationFrame(function(){b.$.title.inputElement.textarea.focus()}):this.setInput("")}});Polymer({is:"yt-clip-creation-renderer",_template:function(){if(void 0!==ncb)return ncb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
[[getSimpleString(data.displayName)]]
\n
\n
[[data.publicityLabel]]
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mcb){var d=document.createElement("template");d.innerHTML=""; mcb=d}d=mcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ncb=a}, properties:{data:Object,titleValue:{type:String,value:""},titleValid:{type:Boolean,value:!1},start:{type:Number,value:0},startValid:{type:Boolean,value:!0},end:{type:Number,value:0},endValid:{type:Boolean,value:!0},videoId:{type:String,value:""},formValid:{type:Boolean,computed:"computeFormValid_(data, titleValid, startValid, endValid)"},submitButton_:{type:Object,computed:"computeSubmitButton_(data.saveButton, isAdPlaying, isLoading_, formValid)"},submitCommand_:{type:Object,computed:"computeSubmitCommand_(data.saveButton.buttonRenderer.command)"}, cancelButton_:{type:Object,computed:"computeCancelButton_(data.cancelButton, isAdPlaying, isLoading_)"},isLoading_:{type:Boolean,value:!1},isAdPlaying:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[V.YtActionSenderBehavior,cQ,Y,W.YtRendererBehavior],listeners:{"title-changed":"onTitleChanged_","title-valid-changed":"onTitleValidChanged_","start-changed":"onStartChanged_","start-valid-changed":"onStartValidChanged_","end-changed":"onEndChanged_","end-valid-changed":"onEndValidChanged_"}, stampDom:{submitButton_:{id:"share",mapping:{buttonRenderer:"yt-button-renderer"}},cancelButton_:{id:"cancel",mapping:{buttonRenderer:"yt-button-renderer"}},"data.titleInput":{id:"title-input",mapping:{clipCreationTextInputRenderer:"yt-clip-creation-text-input-renderer"}},"data.scrubber":{id:"scrubber",mapping:{clipCreationScrubberRenderer:"yt-clip-creation-scrubber-renderer"}},"data.adStateOverlay":{id:"ad-state",mapping:{clipAdStateRenderer:"yt-clip-ad-state-renderer"}}},created:function(){this.player_= null;this.playerEvents=new Map;this.playerEvents.set("onAdStart",this.playerAdStartHandler_);this.playerEvents.set("onAdEnd",this.playerAdEndHandler_);this.playerEvents.set("onVideoDataChange",this.onVideoDataChange_)}, attached:function(){var a=this;ZM(this).getPlayerPromise().then(function(b){a.setPlayer(b)})}, detached:function(){this.setPlayer(null)}, setPlayer:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.playerEvents);a&&(this.player_=a,this.set("videoId",a.getVideoData().video_id||""),a.getAdState&&1===a.getAdState()&&(this.set("isAdPlaying",!0),this.sendAction("yt-clip-creation-disable")),this.listenToPlayerEvents(a,this.playerEvents))}, ready:function(){this.$.share.addEventListener("tap",this.onSubmit_.bind(this))}, onTitleChanged_:function(a){this.set("titleValue",a.detail.title)}, onStartChanged_:function(a){this.set("start",a.detail.start)}, onEndChanged_:function(a){this.set("end",a.detail.end)}, onTitleValidChanged_:function(a){this.set("titleValid",a.detail.valid)}, onStartValidChanged_:function(a){this.set("startValid",a.detail.valid)}, onEndValidChanged_:function(a){this.set("endValid",a.detail.valid)}, onVideoDataChange_:function(){this.set("videoId",this.player_.getVideoData().video_id||"")}, computeFormValid_:function(a,b,c,d){return!!(a&&b&&c&&d)}, computeCancelButton_:function(a,b,c){if(!a||!a.buttonRenderer)return null;a=Polymer.Base.mixin({},a.buttonRenderer);a.isDisabled=b||c;return{buttonRenderer:a}}, computeSubmitButton_:function(a,b,c){return a&&a.buttonRenderer?(a=Polymer.Base.mixin({},a.buttonRenderer),a.command=void 0,a.isDisabled=!this.formValid||b||c,{buttonRenderer:a}):null}, computeSubmitCommand_:function(a){return a||null}, onSubmit_:function(a){var b=this;a.stopPropagation();a.preventDefault();this.submitCommand_&&(a={},a.comment_text=this.titleValue,a.clip_external_video_id=this.videoId,a.clip_offset_ms=parseInt(1E3*this.start,10),a.clip_duration_ms=parseInt(1E3*(this.end-this.start),10),this.set("isLoading_",!0),this.sendServiceRequestAction([this.submitCommand_,a]).then(function(){b.set("isLoading_",!1)},function(){b.set("isLoading_",!1)}))}, playerAdStartHandler_:function(){this.sendAction("yt-clip-creation-disable");this.set("isAdPlaying",!0)}, playerAdEndHandler_:function(){this.sendAction("yt-clip-creation-enable");this.set("isAdPlaying",!1)}});var zcb;var Acb;Polymer({is:"yt-clip-section-footer-renderer",_template:function(){if(void 0!==Acb)return Acb;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zcb){var d=document.createElement("template");d.innerHTML=""; zcb=d}d=zcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Acb=a}, properties:{data:Object},behaviors:[Y],stampDom:{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}}}});var Bcb;var Ccb;Polymer({is:"yt-clip-section-renderer",_template:function(){if(void 0!==Ccb)return Ccb;var a=document.createElement("template");a.innerHTML="
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bcb){var d=document.createElement("template");d.innerHTML=""; Bcb=d}d=Bcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Ccb=a}, behaviors:[V.YtActionSenderBehavior,Y,W.YtRendererBehavior,mP],properties:{data:Object,panelContentVisible:{type:Boolean,reflectToAttribute:!0,observer:"onPanelContentVisibleChanged_"}},stampDom:{"data.contents":{id:"contents",mapping:{clipAttributionRenderer:"yt-clip-attribution-renderer",clipCreationRenderer:"yt-clip-creation-renderer"}},"data.footer":{id:"footer",mapping:{clipSectionFooterRenderer:"yt-clip-section-footer-renderer"}}},onPanelContentVisibleChanged_:function(a){this.data&&this.data.contents&&( this.data.contents.some(function(b){return b.hasOwnProperty("clipCreationRenderer")})&&this.sendAction("yt-clip-creation-visibility-changed",[{visible:!!a}]),a&&this.sendAction("yt-toggle-theater-mode",[!1]))}});var Dcb;var Ecb;var LY=function(){return O.apply(this,arguments)||this}; p(LY,O);LY.prototype.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{merchandiseItemRenderer:"ytd-merch-shelf-item-renderer"}},"data.flaggingMenu":{id:"flagging-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.informationButton":{id:"information-button-container",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; LY.prototype.dataChanged=function(){this.ytdHorizontalListBehavior.reset()}; LY.prototype.updateOffset=function(){this.ytdHorizontalListBehavior.offset_=Math.max(0,Math.min(this.ytdHorizontalListBehavior.offset_,this.items.clientWidth-this.$["scroll-container"].clientWidth));this.ytdHorizontalListBehavior.reposition_()}; h.Object.defineProperties(LY.prototype,{isSingleItem:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.items&&1===this.data.items.length}}}); h.Object.defineProperties(LY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ecb){var a=document.createElement("template");a.innerHTML="
\n
\n
[[data.title]]
\n \n
\n
\n
\n\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dcb){var d=document.createElement("template");d.innerHTML=""; Dcb=d}d=Dcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ecb=a}a=Ecb;return a}}}); var MY=LY;MY.prototype.updateOffset=MY.prototype.updateOffset;w([P(W.YtRendererBehavior),x("design:type",Object)],MY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],MY.prototype,"ytRendererstamperBehavior",void 0);w([P(NQ.YtdHorizontalListBehavior),x("design:type",Object)],MY.prototype,"ytdHorizontalListBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],MY.prototype,"componentBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],MY.prototype,"data",void 0);w([R({value:6}),x("design:type",Number)],MY.prototype,"initialCount",void 0);w([R({value:"data.items"}),x("design:type",String)],MY.prototype,"itemsPath",void 0);w([AE("#items"),x("design:type",BV)],MY.prototype,"items",void 0);w([zE("data.items"),x("design:type",Object),x("design:paramtypes",[])],MY.prototype,"isSingleItem",null); w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],MY.prototype,"updateOffset",null);MY=w([U({is:"ytd-merch-shelf-renderer"})],MY);var Fcb;var Gcb;var NY=function(){return O.apply(this,arguments)||this}; p(NY,O);NY.prototype.configureRendererStamper=function(){return{"data.scrollUpButton":{id:"scroll-up",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.subscribeButton":{id:"subscribe",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; NY.prototype.activate=function(a){a.appendTo(this.player);a.getPlayerPromise().then(function(b){b.setMinimized(!0);b.setUseFastSizingOnWatch(!1)}); this.active=!0}; NY.prototype.deactivate=function(){var a=this.player.firstElementChild;a.getPlayerPromise().then(function(b){b.setMinimized(!1);b.setUseFastSizingOnWatch(!0)}); this.active=!1;return a}; NY.prototype.onScrollUpTap=function(){this.componentBehavior.getInterfaceForTs("ytd-page-manager").getCurrentPage().setScrollTop(0)}; h.Object.defineProperties(NY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gcb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n

[[getSimpleString(data.title)]]

\n
\n
\n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fcb){var d=document.createElement("template");d.innerHTML=""; Fcb=d}d=Fcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gcb=a}a=Gcb;return a}}}); var OY=NY;w([P(W.YtRendererBehavior),x("design:type",Object)],OY.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],OY.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],OY.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],OY.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],OY.prototype,"active",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_while_miniplayer_bar_dark_launch")}}), x("design:type",Boolean)],OY.prototype,"darkLaunch",void 0);w([AE("#player"),x("design:type",HTMLDivElement)],OY.prototype,"player",void 0);OY=w([U({is:"ytd-miniplayer-bar-renderer"})],OY);var Hcb;var Icb;var PY=function(){return O.apply(this,arguments)||this}; p(PY,O); PY.prototype.dataChanged=function(a){if(a){var b=this.$.text;a=a.companionLegalText;var c;a=fea(a,null===(c=ch())||void 0===c?void 0:c.createHTML(a));if("script"===b.tagName.toLowerCase())throw Error("Use setTextContent with a SafeScript.");if("style"===b.tagName.toLowerCase())throw Error("Use setTextContent with a SafeStyleSheet.");if(a instanceof eea){var d;if(null===(d=ah())||void 0===d?0:d.isHTML(a))c=a;else if(a instanceof eh)c=a.privateDoNotAccessOrElseWrappedHtml;else throw Error("wrong type")}else c= nc(a);b.innerHTML=c}}; PY.prototype.computeAutoScrollEnabled=function(a,b){return a&&!b}; PY.prototype.expandedChanged=function(){this.expanderIcon=this.expanded?"expand-less":"expand-more"}; PY.prototype.onToggleTap=function(){this.expanded=!this.expanded}; h.Object.defineProperties(PY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Icb){var a=document.createElement("template");a.innerHTML="\n\n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hcb){var d=document.createElement("template");d.innerHTML=""; Hcb=d}d=Hcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Icb=a}a=Icb;return a}}}); var QY=PY;w([P(W.YtRendererBehavior),x("design:type",Object)],QY.prototype,"ytRendererBehavior",void 0);w([P(S0a),x("design:type",Object)],QY.prototype,"ytdAutoScrollBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],QY.prototype,"data",void 0);w([R({reflectToAttribute:!0,observer:"expandedChanged",value:!1}),x("design:type",Boolean)],QY.prototype,"expanded",void 0); w([R({computed:"computeAutoScrollEnabled(data.companionLegalTextEnableAutoscroll, expanded)"}),x("design:type",Boolean)],QY.prototype,"autoScrollEnabled",void 0);w([R(),x("design:type",String)],QY.prototype,"expanderIcon",void 0);QY=w([U({is:"ytd-companion-legal-text-renderer"})],QY);var Jcb;var Kcb;var RY,SY=function(){return O.apply(this,arguments)||this}; p(SY,O);e=SY.prototype;e.getOnLayoutVisibleCallback=function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.onLayoutVisibleCallback:null}; e.getLayoutId=function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.layoutId:null}; e.dataChanged=function(){var a=this;if(this.data){this.set("data.adBadge",RY.DEFAULT_AD_BADGE_RENDERER);var b=this.getOnLayoutVisibleCallback();this.data.impressionCommands&&b&&ud(Error("ActionCompanion visible with both impressionCommands and onLayoutVisibleCallback Web"));this.data.impressionCommands?this.data.impressionCommands.forEach(function(c){c.clickTrackingParams&&delete c.clickTrackingParams;a.macroReplacementBehavior.sendServiceRequestAction([c])}):b&&b()}}; e.getButtonRenderer=function(a){return a.actionButton&&a.actionButton.buttonRenderer?(delete a.actionButton.buttonRenderer.navigationEndpoint,a.actionButton.buttonRenderer):{}}; e.onTap=function(){this.data&&this.data.navigationEndpoint&&(this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}),this.actionSenderBehavior.sendAction("yt-companion-ad-clicked",["action-companion",this.getLayoutId()]))}; h.Object.defineProperties(SY.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}, interactionLoggingClientData:{configurable:!0,enumerable:!0,get:function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.interactionLoggingClientData:null}}, hideBanner:{configurable:!0,enumerable:!0,get:function(){var a=this.data.bannerImage&&this.get("thumbnail.thumbnails.0.url",this.data.bannerImage);return a?-1!==a.indexOf("/default_banner"):!0}}}); h.Object.defineProperties(SY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kcb){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n \n
\n
\n [[data.headline.text]]\n
\n
\n
\n \n \n
\n \n [[data.description.text]]\n \n
\n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jcb){var d=document.createElement("template");d.innerHTML=""; Jcb=d}d=Jcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kcb=a}a=Kcb;return a}}}); var TY=RY=SY;RY.prototype.onTap=RY.prototype.onTap;RY.prototype.dataChanged=RY.prototype.dataChanged;TY.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:mL("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(W.YtRendererBehavior),x("design:type",Object)],TY.prototype,"rendererBehavior",void 0);w([P(vV.YtMacroReplacementBehavior),x("design:type",Object)],TY.prototype,"macroReplacementBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],TY.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],TY.prototype,"data",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],TY.prototype,"macros",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],TY.prototype,"interactionLoggingClientData",null);w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],TY.prototype,"hideBanner",null); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],TY.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],TY.prototype,"onTap",null);TY=RY=w([U({is:"ytd-action-companion-ad-renderer"})],TY);var Lcb;var Mcb;var Ncb={shoppingCompanionCarouselRenderer:"ytd-shopping-companion-renderer",iframeCompanionRenderer:"ytd-iframe-companion-renderer",imageCompanionAdRenderer:"ytd-image-companion-renderer",actionCompanionAdRenderer:"ytd-action-companion-ad-renderer"},UY=function(){var a=O.apply(this,arguments)||this;a.updateCompanionDataJobId_=0;a.contentVideoId_=null;a.player_=null;a.actionMap={"yt-companion-ad-clicked":"handleCompanionAdClicked"};return a}; p(UY,O);e=UY.prototype;e.configureRendererStamper=function(){return{oneofRenderer:{id:"companion",mapping:Ncb}}}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;var b=ZM(this);b&&b.getPlayerPromise().then(function(c){a.getCachedDataAndListen_(c)})}; e.detached=function(){this.player_&&(this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player_,"updateKevlarOrC3Companion",this.receiveCompanionData_),this.player_=null)}; e.updateRendererStamper_=function(){var a={};if(this.data)for(var b in Ncb)if(this.data[b]){a[b]=this.data[b];break}if(void 0!=this.oneofRenderer||Object.keys(a).length)this.oneofRenderer=a}; e.getCachedDataAndListen_=function(a){var b=this.retrieveCachedCompanionData_();b&&Object.keys(b).length&&this.receiveCompanionData_(b);this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"updateKevlarOrC3Companion",this.receiveCompanionData_);this.player_=a}; e.retrieveCachedCompanionData_=function(){return t.yt&&t.yt.www&&t.yt.www.ads&&t.yt.www.ads.eventcache&&t.yt.www.ads.eventcache.getLastCompanionData?t.yt.www.ads.eventcache.getLastCompanionData():null}; e.receiveCompanionData_=function(a){a&&Object.keys(a).length&&(this.contentVideoId_=a.contentVideoId);this.setCompanionData_(a)}; e.setCompanionData_=function(a){var b=this;this.cancelPendingCompanionAdJobs_();if(a){var c=function(){b.updateCompanionDataJobId_=0;for(var d in Ncb)b.data[d]=void 0;a.shoppingCompanionCarouselRenderer?b.set("data.shoppingCompanionCarouselRenderer",a.shoppingCompanionCarouselRenderer):a.iframeCompanionRenderer?b.set("data.iframeCompanionRenderer",a.iframeCompanionRenderer):a.imageCompanionAdRenderer?b.set("data.imageCompanionAdRenderer",a.imageCompanionAdRenderer):a.actionCompanionAdRenderer&&(b.set("data.actionCompanionAdRenderer", a.actionCompanionAdRenderer),N("enable_offer_suppression")&&b.ytActionSenderBehavior.sendOptionalAction("yt-hide-unlimited-offer-module"));b.updateRendererStamper_()}; a.iframeCompanionRenderer?this.updateCompanionDataJobId_=xk(Bk,c):c()}}; e.dataChanged_=function(){var a=this,b=ZM(this);b?b.getPlayerPromise().then(function(c){a.contentVideoId_&&c.getVideoUrl().includes("v="+a.contentVideoId_)||(a.cancelPendingCompanionAdJobs_(),a.updateRendererStamper_())}):ud(Error("Missing PlayerManager"))}; e.cancelPendingCompanionAdJobs_=function(){this.updateCompanionDataJobId_&&(Bk.cancelJob(this.updateCompanionDataJobId_),this.updateCompanionDataJobId_=0)}; e.handleCompanionAdClicked=function(a,b){this.player_.onAdUxClicked(a,b);"videowall-companion"!=a&&this.player_.pauseVideo()}; h.Object.defineProperties(UY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mcb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lcb){var d=document.createElement("template");d.innerHTML="";Lcb=d}d=Lcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mcb=a}a=Mcb;return a}}}); var VY=UY;w([P(AO.YtComponentBehavior),x("design:type",Object)],VY.prototype,"ytComponentBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],VY.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],VY.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],VY.prototype,"ytActionSenderBehavior",void 0);w([P(Y),x("design:type",Object)],VY.prototype,"ytRendererstamperBehavior",void 0); w([P(cQ),x("design:type",Object)],VY.prototype,"ytPlayerListenerBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],VY.prototype,"data",void 0);w([R(),x("design:type",Object)],VY.prototype,"oneofRenderer",void 0);VY=w([U({is:"ytd-companion-slot-renderer"})],VY);var Ocb;var Pcb;var WY=function(){var a=O.apply(this,arguments)||this;a.iframe_=null;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction_"};return a}; p(WY,O);e=WY.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.reset_=function(){qg(this.$.container);this.iframe_=null}; e.dataChanged_=function(a){var b=this;this.reset_();a&&a.url&&this.createIframe_(a.url,a.width||300,a.height||250,a.impressionTrackingUrls,a.clickTrackingUrls).then(function(){b.ytActionSenderBehavior.sendOptionalAction("yt-refit-popups-action")})}; e.createIframe_=function(a,b,c,d,f){var g=this;a=vca(a,"polymer",1);document.documentElement.hasAttribute("dark")&&(a=vca(a,"dark_mode",1));var l=this.iframe_=og("IFRAME");l.width=b;l.height=c;l.frameBorder="0";l.marginHeight="0";l.marginWidth="0";l.scrolling="no";b=new Ki(function(m,n){l.addEventListener("load",function(){if(l===g.iframe_){Tn(d);var r=g.getIFrameClickElement_(l);null!=r&&si(r,"click",function(){Tn(f);g.ytActionSenderBehavior.sendAction("yt-companion-ad-clicked",["videowall-companion"])}, !1); m(l)}else n(Error("orphaned iframe"))})}); l.src=a;this.$.container.appendChild(l);this.scopeSubtree(l,!1);return b}; e.onDarkModeToggledAction_=function(a){this.iframe_&&this.iframe_.contentWindow&&this.iframe_.contentWindow.postMessage({"video-wall-set-dark-theme":a},"*")}; e.getIFrameClickElement_=function(a){try{var b=Bg(a);return b&&b.body}catch(c){return null}}; h.Object.defineProperties(WY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Pcb){var a=document.createElement("template");a.innerHTML="
\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ocb){var d=document.createElement("template");d.innerHTML=""; Ocb=d}d=Ocb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pcb=a}a=Pcb;return a}}}); var XY=WY;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],XY.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],XY.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],XY.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],XY.prototype,"data",void 0);XY=w([U({is:"ytd-iframe-companion-renderer"})],XY);var Qcb;var Rcb;var YY=function(){return O.apply(this,arguments)||this}; p(YY,O);e=YY.prototype;e.getOnLayoutVisibleCallback=function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.onLayoutVisibleCallback:null}; e.getLayoutId=function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.layoutId:null}; e.dataChanged=function(){var a=this;if(this.data){if(this.data.image&&this.data.image.thumbnail&&this.data.image.thumbnail.thumbnails&&this.data.image.thumbnail.thumbnails.length){var b=this.data.image.thumbnail.thumbnails[0];this.imageSrc=b.url?$b(b.url):void 0;this.imageWidth=b.width||0;this.imageHeight=b.height||0}this.data.clickthroughEndpoint&&this.data.clickthroughEndpoint.urlEndpoint&&(b=this.data.clickthroughEndpoint.urlEndpoint.url,N("kevlar_sanitize_image_companion_killswitch")?this.clickThroughUrl= b||"":b?(b=$b(b),this.clickThroughUrl=Vb(b)):this.clickThroughUrl=void 0);b=this.getOnLayoutVisibleCallback();this.data.impressionCommands&&b&&ud(Error("ImageCompanion visible with both impressionCommands and onLayoutVisibleCallback Web"));this.data.impressionCommands?this.data.impressionCommands.forEach(function(c){c.clickTrackingParams&&delete c.clickTrackingParams;a.macroReplacementBehavior.sendServiceRequestAction([c])}):b&&b()}}; e.onTap=function(){var a=this;this.data&&this.data.clickthroughEndpoint&&(this.fire("yt-navigate",{endpoint:this.data.clickthroughEndpoint}),this.data.onClickCommands&&this.data.onClickCommands.forEach(function(b){a.macroReplacementBehavior.sendServiceRequestAction([b])}),this.actionSenderBehavior.sendAction("yt-companion-ad-clicked",["image-companion", this.getLayoutId()]))}; e.onLoad=function(){this.actionSenderBehavior.sendOptionalAction("yt-refit-popups-action")}; h.Object.defineProperties(YY.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}, interactionLoggingClientData:{configurable:!0,enumerable:!0,get:function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.interactionLoggingClientData:null}}}); h.Object.defineProperties(YY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rcb){var a=document.createElement("template");a.innerHTML="\n
\n \"\"\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qcb){var d=document.createElement("template");d.innerHTML=""; Qcb=d}d=Qcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rcb=a}a=Rcb;return a}}}); var ZY=YY;ZY.prototype.onLoad=ZY.prototype.onLoad;ZY.prototype.onTap=ZY.prototype.onTap;ZY.prototype.dataChanged=ZY.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],ZY.prototype,"rendererBehavior",void 0);w([P(vV.YtMacroReplacementBehavior),x("design:type",Object)],ZY.prototype,"macroReplacementBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],ZY.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],ZY.prototype,"data",void 0); w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],ZY.prototype,"macros",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],ZY.prototype,"interactionLoggingClientData",null);w([R(),x("design:type",String)],ZY.prototype,"clickThroughUrl",void 0);w([R(),x("design:type",Ub)],ZY.prototype,"imageSrc",void 0);w([R(),x("design:type",Number)],ZY.prototype,"imageWidth",void 0);w([R(),x("design:type",Number)],ZY.prototype,"imageHeight",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],ZY.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],ZY.prototype,"onTap",null);w([S("load"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],ZY.prototype,"onLoad",null);ZY=w([U({is:"ytd-image-companion-renderer"})],ZY);var Scb;var Tcb;var $Y,aZ=function(){return O.apply(this,arguments)||this}; p(aZ,O);e=aZ.prototype;e.dataChanged=function(){this.set("data.adBadge",$Y.DEFAULT_AD_BADGE_RENDERER);if(this.data){var a=this.getOnLayoutVisibleCallback();this.data.impressionEndpoints&&a&&ud(Error("Shopping Companion visible with both impressionEndpoints and onLayoutVisibleCallback Web"));a&&a()}}; e.getOnLayoutVisibleCallback=function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.onLayoutVisibleCallback:null}; e.getLayoutId=function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.layoutId:null}; e.onCompanionClicked=function(a){this.data&&(a.target!==this.shopTitle&&this.sendTrackingPings(this.data.clickTrackingEndpoints),this.ytActionSenderBehavior.sendAction("yt-companion-ad-clicked",["shopping-companion",this.getLayoutId()]))}; e.onShopTextTap=function(){this.data&&this.fire("yt-navigate",{endpoint:this.data.clickToAdvSiteEndpoint})}; e.sendTrackingPings=function(a){a&&0!==a.length&&a[0].loggingUrls&&Tn(a[0].loggingUrls.map(this.getBaseUrl))}; e.getBaseUrl=function(a){return a.baseUrl||""}; h.Object.defineProperties(aZ.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}, interactionLoggingClientData:{configurable:!0,enumerable:!0,get:function(){var a=Ja("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.interactionLoggingClientData:null}}}); h.Object.defineProperties(aZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tcb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n
\n
\n [[getSimpleString(data.shopText)]]\n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Scb){var d=document.createElement("template");d.innerHTML=""; Scb=d}d=Scb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tcb=a}a=Tcb;return a}}}); var bZ=$Y=aZ;$Y.prototype.onCompanionClicked=$Y.prototype.onCompanionClicked;$Y.prototype.dataChanged=$Y.prototype.dataChanged;bZ.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:mL("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(V.YtActionSenderBehavior),x("design:type",Object)],bZ.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],bZ.prototype,"ytRendererBehavior",void 0); w([P(vV.YtMacroReplacementBehavior),x("design:type",Object)],bZ.prototype,"macroReplacementBehavior",void 0);w([R(),x("design:type",Object)],bZ.prototype,"data",void 0);w([AE("#title"),x("design:type",HTMLElement)],bZ.prototype,"shopTitle",void 0);w([yE("data.impressionEndpoints"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],bZ.prototype,"dataChanged",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],bZ.prototype,"macros",null); w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],bZ.prototype,"interactionLoggingClientData",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],bZ.prototype,"onCompanionClicked",null);bZ=$Y=w([U({is:"ytd-shopping-companion-renderer"})],bZ);var Ucb;var Vcb;var cZ=function(){return O.apply(this,arguments)||this}; p(cZ,O);cZ.prototype.dataChanged_=function(){this.companionSlotData=N("kevlar_disable_companions")?void 0:{hack:!0}}; h.Object.defineProperties(cZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vcb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ucb){var d=document.createElement("template");d.innerHTML="";Ucb=d}d=Ucb;c.call(b, d.content.cloneNode(!0),a.content.firstChild);Vcb=a}a=Vcb;return a}}}); var dZ=cZ;w([P(W.YtRendererBehavior),x("design:type",Object)],dZ.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],dZ.prototype,"data",void 0);w([R(),x("design:type",Object)],dZ.prototype,"companionSlotData",void 0);dZ=w([U({is:"ytd-player-legacy-desktop-watch-ads-renderer"})],dZ);var Wcb;var Xcb;var eZ=function(){var a=O.apply(this,arguments)||this;a.COMPACT_EVENT_COUNT=4;a.onShelfToggleButtonTap=function(){a.logTap(a.data);a.showingMore=!a.showingMore}; a.onShelfToggleButtonFocus=function(){a.showingMore||(a.logTap(a.data),a.showingMore=!0,Polymer.RenderStatus.afterNextRender(a,function(){a.$$("#event-"+(a.COMPACT_EVENT_COUNT-1)).focus()}))}; return a}; p(eZ,O);e=eZ.prototype;e.attached=function(){this.shelfToggleButton.addEventListener("tap",this.onShelfToggleButtonTap);this.shelfToggleButton.addEventListener("focus",this.onShelfToggleButtonFocus);this.addInfoTooltipListeners()}; e.detached=function(){this.shelfToggleButton.removeEventListener("tap",this.onShelfToggleButtonTap);this.shelfToggleButton.removeEventListener("focus",this.onShelfToggleButtonFocus);this.removeInfoTooltipListeners()}; e.addInfoTooltipListeners=function(){this.infoTooltip.listen(this.infoContainer,"tap","show");this.infoTooltip.listen(this.infoContainer,"mouseenter","show");this.infoTooltip.listen(this.infoContainer,"focus","show");this.infoTooltip.listen(this.infoContainer,"mouseleave","hide");this.infoTooltip.listen(this.infoContainer,"blur","hide")}; e.removeInfoTooltipListeners=function(){this.infoTooltip.unlisten(this.infoContainer,"tap","show");this.infoTooltip.unlisten(this.infoContainer,"mouseenter","show");this.infoTooltip.unlisten(this.infoContainer,"focus","show");this.infoTooltip.unlisten(this.infoContainer,"mouseleave","hide");this.infoTooltip.unlisten(this.infoContainer,"blur","hide")}; e.dataChanged=function(){this.firstEvent=this.get("data.events.0.ticketEventRenderer");this.data&&this.data.events&&(this.canShowMore=this.data.events.length>this.COMPACT_EVENT_COUNT,this.$.separator.style.visibility=1
\n

[[firstEvent.title]]

\n\n \n \n \n \n \n
[[data.informationText]]
\n
\n
\n
\n
\n \n\n \n\n
\n
\n [[data.title]]\n
[[firstEvent.subtitle1]]
\n \n \n
\n \n [[firstEvent.buttonText]]\n \n \n
\n
\n\n
\n\n
\n
\n \n \n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wcb){var d=document.createElement("template");d.innerHTML=""; Wcb=d}d=Wcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xcb=a}a=Xcb;return a}}}); var fZ=eZ;fZ.prototype.showingMoreChanged=fZ.prototype.showingMoreChanged;fZ.prototype.dataChanged=fZ.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],fZ.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],fZ.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],fZ.prototype,"data",void 0);w([R(),x("design:type",Object)],fZ.prototype,"firstEvent",void 0); w([R(),x("design:type",Object)],fZ.prototype,"restEvents",void 0);w([R(),x("design:type",String)],fZ.prototype,"imageUrl",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],fZ.prototype,"showingMore",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],fZ.prototype,"canShowMore",void 0);w([R({reflectToAttribute:!0,value:N("kevlar_fixie_watch_layout")}),x("design:type",Boolean)],fZ.prototype,"fixie",void 0); w([R({value:N("kevlar_autofocus_menu_on_keyboard_nav")}),x("design:type",Boolean)],fZ.prototype,"focusOnFirstMenuItemOnKeyboardNav",void 0);w([R(),x("design:type",HTMLElement)],fZ.prototype,"popupPositionTarget",void 0);w([AE("#banner-info-tooltip"),x("design:type",Object)],fZ.prototype,"infoTooltip",void 0);w([AE("#info-container"),x("design:type",HTMLElement)],fZ.prototype,"infoContainer",void 0);w([AE("#shelf-toggler"),x("design:type",HTMLElement)],fZ.prototype,"shelfToggleButton",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],fZ.prototype,"dataChanged",null);w([yE("showingMore"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],fZ.prototype,"showingMoreChanged",null);fZ=w([U({is:"ytd-ticket-shelf-renderer"})],fZ);var Ycb;var gZ=function(){return O.apply(this,arguments)||this}; p(gZ,O);gZ.prototype.dataChanged=function(){this.$$("#scriptTag")&&this.root.removeChild(this.$$("#scriptTag"));var a=document.createElement("script");a.setAttribute("type","application/ld+json");a.setAttribute("id","scriptTag");var b=JSON.stringify(this.getPlayerMicroformatData()).replace(/";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);Ycb=a}a=Ycb;return a}}}); var Zcb=gZ;w([R({observer:"dataChanged"}),x("design:type",Object)],Zcb.prototype,"data",void 0);Zcb=w([U({is:"ytd-player-microformat-renderer"})],Zcb);var $cb;var adb;Polymer({is:"yt-alert-renderer",_template:function(){if(void 0!==adb)return adb;var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$cb){var d=document.createElement("template");d.innerHTML=""; $cb=d}d=$cb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return adb=a}, properties:{data:Object}});var bdb=function(a,b){return a.SHARED_RENDERERS_.hasOwnProperty(b)?"yt":a.prefix},hZ={DIALOG:{component:"paper-dialog", properties:{withBackdrop:!0},preventAutonav:!0},FULLSCREEN_OVERLAY:{component:null,properties:{withBackdrop:!0}},DROPDOWN:{component:"iron-dropdown",properties:{noOverlap:!0,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0},HINT:{component:"iron-dropdown",properties:{allowOutsideScroll:!0,dynamicAlign:!1,horizontalAlign:"center",noOverlap:!0,scrollAction:"refit",verticalAlign:"bottom",verticalOffset:15,withBackdrop:!1}, positionalProperties:{OPEN_POPUP_POSITION_TOPLEFT:{horizontalAlign:"right",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"bottom",verticalOffset:15},OPEN_POPUP_POSITION_TOPRIGHT:{horizontalAlign:"left",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"bottom",verticalOffset:15},OPEN_POPUP_POSITION_LEFT:{horizontalAlign:"right",horizontalOffset:12,verticalAlign:"middle",verticalOffset:0},OPEN_POPUP_POSITION_RIGHT:{horizontalAlign:"left",horizontalOffset:12,verticalAlign:"middle", verticalOffset:0},OPEN_POPUP_POSITION_BOTTOM:{horizontalAlign:"center",horizontalOffset:0,verticalAlign:"top",verticalOffset:12},OPEN_POPUP_POSITION_BOTTOMLEFT:{horizontalAlign:"right",horizontalOffset:12,shiftedHorizontalOffset:24,verticalAlign:"top",verticalOffset:12},OPEN_POPUP_POSITION_BOTTOMRIGHT:{horizontalAlign:"left",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"top",verticalOffset:12}},forceCloseOnOutsideClick:!0,forceFocus:!0,slotName:"dropdown-content"},LOCKED_OVERLAY_DIALOG:{component:"paper-dialog", properties:{restoreFocusOnClose:!0,scrollAction:"lock",withBackdrop:!0},preventAutonav:!0}};hZ.MEALBAR={component:"paper-dialog",properties:{keepBelowPlayer:!N("kevlar_mealbar_above_player"),noAutoFocus:!0,noCancelOnOutsideClick:!0,withBackdrop:!1},styles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0",margin:"16px"},rtlStyles:{position:"fixed",top:"auto",right:"0",left:"auto",bottom:"0",margin:"16px"}};hZ.MODAL={component:"paper-dialog",properties:{modal:!0},forceFocus:!0,preventAutonav:!0}; hZ.MOLE={component:null,styles:{position:"fixed",top:"auto",left:"auto",right:"0",bottom:"0",zIndex:"var(--ytd-z-index-miniplayer)"},rtlStyles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0",zIndex:"var(--ytd-z-index-miniplayer)"}}; hZ.NOTIFICATION={component:null,styles:{position:"fixed",top:"0",left:"auto",right:"0",bottom:"auto",marginTop:"60px",zIndex:"var(--ytd-z-index-notification)"},rtlStyles:{position:"fixed",top:"0",left:"0",right:"auto",bottom:"auto",marginTop:"60px",zIndex:"var(--ytd-z-index-notification)"},preventAutonav:!0};hZ.OVERLAY_DROPDOWN={component:"iron-dropdown",properties:{noOverlap:!1,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0}; hZ.RESPONSIVE_DROPDOWN={component:"iron-dropdown",properties:{noOverlap:!0,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},narrowProperties:{horizontalAlign:null,verticalAlign:null,dynamicAlign:!1,withBackdrop:!0},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0}; hZ.SURVEY={component:"paper-dialog",properties:{withBackdrop:!1,noCancelOnOutsideClick:!0,noAutoFocus:!0},styles:{position:"fixed",top:"auto",left:"auto",right:"0",bottom:"0"},rtlStyles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0"},preventAutonav:N("web_survey_popup_prevent_autonav")};hZ.TOP_ALIGNED_DIALOG={component:"paper-dialog",properties:{withBackdrop:!0,verticalAlign:"top",horizontalAlign:"center"},styles:{margin:"8px 0 0 0"},targetContainer:!0};hZ.TOAST={component:null,properties:{}};var cdb=new function(a,b,c){this.supportedPopups=a;this.navigationEndpointPopupMap=b;this.popupTypeMap=c}({aboutThisAdRenderer:!0, adFeedbackRenderer:!0,adInfoDialogRenderer:!0,addToPlaylistRenderer:!0,backstagePostDialogPopupRenderer:!0,bubbleHintRenderer:!0,channelCreationDialogRenderer:!0,channelWarmWelcomeRenderer:!0,channelWarmWelcomeContRenderer:!0,checkboxSurveyRenderer:!0,confirmDialogRenderer:!0,dismissalFollowUpRenderer:!0,fancyDismissibleDialogRenderer:!0,formPopupRenderer:!0,gamingAccountLinkConfirmDialogRenderer:!0,gamingAccountLinkSettingRenderer:!0,gamingMultipleAccountLinkDialogRenderer:!0,hotkeyDialogRenderer:!0, sponsorshipConfirmCancelRenderer:!0,modalWithTitleAndButtonRenderer:!0,notificationActionRenderer:!0,reportFormModalRenderer:!0,searchSuggestionReportDialog:!0,sharingRenderer:!0,sharingEmbedRenderer:!0,menuPopupRenderer:!0,queueToPlayDialogRenderer:!0,singleOptionSurveyRenderer:!0,surveyFollowUpRenderer:!0,unifiedSharePanelRenderer:!0,unlimitedFamilyMessageInterstitialRenderer:!0,unlimitedFamilyProfileInterstitialRenderer:!0,unpluggedPauseMembershipDialogRenderer:!0,ypcUpgradeDialogRenderer:!0,ypcOffersOverlayRenderer:!0, redCancelSurveyRenderer:!0,conversationSectionController:!0,conversationHighPriorityNotificationContentRenderer:!0},{adFeedbackEndpoint:"adFeedbackEndpoint.content",adInfoDialogEndpoint:"adInfoDialogEndpoint.dialog",createBackstagePostDialogEndpoint:"createBackstagePostDialogEndpoint.dialog",confirmDialogEndpoint:"confirmDialogEndpoint.content",managePurchaseEndpoint:"managePurchaseEndpoint.content",modalEndpoint:"modalEndpoint.modal",shareEndpoint:"shareEndpoint",shareEntityEndpoint:"shareEntityEndpoint", unlimitedFamilyFlowEndpoint:"unlimitedFamilyFlowEndpoint.unlimitedFamilyFlowEndpointSupportedRenderers",openPopupAction:"openPopupAction.popup",ypcCancelSurveyEndpoint:"ypcCancelSurveyEndpoint.surveySupportedRenderers"},{aboutThisAdRenderer:"DIALOG",adFeedbackRenderer:"DIALOG",adInfoDialogRenderer:"RESPONSIVE_DROPDOWN",addToPlaylistRenderer:N("desktop_add_to_playlist_renderer_dialog_popup")?"DIALOG":"RESPONSIVE_DROPDOWN",backstagePostDialogPopupRenderer:"DIALOG",bubbleHintRenderer:"HINT",checkboxSurveyRenderer:"SURVEY", confirmDialogRenderer:"DIALOG",dismissalFollowUpRenderer:"DIALOG",fancyDismissibleDialogRenderer:"DIALOG",gamingAccountLinkConfirmDialogRenderer:"DIALOG",gamingAccountLinkSettingRenderer:"DIALOG",gamingMultipleAccountLinkDialogRenderer:"DIALOG",queueToPlayDialogRenderer:"DIALOG",hotkeyDialogRenderer:"DIALOG",sponsorshipConfirmCancelRenderer:"DIALOG",menuPopupRenderer:"RESPONSIVE_DROPDOWN",modalWithTitleAndButtonRenderer:"RESPONSIVE_DROPDOWN",notificationActionRenderer:"TOAST",reportFormModalRenderer:"DIALOG", searchSuggestionReportDialog:"DIALOG",sharingEmbedRenderer:"DIALOG",sharingRenderer:"RESPONSIVE_DROPDOWN",singleOptionSurveyRenderer:"SURVEY",surveyFollowUpRenderer:"SURVEY",unifiedSharePanelRenderer:"DIALOG",unlimitedFamilyMessageInterstitialRenderer:"DIALOG",unlimitedFamilyProfileInterstitialRenderer:"DIALOG",unpluggedPauseMembershipDialogRenderer:"DIALOG",ypcOffersOverlayRenderer:"DIALOG",ypcUpgradeDialogRenderer:"DIALOG",redCancelSurveyRenderer:"DIALOG",conversationSectionController:"MOLE",conversationHighPriorityNotificationContentRenderer:"NOTIFICATION"}), ddb=new function(){this.popupConfig=hZ;this.forwardedEvents="yt-action yt-navigate yt-popup-canceled yt-popup-closed yt-popup-opened yt-service-request-completed yt-service-request-error yt-service-request-sent yt-lockup-requested".split(" ");this.prefix="ytd";this.SHARED_RENDERERS_={aboutThisAdRenderer:!0,bubbleHintRenderer:!0,confirmDialogRenderer:!0,fancyDismissibleDialogRenderer:!0,notificationActionRenderer:!0,reportDetailsFormRenderer:!0,reportFormModalRenderer:!0,sharingEmbedRenderer:!0,sharingRenderer:!0, sortFilterSubMenuPopupRenderer:!0,tooltipRenderer:!0,unlimitedFamilyMessageInterstitialRenderer:!0,unlimitedFamilyProfileInterstitialRenderer:!0,unpluggedPauseMembershipDialogRenderer:!0,upsellDialogRenderer:!0,ypcOffersModalRenderer:!0,ypcUpgradeDialogRenderer:!0,loadingRenderer:!0}};var iZ=[5,10,15,20,30,40],edb=function(){this.sessionType="NEW";this.currentPartitionIndex=0},fdb=function(a,b,c){a=Object.assign({survival_status:a, partition_min:b,session_type:c},Zn());iZ.includes(b)||delete a.partition_min;return a},gdb=function(a){return 0<=a.currentPartitionIndex&&a.currentPartitionIndexc&&(c=0);a.intervalId=Bk.addJob(function(){hdb(a);idb(a);jdb(a)},3,6E4*(b-c)); a.currentPartitionIndex+=1}}; edb.prototype.shutdown=function(){if(void 0!==this.intervalId){Bk.cancelJob(this.intervalId);this.intervalId=void 0;--this.currentPartitionIndex;var a=gdb(this);0d?0:1E3*b<=d&&1E3*c>d?1:2}else b=3;a.yoodleVisibilityChangedCallback(1===b);vdb(a,b)},vdb=function(a,b){if(2!==b&&3!==b){var c=new Date().getTime(); b=0===b?1E3*ek("yoodle_start_time_utc")-c:1E3*ek("yoodle_end_time_utc")-c;b+=Math.floor(300*Math.random());a.currentJobId&&Bk.cancelJob(a.currentJobId);a.currentJobId=yk(Bk,function(){tdb(a)},b)}};Polymer({is:"yt-guide-manager",provides:CQ,behaviors:[Polymer.IronResizableBehavior,NO.YtActionHandlerBehavior,AO.YtComponentBehavior,IQ],properties:{data:Object,disabled:Boolean,guidePersistentAndVisible:{type:Boolean,notify:!0,observer:"guidePersistentAndVisibleChanged_"},miniGuideVisible:{type:Boolean,value:!1,notify:!0,observer:"miniGuideVisibleChanged_"},forceMiniGuideClose_:Boolean,activeEndpoint:{type:Object,notify:!0,observer:"activeEndpointChanged_"},renderGuide:{type:Boolean,notify:!0}, guideOpened_:{type:Boolean,observer:"guideOpenedChanged_"},guidePersistent_:{type:Boolean,notify:!0},guideUserStateOpened_:{type:Boolean,value:!0},pageUrl_:{type:String,observer:"pageUrlChanged_"},pageType_:String,cachedClientWidth_:{type:Number,observer:"cachedClientWidthChanged_"},guideElement:{type:Object,observer:"onGuideElementChanged_"}},observers:["computeGuidePersistentAndVisible_(guideOpened_, guidePersistent_)","observeForMiniGuideVisible_(guidePersistentAndVisible, pageUrl_, cachedClientWidth_)"], listeners:{"iron-resize":"onResize_"},actionMap:{"player-update-pre":"prePlayerUpdate_"},factoryImpl:function(){}, created:function(){this.persistentGuideWidthThreshold=ek("kevlar_persistent_guide_width_threshold",1312);this.miniGuideWidthThreshold=ek("kevlar_mini_guide_width_threshold",791);this.persistentGuideBlockedPages_="/clip /musicpremium /new /premium /red /watch".split(" ");this.animationTransitionDuration_=0;this.lateDataResolver_=Qi();this.serviceEndpoint_={signalServiceEndpoint:{signal:"LOAD_GUIDE"},commandMetadata:{webCommandMetadata:{apiUrl:"/youtubei/v1/guide"}}};this.initialGuideDataFetchFailed_= !1}, attached:function(){var a=this;this.cachedClientWidth_=A("initialBodyClientWidth",void 0)||document.body.clientWidth;this.listen(document,"yt-navigate-finish","onYtNavigateFinish_");this.listen(document,"yt-guide-toggle","onYtGuideToggle_");this.listen(document,"yt-guide-close","onYtGuideClose_");Polymer.RenderStatus.afterNextRender(this,function(){a.animationTransitionDuration_=200})}, detached:function(){this.unlisten(document,"yt-navigate-finish","onYtNavigateFinish_");this.unlisten(document,"yt-guide-toggle","onYtGuideToggle_");this.unlisten(document,"yt-guide-close","onYtGuideClose_");this.guideElement&&(this.unlisten(this.guideElement,"opened-changed","onDrawerOpenedChanged_"),this.unlisten(this.guideElement,"app-drawer-transitioned","onAppDrawerTransitioned_"),this.unlisten(this.guideElement,"app-drawer-transitioned","onAppDrawerTransitionedFromKeyInput_"))}, load:function(){return Ya(this,function b(){var c=this,d,f,g,l;return ya(b,function(m){switch(m.nextAddress){case 1:if(!window.ytInitialGuideData&&window.ytInitialGuideDataPresent)return window.loadGuideDataHook=c.lateDataResolver_.resolve.bind(c),m.return(c.lateDataResolver_.promise);if(window.ytInitialGuideData)return d=Qi(),d.resolve(window.ytInitialGuideData),m.return(d.promise);if(!N("kevlar_guide_handle_load_failure"))return m.return(c.fetchGuideData());g=!1;sa(m,3);return q(m,c.fetchGuideData(), 5);case 5:f=m.yieldResult;ta(m,4);break;case 3:l=ua(m),"Returned error"===l.message&&(g=!0);case 4:if(f)return m.return(f);c.onYtGuideClose_();g||(c.initialGuideDataFetchFailed_=!0);return m.return(c.lateDataResolver_.promise);}})})}, fetchGuideData:function(){var a;return Ya(this,function c(){var d=this,f,g;return ya(c,function(l){if(1==l.nextAddress)return q(l,d.sendServiceRequestAction([d.serviceEndpoint_]),2);f=l.yieldResult;g=rQ.instance;N("kevlar_guide_store")&&g&&(null===f||void 0===f?0:f.data)&&0!==(null===(a=f.data.responseContext)||void 0===a?void 0:a.maxAgeSeconds)&&g.put("service:guide:fallback",new pQ({innertubeResponse:f.data}));return l.return(f.data)})})}, initializeGuideDataIfEmpty:function(){return Ya(this,function b(){var c=this,d,f;return ya(b,function(g){if(1==g.nextAddress){if(!N("kevlar_guide_handle_load_failure")||!c.initialGuideDataFetchFailed_||c.data)return g.return();sa(g,2);return q(g,c.fetchGuideData(),4)}if(2!=g.nextAddress)return(d=g.yieldResult)&&c.lateDataResolver_.resolve(d),ta(g,0);f=ua(g);vm(f);oa(g)})})}, initializeGuideData_:function(){return Ya(this,function b(){var c,d=this,f;return ya(b,function(g){switch(g.nextAddress){case 1:return N("kevlar_enable_slis")&&(c=new ika,c.recordStart(Zn())),sa(g,2),q(g,d.load(),4);case 4:d.data=g.yieldResult;ta(g,3);break;case 2:ua(g),c&&c.recordEnd("FAILURE");case 3:c&&(f=d.data&&d.data.items&&0this.persistentGuideWidthThreshold}, canFitMiniGuide_:function(a){return-1===this.miniGuideWidthThreshold?!1:a>this.miniGuideWidthThreshold}, onResize_:function(){var a=this;this.debounce("calculateGuideState",function(){return a.onResizeDebounced_()})}, onResizeDebounced_:function(){this.cachedClientWidth_=document.body.clientWidth}, disableGuideAnimation_:function(){this.guideElement.transitionDuration=0}, enableGuideAnimation_:function(){this.guideElement.transitionDuration=this.animationTransitionDuration_}});var wdb;function nZ(a,b){if(N("handle_service_request_actions"))IL(b,a,b);else{a=k(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.commandExecutorCommand&&c.commandExecutorCommand.commands?nZ(c.commandExecutorCommand.commands,b):c.signalServiceEndpoint&&c.signalServiceEndpoint.actions?nZ(c.signalServiceEndpoint.actions,b):c.commandMetadata&&c.commandMetadata.webCommandMetadata&&c.commandMetadata.webCommandMetadata.sendPost?JL(b,[c]):IL(b,[c],b)}} var oZ=function(){var a=O.apply(this,arguments)||this;a.lastCallback=null;a.getAccountLinkPromises={};a.gpgCommand=null;a.actionMap={"yt-service-request":"handleServiceRequest","yt-initialize-third-party":"handleInitializeRequest","yt-link-third-party":"handleLinkRequest","yt-account-link-command":"handleAccountLinkCommand","yt-account-unlink-command":"handleAccountUnlinkCommand","yt-signal-service-endpoint":"handleSignalServiceEndpoint","yt-create-gpg-profile-command":"handleCreateGPGProfileCommand"}; return a}; p(oZ,O);e=oZ.prototype;e.created=function(){var a=new mz(A("LINK_GAL_DOMAIN",void 0),A("LINK_GAL_DOMAIN",void 0)).withApiKey(A("LINK_API_KEY",void 0)).withAuthUser(A("SESSION_INDEX",void 0)||0);a.supportedFlows=new Set([4]);this.galConfig=a.build()}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.handleServiceRequest=function(a,b){b&&((a=this.get("signalServiceEndpoint.actions.0.openPopupAction.popup",b))&&a.gamingAccountLinkSettingRenderer&&(a=a.gamingAccountLinkSettingRenderer.thirdPartyId)&&this.handleInitializeRequest(a),b.accountLinkCommand?this.handleLinkRequest(b.accountLinkCommand):b.accountUnlinkCommand&&this.handleUnlinkRequest(b.accountUnlinkCommand))}; e.handleSignalServiceEndpoint=function(a,b){var c=this,d=this.get("signalServiceEndpoint.actions.0",a);a=["ytd-gaming-account-link-confirm-dialog-renderer","ytd-gaming-account-link-setting-renderer"].find(function(f){return b.className.includes(f)}); d&&a&&(this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[a,this]),Polymer.RenderStatus.afterNextRender(this,function(){c.ytActionSenderBehavior.sendAction("yt-open-popup-action",[d,c])}))}; e.handleInitializeRequest=function(a){var b=wwa(this.galConfig);this.getAccountLinkPromises[a]=b.startLinkingSession({serviceId:a})}; e.handleAccountLinkCommand=function(a){a.accountLinkCommand&&this.handleLinkRequest(a.accountLinkCommand)}; e.handleLinkRequest=function(a){var b=this,c=a.thirdPartyId;if(c){this.logLinkStarted(c);var d=function(){b.logLinkFailed(c);b.closeAndFire("ytd-gaming-account-link-setting-renderer",a.onFailureCommand)},f=function(){b.logLinkSucceeded(c); b.closeAndFire("ytd-gaming-account-link-setting-renderer",a.onSuccessCommand)}; this.lastCallback=f;this.getAccountLinkPromises[c].then(function(g){awa(g).then(function(l){1===l.statusCode?f():d()})}).catch(function(){d()})}}; e.closeAndFire=function(a,b){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[a]);b&&nZ([b],this)}; e.handleAccountUnlinkCommand=function(a){a.accountUnlinkCommand&&this.handleUnlinkRequest(a.accountUnlinkCommand)}; e.handleUnlinkRequest=function(a){var b=this,c=a.thirdPartyId;if(c){this.logUnlinkStarted(c);var d=function(){b.logUnlinkFailed(c);b.closeAndFire("ytd-gaming-account-link-confirm-dialog-renderer",a.onFailureCommand)},f=function(){b.logUnlinkSucceeded(c); b.closeAndFire("ytd-gaming-account-link-confirm-dialog-renderer",a.onSuccessCommand)}; this.lastCallback=f;var g=wwa(this.galConfig);this.unlinkUserGal(g,c).then(function(l){1===l.statusCode?f():d()}).catch(function(){d()})}}; e.unlinkUserGal=function(a,b){return a.deleteLink(b)}; e.onServiceRequestCompleted=function(a,b){this.handleServiceRequestActions(b)}; e.handleServiceRequestActions=function(a){if(a=a.actions)for(var b=0;b";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);wdb=a}a=wdb;return a}}}); var pZ=oZ;pZ.prototype.onServiceRequestCompleted=pZ.prototype.onServiceRequestCompleted;w([P(aP.YtOpenPopupBehavior),x("design:type",Object)],pZ.prototype,"ytOpenPopupBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],pZ.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],pZ.prototype,"ytActionSenderBehavior",void 0); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],pZ.prototype,"onServiceRequestCompleted",null);pZ=w([U({is:"ytd-third-party-manager"})],pZ);var xdb;var ydb;var qZ=function(){var a=O.apply(this,arguments)||this;a.attachedPlayers_=N("kevlar_channel_trailer_multi_attach")?[]:void 0;a.player_=null;a.actionMap={"yt-alert-command":"handleAlertCommand_","yt-playlist-deletion-redirect-command":"handleYtPlaylistDeletionRedirect_"};return a}; p(qZ,O);e=qZ.prototype; e.configureRendererStamper=function(){return{mastheadAdData:{id:"masthead-ad",mapping:{bannerPromoRenderer:{component:"ytd-banner-promo-renderer",noInjection:!0},videoMastheadAdV3Renderer:{component:"ytd-video-masthead-ad-v3-renderer",noInjection:!0}},reuseComponents:!1},alertBannerData_:{id:"alert-banner",mapping:{alertWithActionsRenderer:{component:"yt-alert-with-actions-renderer",noInjection:!0}}},"data.alerts":{id:"alerts",mapping:{alertRenderer:{component:"yt-alert-renderer",noInjection:!0}, unlimitedUserNotificationRenderer:{component:"yt-unlimited-user-notification-renderer",noInjection:!0},alertWithButtonRenderer:{component:"ytd-alert-with-button-renderer",noInjection:!0}},initialRenderPriority:3,waitForSignal:"eocs"},"data.survey":{id:"survey",mapping:{surveyTriggerRenderer:{component:"ytd-survey-trigger-renderer",noInjection:!0}},initialRenderPriority:3,waitForSignal:"eocs"},"data.metadata":{id:"metadata",mapping:{channelMetadataRenderer:{component:"ytd-channel-metadata-renderer", noInjection:!0}}},"data.header":{id:"header",mapping:{c4TabbedHeaderRenderer:{component:"ytd-c4-tabbed-header-renderer",properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},interactiveTabbedHeaderRenderer:{component:"ytd-interactive-tabbed-header-renderer",properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},carouselHeaderRenderer:{component:"ytd-carousel-header-renderer",properties:{active:"[[active]]", disableGridStateAware:"[[richGrid_]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},hashtagHeaderRenderer:{component:"ytd-hashtag-header-renderer",properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0}}},"data.footer":{id:"footer",mapping:{pageFooterRenderer:{component:"ytd-page-footer-renderer",noInjection:!0}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.created=function(){this.ytRendererBehavior.monitorScroll=!0;this.pageDisposeJobs=[this.disposeMastheadAd_.bind(this)]}; e.activeChanged_=function(){var a=this.ytPageBehavior.active,b=this.$.header;b&&b.firstChild&&(b.firstChild.active=a)}; e.tabsChanged_=function(){var a,b,c,d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.contents)||void 0===b?void 0:b.twoColumnBrowseResultsRenderer)||void 0===c?void 0:c.tabs,f=this.$.header;f&&f.firstChild&&(f.firstChild.tabs=d)}; e.loadPage_=function(a){this.initCsi_();a&&(this.data=a);this.updateTitle_(this.data);this.updateAdditionalFont_(this.data);this.setMastheadAd_(this.data)}; e.getTitle_=function(a){return"home"==this.pageSubtype?"":this.get("microformat.microformatDataRenderer.title",a)?this.get("microformat.microformatDataRenderer.title",a):this.get("header.c4TabbedHeaderRenderer.title",a)?this.get("header.c4TabbedHeaderRenderer.title",a):this.get("header.feedTabbedHeaderRenderer.title",a)?CL(this.get("header.feedTabbedHeaderRenderer.title",a)):this.get("header.interactiveTabbedHeaderRenderer.title",a)?this.get("header.interactiveTabbedHeaderRenderer.title",a):""}; e.updateTitle_=function(a){this.fire("yt-update-title",this.getTitle_(a))}; e.updateAdditionalFont_=function(a){var b=new UUa;a=this.get("responseContext.webResponseContextExtensionData.webFontData.fontFamilies",a);var c=document.head.querySelectorAll("link[name=www-webfont]");c[0]&&tg(c[0]);a&&0a||this.attachedPlayers_.splice(a,1)):this.player_=null}; e.getServiceTrackingParams=function(){var a,b;return(null===(b=null===(a=this.data)||void 0===a?void 0:a.responseContext)||void 0===b?void 0:b.serviceTrackingParams)||[]}; e.setMastheadAd_=function(a){a&&a.mastheadAd&&(this.mastheadAdData=void 0);this.mastheadAdData=a&&a.mastheadAd}; e.dataChanged_=function(a){var b=this;a.onResponseReceivedActions&&a.onResponseReceivedActions.length&&this.ytActionSenderBehavior.sendInnerTubeActions(a.onResponseReceivedActions,this);if(a=this.get("onResponseReceivedEndpoints",a)){for(var c=0;c
\n
\n
\n
\n\n\n\n\n\n\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xdb){var d=document.createElement("template");d.innerHTML=""; xdb=d}d=xdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ydb=a}a=ydb;return a}}}); var rZ=qZ;rZ.prototype.onPlayerDetached_=rZ.prototype.onPlayerDetached_;rZ.prototype.onPlayerAttached_=rZ.prototype.onPlayerAttached_;rZ.prototype.tabsChanged_=rZ.prototype.tabsChanged_;rZ.prototype.activeChanged_=rZ.prototype.activeChanged_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],rZ.prototype,"ytActionHandlerBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],rZ.prototype,"ytdOpenPopupBehavior",void 0); w([P(Y),x("design:type",Object)],rZ.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],rZ.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],rZ.prototype,"ytRendererBehavior",void 0);w([P($1a),x("design:type",Object)],rZ.prototype,"ytPageBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],rZ.prototype,"ytdGuideStateAwareBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],rZ.prototype,"data",void 0);w([R(),x("design:type",Object)],rZ.prototype,"mastheadAdData",void 0);w([R({readOnly:!0,computed:"computeAlertBannerData_(data.alerts.*)"}),x("design:type",Object)],rZ.prototype,"alertBannerData_",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],rZ.prototype,"pageSubtype",void 0);w([R({computed:"computeHasSidebar_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],rZ.prototype,"hasSidebar_",void 0); w([R({computed:"computeRichGridValue_(data)"}),x("design:type",Boolean)],rZ.prototype,"richGrid_",void 0);w([yE("active"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],rZ.prototype,"activeChanged_",null);w([yE("data.contents.twoColumnBrowseResultsRenderer.tabs"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],rZ.prototype,"tabsChanged_",null); w([S("yt-player-attached"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Element]),x("design:returntype",void 0)],rZ.prototype,"onPlayerAttached_",null);w([S("yt-player-detached"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Element]),x("design:returntype",void 0)],rZ.prototype,"onPlayerDetached_",null);rZ=w([U({is:"ytd-browse"})],rZ);var zdb=function(){return O.apply(this,arguments)||this}; p(zdb,O);var Adb=zdb;Adb=w([U({is:"ytd-browse-items"})],Adb);var Bdb;var Cdb;var sZ=function(){return O.apply(this,arguments)||this}; p(sZ,O);sZ.prototype.onTap=function(a){a.preventDefault();this.data&&(a=!this.data.checked,this.set("data.checked",a),this.fire("ytd-checkbox-survey-option-changed",{checked:a,value:this.data.value}))}; h.Object.defineProperties(sZ.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.responseText?this.ytRendererBehavior.getSimpleString(this.data.responseText):""}}}); h.Object.defineProperties(sZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cdb){var a=document.createElement("template");a.innerHTML="\n [[label]]\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bdb){var d=document.createElement("template");d.innerHTML=""; Bdb=d}d=Bdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cdb=a}a=Cdb;return a}}}); var tZ=sZ;w([P(W.YtRendererBehavior),x("design:type",Object)],tZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],tZ.prototype,"data",void 0);w([zE("data.responseText"),x("design:type",String),x("design:paramtypes",[])],tZ.prototype,"label",null);tZ=w([U({is:"ytd-checkbox-survey-option-renderer"})],tZ);var Ddb;var Edb;var uZ=function(){var a=O.apply(this,arguments)||this;a.followUpSurveyCommand=null;a.selectedRatingEndpoint=null;a.actionMap={"ytd-inline-survey-rating-select-action":"handleInlineSurveyRatingSelect"};return a}; p(uZ,O);e=uZ.prototype; e.configureRendererStamper=function(){return{"data.inlineContent":{id:"inline-survey-compact-video-renderer",mapping:{compactVideoRenderer:{component:"ytd-compact-video-renderer"}}},"data.response.expandableSurveyResponseRenderer.options":{id:"rating-survey",mapping:{ratingSurveyRenderer:{component:"ytd-rating-survey-renderer"}}},"followUpSurveyCommand.followUpOptions":{id:"follow-up-survey-options",mapping:{checkboxSurveyOptionRenderer:{component:"ytd-checkbox-survey-option-renderer"}}},dismissedRenderer:{id:"dismissed", mapping:{messageRenderer:"ytd-message-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.selectedRatingEndpoint=this.followUpSurveyCommand=null;this.expanded=!1}; e.handleRequestCompletion=function(){this.hidden&&this.fire("yt-dismissable-item-dismissed")}; e.handleInlineSurveyRatingSelect=function(a,b){var c=this;this.selectedRatingEndpoint=a;this.followUpSurveyCommand=b;this.expanded=!!a;this.getOptionRenderers().forEach(function(d,f){c.notifyPath("followUpSurveyCommand.followUpOptions."+f+".checkboxSurveyOptionRenderer.checked");c.set("followUpSurveyCommand.followUpOptions."+f+".checkboxSurveyOptionRenderer.checked",!1)})}; e.onDismissTap=function(){this.hidden=!0;this.actionSenderBehavior.sendServiceRequestAction([this.get("data.dismissalEndpoint")])}; e.onSubmitTap=function(){this.selectedRatingEndpoint&&(this.actionSenderBehavior.sendServiceRequestAction([this.selectedRatingEndpoint]),this.followUpSurveyCommand&&this.submitFollowUpResponses())}; e.submitFollowUpResponses=function(){var a=this.getOptionRenderers().filter(function(c){return c.checked}); if(a.length){a=a.map(function(c){return c.responseEndpoint}); var b=[];a.forEach(function(c,d){0!==d&&c&&c.feedbackEndpoint&&c.feedbackEndpoint.feedbackToken&&b.push(c.feedbackEndpoint.feedbackToken)}); a=[a[0]];b.length&&a.push({extra_feedback_tokens:b});this.actionSenderBehavior.sendServiceRequestAction(a)}}; e.getOptionRenderers=function(){return this.followUpSurveyCommand&&this.followUpSurveyCommand.followUpOptions?this.get("followUpSurveyCommand.followUpOptions").map(function(a){return a.checkboxSurveyOptionRenderer}):[]}; h.Object.defineProperties(uZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Edb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n

\n [[getSimpleString(data.title)]]\n [[getSimpleString(data.subtitle)]]\n

\n \n
\n
\n
\n
\n \n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ddb){var d=document.createElement("template");d.innerHTML=""; Ddb=d}d=Ddb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Edb=a}a=Edb;return a}}}); var vZ=uZ;vZ.prototype.handleRequestCompletion=vZ.prototype.handleRequestCompletion;vZ.prototype.dataChanged=vZ.prototype.dataChanged;w([P(Y),x("design:type",Object)],vZ.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],vZ.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],vZ.prototype,"actionSenderBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],vZ.prototype,"ytRendererBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],vZ.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],vZ.prototype,"data",void 0);w([R(),x("design:type",Object)],vZ.prototype,"followUpSurveyCommand",void 0);w([R(),x("design:type",Object)],vZ.prototype,"selectedRatingEndpoint",void 0); w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],vZ.prototype,"expanded",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],vZ.prototype,"dataChanged",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],vZ.prototype,"handleRequestCompletion",null);vZ=w([U({is:"ytd-inline-survey-renderer"})],vZ);var Fdb;var Gdb;var wZ=function(){return O.apply(this,arguments)||this}; p(wZ,O);wZ.prototype.onTap=function(a){a.preventDefault();this.data&&this.fire("ytd-rating-survey-option-changed",this.data)}; h.Object.defineProperties(wZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gdb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fdb){var d=document.createElement("template");d.innerHTML=""; Fdb=d}d=Fdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gdb=a}a=Gdb;return a}}}); var xZ=wZ;w([P(W.YtRendererBehavior),x("design:type",Object)],xZ.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],xZ.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],xZ.prototype,"data",void 0);xZ=w([U({is:"ytd-rating-survey-option-renderer"})],xZ);var Hdb;var Idb;var yZ=function(){var a=O.apply(this,arguments)||this;a.selectedOptionText=null;a.selectedNonStarOption=null;a.notSureSelected=!1;a.hideOptions=!1;return a}; p(yZ,O);e=yZ.prototype;e.configureRendererStamper=function(){return{"data.ratings":{id:"ratings",mapping:{ratingSurveyOptionRenderer:"ytd-rating-survey-option-renderer"}}}}; e.dataChanged=function(){this.resetComponent()}; e.onOptionChange=function(a,b){var c=this;if(b.onStateIcon&&b.defaultStateIcon&&b.onStateIcon.iconType===b.defaultStateIcon.iconType)this.selectedNonStarOption=b,this.selectedOptionText=b.responseText,this.hideOptions=!0;else{var d=this.ytRendererBehavior.getSimpleString(b.responseText),f=!0;this.set("notSureSelected",!1);this.getOptionRenderers().forEach(function(l,m){c.setSurveyOptionValue(m,f,"checked");c.setSurveyOptionValue(m,!1,"selected");c.ytRendererBehavior.getSimpleString(l.responseText)=== d&&(f=!1,c.setSurveyOptionValue(m,!0,"selected"),c.selectedOptionText=l.responseText)})}a=b.responseEndpoint; if(b.followUpCommand)var g=b.followUpCommand.addFollowUpSurveyCommand;this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[a,g])}; e.getOptionRenderers=function(){return this.data&&this.data.ratings?this.data.ratings.map(function(a){return a.ratingSurveyOptionRenderer}):[]}; e.onNotSureClick=function(){this.hideOptions=this.notSureSelected=!0;this.selectedNonStarOption=null;this.selectedOptionText=this.get("data.notSureButton.buttonRenderer.text");var a=this.get("data.notSureEndpoint"),b=this.get("data.notSureButton.buttonRenderer.command.addFollowUpSurveyCommand");this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[a,b])}; e.onUndoClick=function(){this.resetComponent();this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[null,null])}; e.setSurveyOptionValue=function(a,b,c){this.notifyPath("data.ratings."+a+".ratingSurveyOptionRenderer."+c);this.set("data.ratings."+a+".ratingSurveyOptionRenderer."+c,b)}; e.resetComponent=function(){var a=this;this.selectedNonStarOption=this.selectedOptionText=null;this.hideOptions=this.notSureSelected=!1;this.getOptionRenderers().forEach(function(b,c){a.setSurveyOptionValue(c,!1,"checked");a.setSurveyOptionValue(c,!1,"selected")})}; h.Object.defineProperties(yZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Idb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hdb){var d=document.createElement("template");d.innerHTML=""; Hdb=d}d=Hdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Idb=a}a=Idb;return a}}}); var zZ=yZ;zZ.prototype.onOptionChange=zZ.prototype.onOptionChange;zZ.prototype.dataChanged=zZ.prototype.dataChanged;w([P(Y),x("design:type",Object)],zZ.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],zZ.prototype,"actionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],zZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],zZ.prototype,"data",void 0); w([R(),x("design:type",Object)],zZ.prototype,"selectedOptionText",void 0);w([R(),x("design:type",Object)],zZ.prototype,"selectedNonStarOption",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],zZ.prototype,"notSureSelected",void 0);w([R(),x("design:type",Object)],zZ.prototype,"hideOptions",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],zZ.prototype,"dataChanged",null); w([S("ytd-rating-survey-option-changed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],zZ.prototype,"onOptionChange",null);zZ=w([U({is:"ytd-rating-survey-renderer"})],zZ);var Jdb;var Kdb;var AZ=function(){var a=O.apply(this,arguments)||this;a.componentStyle="NON_CENTERED_PROFILE";return a}; p(AZ,O);AZ.prototype.configureRendererStamper=function(){return{"data.reportStats":{id:"report-stats",mapping:{profileColumnRenderer:{component:"ytd-profile-column-renderer",properties:{componentStyle:"[[componentStyle]]"}}}}}}; AZ.prototype.getIcon=function(a){return a?"settings:"+a.toLowerCase():null}; h.Object.defineProperties(AZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kdb){var a=document.createElement("template");a.innerHTML="
\n
\n
[[getSimpleString(data.pageTitle)]]
\n
[[getSimpleString(data.headerText)]]
\n \n \n \n \n \n
\n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jdb){var d=document.createElement("template");d.innerHTML=""; Jdb=d}d=Jdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kdb=a}a=Kdb;return a}}}); var BZ=AZ;w([P(W.YtRendererBehavior),x("design:type",Object)],BZ.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],BZ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],BZ.prototype,"data",void 0);BZ=w([U({is:"ytd-page-introduction-renderer"})],BZ);var Ldb;var Mdb;var CZ=function(){return O.apply(this,arguments)||this}; p(CZ,O);CZ.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{profileColumnStatsRenderer:{component:"ytd-profile-column-stats-renderer",noInjection:!0},profileColumnUserInfoRenderer:{component:"ytd-profile-column-user-info-renderer",noInjection:!0,properties:{componentStyle:"[[componentStyle]]"}}}}}}; h.Object.defineProperties(CZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mdb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ldb){var d=document.createElement("template");d.innerHTML=""; Ldb=d}d=Ldb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mdb=a}a=Mdb;return a}}}); var DZ=CZ;w([P(W.YtRendererBehavior),x("design:type",Object)],DZ.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],DZ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],DZ.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],DZ.prototype,"componentStyle",void 0);DZ=w([U({is:"ytd-profile-column-renderer"})],DZ);var Ndb;var Odb;var Pdb=function(){return O.apply(this,arguments)||this}; p(Pdb,O); h.Object.defineProperties(Pdb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Odb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.label)]]
\n
[[getSimpleString(data.value)]]
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ndb){var d=document.createElement("template");d.innerHTML=""; Ndb=d}d=Ndb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Odb=a}a=Odb;return a}}}); var EZ=Pdb;w([P(W.YtRendererBehavior),x("design:type",Object)],EZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],EZ.prototype,"data",void 0);EZ=w([U({is:"ytd-profile-column-stats-entry-renderer"})],EZ);var Qdb;var Rdb;var FZ=function(){return O.apply(this,arguments)||this}; p(FZ,O);FZ.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{profileColumnStatsEntryRenderer:{component:"ytd-profile-column-stats-entry-renderer",noInjection:!0}}}}}; h.Object.defineProperties(FZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rdb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qdb){var d=document.createElement("template");d.innerHTML=""; Qdb=d}d=Qdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rdb=a}a=Rdb;return a}}}); var GZ=FZ;w([P(Y),x("design:type",Object)],GZ.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],GZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],GZ.prototype,"data",void 0);GZ=w([U({is:"ytd-profile-column-stats-renderer"})],GZ);var Sdb;var Tdb;var HZ=function(){return O.apply(this,arguments)||this}; p(HZ,O);h.Object.defineProperties(HZ.prototype,{thumbnailWidth:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d;if(null===(a=this.data)||void 0===a||!a.useThumbnailSize)return 80;var f=null===(c=null===(b=this.data)||void 0===b?void 0:b.thumbnail)||void 0===c?void 0:c.thumbnails;return f&&(null===(d=f[0])||void 0===d?void 0:d.width)||80}}, thumbnailHeight:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d;if(null===(a=this.data)||void 0===a||!a.useThumbnailSize)return 80;var f=null===(c=null===(b=this.data)||void 0===b?void 0:b.thumbnail)||void 0===c?void 0:c.thumbnails;return f&&(null===(d=f[0])||void 0===d?void 0:d.height)||80}}}); h.Object.defineProperties(HZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tdb){var a=document.createElement("template");a.innerHTML="\n\n
[[getSimpleString(data.title)]]
\n
[[getSimpleString(data.subtitle)]]
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Sdb){var d=document.createElement("template");d.innerHTML=""; Sdb=d}d=Sdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tdb=a}a=Tdb;return a}}}); var IZ=HZ;w([P(W.YtRendererBehavior),x("design:type",Object)],IZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],IZ.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],IZ.prototype,"componentStyle",void 0);w([zE("data.useThumbnailSize"),x("design:type",Object),x("design:paramtypes",[])],IZ.prototype,"thumbnailWidth",null);w([zE("data.useThumbnailSize"),x("design:type",Object),x("design:paramtypes",[])],IZ.prototype,"thumbnailHeight",null); IZ=w([U({is:"ytd-profile-column-user-info-renderer"})],IZ);var Udb;var Vdb;var JZ=function(){return O.apply(this,arguments)||this}; p(JZ,O);JZ.prototype.configureRendererStamper=function(){return{"data.deleteButton":{id:"delete-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; h.Object.defineProperties(JZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vdb){var a=document.createElement("template");a.innerHTML="
\n

[[getSimpleString(data.title)]]

\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Udb){var d=document.createElement("template");d.innerHTML=""; Udb=d}d=Udb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vdb=a}a=Vdb;return a}}}); var KZ=JZ;w([P(W.YtRendererBehavior),x("design:type",Object)],KZ.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],KZ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],KZ.prototype,"data",void 0);KZ=w([U({is:"ytd-labs-edit-renderer"})],KZ);var Wdb;var Xdb;var LZ=function(){var a=O.apply(this,arguments)||this;a.headerBackgroundLight="https://www.gstatic.com/youtube/img/labs/early_access_header_light.png";a.headerBackgroundDark="https://www.gstatic.com/youtube/img/labs/early_access_header_dark.png";a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(LZ,O);e=LZ.prototype;e.configureRendererStamper=function(){return{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){this.setBackgroundImage(document.documentElement.hasAttribute("dark"))}; e.onDarkModeToggledAction=function(a){this.setBackgroundImage(a)}; e.setBackgroundImage=function(a){this.updateStyles({"--yt-labs-header-background":"url("+(a?this.headerBackgroundDark:this.headerBackgroundLight)+")"})}; h.Object.defineProperties(LZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xdb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.text)]]
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wdb){var d=document.createElement("template");d.innerHTML=""; Wdb=d}d=Wdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xdb=a}a=Xdb;return a}}}); var MZ=LZ;w([P(W.YtRendererBehavior),x("design:type",Object)],MZ.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],MZ.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],MZ.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],MZ.prototype,"data",void 0);MZ=w([U({is:"ytd-labs-header-renderer"})],MZ);var Ydb;var Zdb;var NZ=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-check-labs-opted-in-state":"onCheckLabsOptedInState","yt-manage-labs-state-command":"onManageLabsState"};return a}; p(NZ,O);NZ.prototype.configureRendererStamper=function(){return{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{buttonSize:"size-large"}}}},"data.feedbackButton":{id:"feedback-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{buttonSize:"size-large"}}}}}}; NZ.prototype.onYtToggleButton=function(a){this.notifyPath("data.primaryButton.toggleButtonRenderer.isToggled",a.detail.toggled)}; NZ.prototype.onManageLabsState=function(a){a.manageLabsStateCommand&&("LABS_STATE_TYPE_OVERRIDE_OPT_IN"===a.manageLabsStateCommand.stateChange&&this.data?a.manageLabsStateCommand.labsItemId!==this.data.labsItemId?this.set("data.primaryButton.toggleButtonRenderer.isToggled",!1):this.set("data.primaryButton.toggleButtonRenderer.isToggled",!0):this.data&&a.manageLabsStateCommand.labsItemId===this.data.labsItemId&&("LABS_STATE_TYPE_OPT_IN"===a.manageLabsStateCommand.stateChange?this.ytActionSenderBehavior.sendAction("yt-check-labs-opted-in-state").some(function(b){return b})? this.data.confirmationDialogCommand&&this.ytActionSenderBehavior.sendInnerTubeActions([this.data.confirmationDialogCommand],this):(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.optInCommand]),this.set("data.primaryButton.toggleButtonRenderer.isToggled",!0)):"LABS_STATE_TYPE_OPT_OUT"===a.manageLabsStateCommand.stateChange&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.optOutCommand]),this.set("data.primaryButton.toggleButtonRenderer.isToggled",!1))))}; NZ.prototype.onCheckLabsOptedInState=function(){var a=this.get("data.primaryButton.toggleButtonRenderer");return a?a.isToggled:!1}; h.Object.defineProperties(NZ.prototype,{itemStyle:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.itemStyle}}}); h.Object.defineProperties(NZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zdb){var a=document.createElement("template");a.innerHTML="
\n
\n \n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.expirationDate)]]
\n \n
\n
\n \n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ydb){var d=document.createElement("template");d.innerHTML=""; Ydb=d}d=Ydb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zdb=a}a=Zdb;return a}}}); var OZ=NZ;OZ.prototype.onYtToggleButton=OZ.prototype.onYtToggleButton;w([P(W.YtRendererBehavior),x("design:type",Object)],OZ.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],OZ.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],OZ.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],OZ.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],OZ.prototype,"data",void 0);w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Object),x("design:paramtypes",[])],OZ.prototype,"itemStyle",null);w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],OZ.prototype,"onYtToggleButton",null);OZ=w([U({is:"ytd-labs-item-renderer"})],OZ);var $db;var aeb;var PZ=function(){return O.apply(this,arguments)||this}; p(PZ,O);PZ.prototype.configureRendererStamper=function(){return{"data.deleteButton":{id:"delete-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.chip":{id:"chips",mapping:{liveChatHistorySuperChatChipRenderer:"ytd-live-chat-history-super-chat-chip-renderer",liveChatHistoryNewSponsorChipRenderer:"ytd-live-chat-history-new-sponsor-chip-renderer"}}}}; h.Object.defineProperties(PZ.prototype,{hideMessageBlock:{configurable:!0,enumerable:!0,get:function(){return!!this.data&&!this.data.charityName&&!!this.data.chip}}}); h.Object.defineProperties(PZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===aeb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n \n \n
\n
\n \n
\n [[getSimpleString(data.timestamp)]]\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$db){var d=document.createElement("template");d.innerHTML=""; $db=d}d=$db;c.call(b,d.content.cloneNode(!0),a.content.firstChild);aeb=a}a=aeb;return a}}}); var QZ=PZ;w([P(W.YtRendererBehavior),x("design:type",Object)],QZ.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],QZ.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],QZ.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],QZ.prototype,"data",void 0);w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],QZ.prototype,"hideMessageBlock",null); QZ=w([U({is:"ytd-live-chat-history-entry-renderer"})],QZ);var beb;var ceb;var deb=function(){return O.apply(this,arguments)||this}; p(deb,O); h.Object.defineProperties(deb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ceb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===beb){var d=document.createElement("template");d.innerHTML=""; beb=d}d=beb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ceb=a}a=ceb;return a}}}); var RZ=deb;w([P(W.YtRendererBehavior),x("design:type",Object)],RZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],RZ.prototype,"data",void 0);RZ=w([U({is:"ytd-live-chat-history-new-sponsor-chip-renderer"})],RZ);var eeb;var feb;var SZ=function(){return O.apply(this,arguments)||this}; p(SZ,O);SZ.prototype.observeSuperchatChip=function(a){a&&(a={"--yt-live-chat-history-super-chat-chip-renderer-background-color":this.colorFromDecimal(a.backgroundColor),"--yt-live-chat-history-super-chat-chip-renderer-text-color":this.colorFromDecimal(a.textColor)},this.updateStyles(a))}; SZ.prototype.colorFromDecimal=function(a){return eO(Number(a||0))}; h.Object.defineProperties(SZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===feb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===eeb){var d=document.createElement("template");d.innerHTML=""; eeb=d}d=eeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);feb=a}a=feb;return a}}}); var TZ=SZ;TZ.prototype.observeSuperchatChip=TZ.prototype.observeSuperchatChip;w([P(W.YtRendererBehavior),x("design:type",Object)],TZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],TZ.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],TZ.prototype,"observeSuperchatChip",null);TZ=w([U({is:"ytd-live-chat-history-super-chat-chip-renderer"})],TZ);var geb;var heb;iP("itemSectionRenderer","factCheckRenderer","ytd-fact-check-renderer");var UZ=function(){return O.apply(this,arguments)||this}; p(UZ,O);UZ.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; h.Object.defineProperties(UZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===heb){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n \n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===geb){var d=document.createElement("template");d.innerHTML=""; geb=d}d=geb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);heb=a}a=heb;return a}}}); var VZ=UZ;w([P(Y),x("design:type",Object)],VZ.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],VZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],VZ.prototype,"data",void 0);VZ=w([U({is:"ytd-fact-check-renderer"})],VZ);var ieb;var jeb;var WZ=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-text-command":"handleUpdateTextCommand"};return a}; p(WZ,O);WZ.prototype.configureRendererStamper=function(){return{"data.connectButton":{id:"connect-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer",accountLinkButtonRenderer:"ytd-account-link-button-renderer"}}}}; WZ.prototype.handleUpdateTextCommand=function(a){a.settingsUpdateTextCommand&&this.data&&this.data.id===a.settingsUpdateTextCommand.id&&this.set("data",a.settingsUpdateTextCommand)}; WZ.prototype.computeConnectedAppStyle=function(a){return a.style?a.style.toLowerCase().replace(/_/g,"-"):""}; h.Object.defineProperties(WZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jeb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
[[getSimpleString(data.title)]]
\n \n \n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ieb){var d=document.createElement("template");d.innerHTML=""; ieb=d}d=ieb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jeb=a}a=jeb;return a}}}); var XZ=WZ;w([P(Y),x("design:type",Object)],XZ.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],XZ.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],XZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],XZ.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeConnectedAppStyle(data)"}),x("design:type",String)],XZ.prototype,"connectedAppStyle",void 0); XZ=w([U({is:"ytd-connected-app-renderer"})],XZ);var keb;var leb;var YZ=function(){return O.apply(this,arguments)||this}; p(YZ,O);YZ.prototype.onSelect=function(){this.data&&this.data.onSelectCommand&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.onSelectCommand])}; h.Object.defineProperties(YZ.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.ytRendererBehavior.getSimpleString(this.data.label)}}, value:{configurable:!0,enumerable:!0,get:function(){if(this.data&&("string"===typeof this.data.stringValue||"number"===typeof this.data.int32Value))return this.data.stringValue?this.data.stringValue:this.data.int32Value}}}); h.Object.defineProperties(YZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===leb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===keb){var d=document.createElement("template");d.innerHTML=""; keb=d}d=keb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);leb=a}a=leb;return a}}}); var ZZ=YZ;w([P(W.YtRendererBehavior),x("design:type",Object)],ZZ.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],ZZ.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],ZZ.prototype,"data",void 0);w([zE("data.label"),x("design:type",String),x("design:paramtypes",[])],ZZ.prototype,"label",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],ZZ.prototype,"value",null);ZZ=w([U({is:"ytd-dropdown-item-renderer"})],ZZ);var meb;var neb;var $Z=function(){var a=O.apply(this,arguments)||this;a.value="";a.noLabelFloat=!1;a.noUnderline=!1;a.hasBackground=!1;a.verticalAlign="top";a.autosize=!1;a.minAutosizeWidth=100;a.autosizeFont="14px Roboto";return a}; p($Z,O);e=$Z.prototype;e.configureRendererStamper=function(){return{"data.entries":{id:"entries",mapping:{dropdownItemRenderer:"ytd-dropdown-item-renderer",privacyDropdownItemRenderer:"ytd-privacy-dropdown-item-renderer",navigationDropdownItemRenderer:"ytd-navigation-dropdown-item-renderer"}}}}; e.reset=function(){this.entries.selected=-1;this.entries.forceSynchronousItemUpdate();this.entries.select(this.getSelectedItem())}; e.dataChanged=function(){this.reset()}; e.stopPropagation=function(a){a.stopPropagation()}; e.autoSizeLabel=function(){if(this.autosizeFont&&this.autosize){this.canvas||(this.canvas=document.createElement("canvas"));var a=this.canvas.getContext("2d");a&&(a.font=this.autosizeFont,this.inputEl.style.width=Math.max(this.minAutosizeWidth,Number(a.measureText(this.inputEl.value).width)+24)+"px")}}; e.getSelectedItem=function(){if(!this.data||!this.data.entries)return null;for(var a=0,b=this.data.entries.length;a\n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===meb){var d=document.createElement("template");d.innerHTML=""; meb=d}d=meb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);neb=a}a=neb;return a}}}); var a_=$Z;a_.prototype.autoSizeLabel=a_.prototype.autoSizeLabel;a_.prototype.stopPropagation=a_.prototype.stopPropagation;a_.prototype.dataChanged=a_.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],a_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],a_.prototype,"ytRendererStamperBehavior",void 0);w([R(),x("design:type",Object)],a_.prototype,"data",void 0);w([R({notify:!0}),x("design:type",Object)],a_.prototype,"value",void 0); w([R(),x("design:type",Object)],a_.prototype,"noLabelFloat",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],a_.prototype,"noUnderline",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],a_.prototype,"hasBackground",void 0);w([R(),x("design:type",Object)],a_.prototype,"verticalAlign",void 0);w([R(),x("design:type",Object)],a_.prototype,"autosize",void 0);w([R(),x("design:type",Object)],a_.prototype,"minAutosizeWidth",void 0); w([R(),x("design:type",Object)],a_.prototype,"autosizeFont",void 0);w([AE("#entries"),x("design:type",Object)],a_.prototype,"entries",void 0);w([AE("#input"),x("design:type",Object)],a_.prototype,"inputEl",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],a_.prototype,"dataChanged",null); w([S("iron-overlay-opened"),S("iron-overlay-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],a_.prototype,"stopPropagation",null);w([S("iron-select"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],a_.prototype,"autoSizeLabel",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],a_.prototype,"label",null);a_=w([U({is:"ytd-dropdown-renderer"})],a_);var oeb;var peb;var qeb=function(){return O.apply(this,arguments)||this}; p(qeb,O); h.Object.defineProperties(qeb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===peb){var a=document.createElement("template");a.innerHTML=" \n \n \n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===oeb){var d=document.createElement("template");d.innerHTML=""; oeb=d}d=oeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);peb=a}a=peb;return a}}}); var b_=qeb;w([P(W.YtRendererBehavior),x("design:type",Object)],b_.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],b_.prototype,"data",void 0);w([R({computed:"getSimpleString(data.label)"}),x("design:type",String)],b_.prototype,"label",void 0);b_=w([U({is:"ytd-navigation-dropdown-item-renderer"})],b_);var reb;var seb;var teb=function(){return O.apply(this,arguments)||this}; p(teb,O); h.Object.defineProperties(teb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===seb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===reb){var d=document.createElement("template");d.innerHTML=""; reb=d}d=reb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);seb=a}a=seb;return a}}}); var c_=teb;w([P(W.YtRendererBehavior),x("design:type",Object)],c_.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],c_.prototype,"data",void 0);c_=w([U({is:"ytd-channel-options-renderer"})],c_);var ueb;var veb;var d_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-checkbox-command":"handleUpdateCheckboxCommand"};return a}; p(d_,O);d_.prototype.onCheckboxChange=function(a){this.data&&(a=Polymer.dom(a).rootTarget.checked?this.data.enableServiceEndpoint:this.data.disableServiceEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; d_.prototype.handleUpdateCheckboxCommand=function(a){a.settingsUpdateCheckboxCommand&&this.data&&this.data.id===a.settingsUpdateCheckboxCommand.id&&(this.set("data.disabled",a.settingsUpdateCheckboxCommand.disabled),this.set("data.title",a.settingsUpdateCheckboxCommand.title))}; h.Object.defineProperties(d_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===veb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n \n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ueb){var d=document.createElement("template");d.innerHTML=""; ueb=d}d=ueb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);veb=a}a=veb;return a}}}); var e_=d_;w([P(W.YtRendererBehavior),x("design:type",Object)],e_.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],e_.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],e_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],e_.prototype,"data",void 0); w([R({reflectToAttribute:!0,value:N("desktop_adjust_touch_target")}),x("design:type",Boolean)],e_.prototype,"increasedTooltipTarget",void 0);w([R({value:function(){return N("desktop_adjust_touch_target")?0:500}}), x("design:type",Number)],e_.prototype,"animationDelay",void 0);e_=w([U({is:"ytd-settings-checkbox-renderer"})],e_);var web;var xeb;var f_=function(){return O.apply(this,arguments)||this}; p(f_,O);f_.prototype.configureRendererStamper=function(){return{"data.resumeButton":{id:"resume-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}}}}; h.Object.defineProperties(f_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xeb){var a=document.createElement("template");a.innerHTML="
\n \n
[[getSimpleString(data.title)]]
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===web){var d=document.createElement("template");d.innerHTML=""; web=d}d=web;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xeb=a}a=xeb;return a}}}); var g_=f_;w([P(W.YtRendererBehavior),x("design:type",Object)],g_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],g_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],g_.prototype,"data",void 0);g_=w([U({is:"ytd-settings-email-item-renderer"})],g_);var yeb;var zeb;var h_=function(){return O.apply(this,arguments)||this}; p(h_,O);h_.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{settingsEmailItemRenderer:{component:"ytd-settings-email-item-renderer",noInjection:!0}}},"data.resumeButton":{id:"resume-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h_.prototype.getExpansionIcon=function(a){return a?"arrow_drop_up":"arrow_drop_down"}; h_.prototype.onToggleListExpansion=function(){this.expanded=!this.expanded}; h.Object.defineProperties(h_.prototype,{emailListExpanded:{configurable:!0,enumerable:!0,get:function(){return this.expanded?"true":"false"}}}); h.Object.defineProperties(h_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zeb){var a=document.createElement("template");a.innerHTML="
\n \n
[[getSimpleString(data.title)]]
\n \n \n \n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yeb){var d=document.createElement("template");d.innerHTML=""; yeb=d}d=yeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zeb=a}a=zeb;return a}}}); var i_=h_;w([P(W.YtRendererBehavior),x("design:type",Object)],i_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],i_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],i_.prototype,"data",void 0);w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],i_.prototype,"expanded",void 0);w([zE("expanded"),x("design:type",String),x("design:paramtypes",[])],i_.prototype,"emailListExpanded",null); w([AE("#options"),x("design:type",g_)],i_.prototype,"options",void 0);i_=w([U({is:"ytd-settings-email-list-renderer"})],i_);var Aeb;var Beb;var Ceb;var Deb;var j_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-refresh-form-command":"onYtRefreshFormCommand"};return a}; p(j_,O);e=j_.prototype;e.configureRendererStamper=function(){return{"data.fields":{id:"fields",mapping:{textInputFormFieldRenderer:{component:"yt-text-input-form-field-renderer",params:{required:!0},properties:{hideLabel:"[[data.hideLabels]]"}},toggleFormFieldRenderer:{component:"yt-toggle-form-field-renderer"},optionsRenderer:"yt-options-renderer",contactSectionRenderer:"yt-contact-section-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.onYtRefreshFormCommand=function(a){var b,c;(null===(c=null===(b=a.refreshFormCommand)||void 0===b?void 0:b.formRenderer)||void 0===c?0:c.formRenderer)&&this.set("data",a.refreshFormCommand.formRenderer.formRenderer)}; e.reset=function(){for(var a=this.$.fields.children,b=0;b
\n";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===Ceb){var d=document.createElement("template");d.innerHTML="";Ceb=d}d=Ceb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Deb=a}a=Deb;return a}}}); var k_=j_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],k_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],k_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],k_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],k_.prototype,"data",void 0);k_=w([uO({is:"yt-form-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],k_);var l_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm"};return a}; p(l_,O);l_.prototype.configureRendererStamper=function(){return{"data.form":{id:"username-password-form",mapping:{formRenderer:"yt-form-renderer"}},"data.claimButton":{id:"claim-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; l_.prototype.handleSignalActionSubmitForm=function(){var a,b=null===(a=this.formRenderer)||void 0===a?void 0:a.getForm();b&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint,b])}; h.Object.defineProperties(l_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Beb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Aeb){var d=document.createElement("template");d.innerHTML=""; Aeb=d}d=Aeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Beb=a}a=Beb;return a}}}); var m_=l_;w([P(W.YtRendererBehavior),x("design:type",Object)],m_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],m_.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],m_.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],m_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],m_.prototype,"data",void 0); w([AE("yt-form-renderer"),x("design:type",k_)],m_.prototype,"formRenderer",void 0);m_=w([U({is:"ytd-settings-gaia-link-renderer"})],m_);var Eeb;var Feb;var n_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-options-command":"handleUpdateOptionsCommand"};return a}; p(n_,O);n_.prototype.dataChanged=function(){this.data&&this.data.id&&"SETTINGS_OPTIONS_ID_TYPE_AV1_OPTIONS"===this.data.id&&PTa()&&this.set("data.hidden",!1)}; n_.prototype.onSwitchReady=function(){var a=this;this.data&&this.data.id&&"SETTINGS_OPTIONS_ID_TYPE_PUSH_NOTIFICATIONS_ENABLED"===this.data.id&&N("service_worker_push_enabled")&&navigator.serviceWorker.ready.then(function(){$Ua().then(function(b){b&&("default"===Notification.permission?a.set("data.hidden",!1):"granted"===Notification.permission&&ZN("NotificationsDisabled").then(function(c){c||a.ytActionSenderBehavior.sendAction("yt-toggle-settings-switch",[a.data.id]);a.set("data.hidden",!1)}).catch(function(){}))})})}; n_.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{channelOptionsRenderer:{component:"ytd-channel-options-renderer",noInjection:!0},copyLinkRenderer:{component:"yt-copy-link-renderer",noInjection:!0},dropdownRenderer:{component:"ytd-dropdown-renderer",params:{hasBackground:!0,verticalAlign:"bottom",noUnderline:!0},noInjection:!0},settingsCheckboxRenderer:{component:"ytd-settings-checkbox-renderer",noInjection:!0},settingsEmailListRenderer:{component:"ytd-settings-email-list-renderer", noInjection:!0},settingsGaiaLinkRenderer:{component:"ytd-settings-gaia-link-renderer",noInjection:!0},settingsRadioOptionRenderer:{component:"ytd-settings-radio-option-renderer",noInjection:!0},settingsSwitchRenderer:{component:"ytd-settings-switch-renderer",noInjection:!0},connectedAppRenderer:{component:"ytd-connected-app-renderer",noInjection:!0}}}}}; n_.prototype.handleUpdateOptionsCommand=function(a){a.settingsUpdateOptionsCommand&&this.data&&this.data.id===a.settingsUpdateOptionsCommand.id&&(this.set("data.hidden",a.settingsUpdateOptionsCommand.hidden),void 0!==a.settingsUpdateOptionsCommand.text&&this.set("data.text",a.settingsUpdateOptionsCommand.text),a.settingsUpdateOptionsCommand.clearOptions&&this.set("data.options",[]))}; h.Object.defineProperties(n_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Feb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Eeb){var d=document.createElement("template");d.innerHTML=""; Eeb=d}d=Eeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Feb=a}a=Feb;return a}}}); var o_=n_;o_.prototype.onSwitchReady=o_.prototype.onSwitchReady;o_.prototype.dataChanged=o_.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],o_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],o_.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],o_.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],o_.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],o_.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o_.prototype,"dataChanged",null);w([S("yt-settings-switch-ready"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o_.prototype,"onSwitchReady",null);o_=w([U({is:"ytd-settings-options-renderer"})],o_);var Geb;var Heb;var p_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-select-settings-radio-option":"onSelectOption"};return a}; p(p_,O); p_.prototype.dataChanged=function(){if(!this.data||!this.data.id||"SETTINGS_OPTIONS_ID_TYPE_AV1_SD"!==this.data.id||PTa()&&window.SourceBuffer&&window.SourceBuffer.prototype.changeType){var a;if(a=this.data&&this.data.id){a=this.data.id;if(window.localStorage&&window.localStorage["yt-player-av1-pref"]){var b=window.localStorage["yt-player-av1-pref"];b="480"===b?"SETTINGS_OPTIONS_ID_TYPE_AV1_SD":"8192"===b?"SETTINGS_OPTIONS_ID_TYPE_AV1_ALWAYS":"SETTINGS_OPTIONS_ID_TYPE_UNKNOWN"}else b="SETTINGS_OPTIONS_ID_TYPE_AV1_AUTO";a= a===b||a===QTa()}a&&this.ytActionSenderBehavior.sendAction("yt-select-settings-radio-option",[this.data.id])}else this.set("data.hidden",!0)}; p_.prototype.onButtonChanged=function(a){Polymer.dom(a).rootTarget.checked?this.data&&this.data.id&&(this.data.serviceEndpoint&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),this.ytActionSenderBehavior.sendAction("yt-select-settings-radio-option",[this.data.id])):this.$.radio.setAttribute("checked","")}; p_.prototype.onSelectOption=function(a){this.data&&this.data.id&&(this.data.id===a?this.$.radio.setAttribute("checked",""):this.$.radio.removeAttribute("checked"))}; h.Object.defineProperties(p_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Heb){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Geb){var d=document.createElement("template");d.innerHTML=""; Geb=d}d=Geb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Heb=a}a=Heb;return a}}}); var q_=p_;q_.prototype.dataChanged=q_.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],q_.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],q_.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],q_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],q_.prototype,"data",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],q_.prototype,"dataChanged",null);w([R({reflectToAttribute:!0,value:N("desktop_adjust_touch_target")}),x("design:type",Boolean)],q_.prototype,"increasedTooltipTarget",void 0);w([R({value:function(){return N("desktop_adjust_touch_target")?0:500}}), x("design:type",Number)],q_.prototype,"animationDelay",void 0);q_=w([U({is:"ytd-settings-radio-option-renderer"})],q_);var Ieb;var Jeb;var r_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-switch-command":"handleUpdateSettingsSwitch","yt-toggle-settings-switch":"onToggleSettingsSwitch"};return a}; p(r_,O);e=r_.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.fire("yt-settings-switch-ready")}; e.onSwitchChange=function(a){this.data&&(a=Polymer.dom(a).rootTarget.checked?this.data.enableServiceEndpoint:this.data.disableServiceEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; e.handleUpdateSettingsSwitch=function(a){a.settingsUpdateSwitchCommand&&this.data&&this.data.id===a.settingsUpdateSwitchCommand.id&&(a.settingsUpdateSwitchCommand.enabled?this.$.toggle.setAttribute("checked",""):this.$.toggle.removeAttribute("checked"))}; e.onToggleSettingsSwitch=function(a){this.data&&this.data.id===a&&(this.$.toggle.hasAttribute("checked")?this.$.toggle.removeAttribute("checked"):this.$.toggle.setAttribute("checked",""))}; h.Object.defineProperties(r_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jeb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ieb){var d=document.createElement("template");d.innerHTML=""; Ieb=d}d=Ieb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jeb=a}a=Jeb;return a}}}); var s_=r_;s_.prototype.dataChanged=s_.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],s_.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],s_.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],s_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],s_.prototype,"data",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],s_.prototype,"dataChanged",null);s_=w([U({is:"ytd-settings-switch-renderer"})],s_);var Keb;var Leb;var Meb;var Neb;var t_=function(){return O.apply(this,arguments)||this}; p(t_,O);t_.prototype.attached=function(){var a=this;this.root.addEventListener("click",function(){a.handleSelection()})}; t_.prototype.onKeyDown=function(a){a=a.keyCode;13!==a&&32!==a||this.handleSelection()}; t_.prototype.handleSelection=function(){this.data&&this.fire("ytd-product-details-thumbnail-renderer-selected",this.data.index)}; h.Object.defineProperties(t_.prototype,{isSelected:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.isSelected}}}); h.Object.defineProperties(t_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Neb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Meb){var d=document.createElement("template");d.innerHTML=""; Meb=d}d=Meb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Neb=a}a=Neb;return a}}}); var u_=t_;w([P(W.YtRendererBehavior),x("design:type",Object)],u_.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],u_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],u_.prototype,"data",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],u_.prototype,"isSelected",null);u_=w([U({is:"ytd-product-details-thumbnail-renderer"})],u_);var v_=function(){var a=O.apply(this,arguments)||this;a.selectedThumbnailIndex=0;a.selectItem=function(b){b.target.onKeyDown(b)}; return a}; p(v_,O);v_.prototype.configureRendererStamper=function(){return{"populatedData.imageRenderer":{id:"items",mapping:{productDetailsThumbnailRenderer:{component:"ytd-product-details-thumbnail-renderer",attributes:{role:"option"}}}}}}; v_.prototype.onThumbnailSelected=function(a,b){this.selectedThumbnailIndex=b}; v_.prototype.dataChanged=function(){this.ytdHorizontalListBehavior.reset()}; v_.prototype.updateOffset=function(){this.ytdHorizontalListBehavior.offset_=Math.max(0,Math.min(this.ytdHorizontalListBehavior.offset_,this.items.clientWidth-this.$["scroll-container"].clientWidth));this.ytdHorizontalListBehavior.reposition_()}; h.Object.defineProperties(v_.prototype,{showThumbnails:{configurable:!0,enumerable:!0,get:function(){var a,b,c;return(null===(a=this.data)||void 0===a?0:a.imageRenderer)?1<(null===(c=null===(b=this.data)||void 0===b?void 0:b.imageRenderer)||void 0===c?void 0:c.length):!1}}, thumbnailDetails:{configurable:!0,enumerable:!0,get:function(){var a,b,c;if(null===(a=this.data)||void 0===a?0:a.imageRenderer)return null===(c=null===(b=this.data.imageRenderer[this.selectedThumbnailIndex])||void 0===b?void 0:b.productDetailsThumbnailRenderer)||void 0===c?void 0:c.thumbnailDetails}}, populatedData:{configurable:!0,enumerable:!0,get:function(){var a=this,b,c,d,f=null!==(d=null===(c=null===(b=this.data)||void 0===b?void 0:b.imageRenderer)||void 0===c?void 0:c.map(function(g,l){return{productDetailsThumbnailRenderer:Object.assign(Object.assign({},g.productDetailsThumbnailRenderer),{index:l,isSelected:l===a.selectedThumbnailIndex})}}))&&void 0!==d?d:[]; return Object.assign(Object.assign({},this.data),{imageRenderer:f})}}}); h.Object.defineProperties(v_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Leb){var a=document.createElement("template");a.innerHTML="
\n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Keb){var d=document.createElement("template");d.innerHTML=""; Keb=d}d=Keb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Leb=a}a=Leb;return a}}}); var w_=v_;w_.prototype.updateOffset=w_.prototype.updateOffset;w_.prototype.dataChanged=w_.prototype.dataChanged;w_.prototype.onThumbnailSelected=w_.prototype.onThumbnailSelected;w([P(W.YtRendererBehavior),x("design:type",Object)],w_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],w_.prototype,"ytRendererstamperBehavior",void 0);w([P(NQ.YtdHorizontalListBehavior),x("design:type",Object)],w_.prototype,"ytdHorizontalListBehavior",void 0); w([P(AO.YtComponentBehavior),x("design:type",Object)],w_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],w_.prototype,"data",void 0);w([R({value:"$.items.children"}),x("design:type",String)],w_.prototype,"itemsPath",void 0);w([R({value:3}),x("design:type",Number)],w_.prototype,"initialCount",void 0);w([AE("#items"),x("design:type",u_)],w_.prototype,"items",void 0);w([R(),x("design:type",Object)],w_.prototype,"selectedThumbnailIndex",void 0); w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],w_.prototype,"showThumbnails",null);w([S("ytd-product-details-thumbnail-renderer-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Number]),x("design:returntype",void 0)],w_.prototype,"onThumbnailSelected",null);w([zE("data","selectedThumbnailIndex"),x("design:type",Object),x("design:paramtypes",[])],w_.prototype,"thumbnailDetails",null); w([zE("data","selectedThumbnailIndex"),x("design:type",Object),x("design:paramtypes",[])],w_.prototype,"populatedData",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],w_.prototype,"dataChanged",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],w_.prototype,"updateOffset",null);w_=w([U({is:"ytd-product-details-image-carousel-renderer"})],w_);var Oeb;var Peb;var Qeb=function(){return O.apply(this,arguments)||this}; p(Qeb,O); h.Object.defineProperties(Qeb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Peb){var a=document.createElement("template");a.innerHTML="
\n \n
\n [[data.vendorName]]\n [[data.offerTags]]\n
\n
\n \n [[data.additionalFeesText]]\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Oeb){var d=document.createElement("template");d.innerHTML=""; Oeb=d}d=Oeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Peb=a}a=Peb;return a}}}); var x_=Qeb;w([P(W.YtRendererBehavior),x("design:type",Object)],x_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],x_.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],x_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],x_.prototype,"data",void 0);x_=w([U({is:"ytd-product-details-offer-renderer"})],x_);var Reb;var Seb;var Teb,y_=function(){var a=O.apply(this,arguments)||this;a.isOffersHidden=!0;a.vendorLogoUrls=[];return a}; p(y_,O);y_.prototype.toggleOffers=function(){this.isOffersHidden=!this.isOffersHidden}; y_.prototype.configureRendererStamper=function(){return{"data.offers":{id:"offer",mapping:{productDetailsOfferRenderer:"ytd-product-details-offer-renderer"}}}}; h.Object.defineProperties(y_.prototype,{getVendorLogoUrls:{configurable:!0,enumerable:!0,get:function(){for(var a,b,c,d=k(null!==(b=null===(a=this.data)||void 0===a?void 0:a.offers)&&void 0!==b?b:[]),f=d.next();!f.done;f=d.next())f=f.value.productDetailsOfferRenderer,void 0!==this.vendorLogoUrls&&this.vendorLogoUrls.length
\n
\n \n \n \n
\n \n \n
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Reb){var d=document.createElement("template");d.innerHTML=""; Reb=d}d=Reb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Seb=a}a=Seb;return a}}}); var z_=Teb=y_;z_.MAX_VENDOR_LOGO_URLS_DISPLAYED=3;w([P(W.YtRendererBehavior),x("design:type",Object)],z_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],z_.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],z_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],z_.prototype,"data",void 0);w([R(),x("design:type",Object)],z_.prototype,"isOffersHidden",void 0); w([R(),x("design:type",Array)],z_.prototype,"vendorLogoUrls",void 0);w([zE("data"),x("design:type",Array),x("design:paramtypes",[])],z_.prototype,"getVendorLogoUrls",null);z_=Teb=w([U({is:"ytd-product-details-offers-container-renderer"})],z_);var Ueb;var Veb;var Web;var Xeb;var A_=function(){var a=O.apply(this,arguments)||this;a.shownElements=0;a.initialized=!1;a.computeVariantsDebouncer=null;a.computeVariants=function(){var b;if("VARIANT_ATTRIBUTE_DISPLAY_TYPE_IMAGE"!==(null===(b=a.data)||void 0===b?void 0:b.displayType)){for(var c=k(a.items.children),d=c.next();!d.done;d=c.next())d.value.hidden=!0;c=a.container.getBoundingClientRect().width;var f=a.moreVariantsButton.getBoundingClientRect().width;c-=f;var g=f=0,l=k(a.items.children);for(d=l.next();!d.done;d=l.next())if(d= d.value,d.hidden=!1,d=d.getBoundingClientRect().width+8,f+d
\n
\n
[[data.title]]
[[selectedOptionName]]
\n
\n
\n
\n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Web){var d=document.createElement("template");d.innerHTML=""; Web=d}d=Web;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xeb=a}a=Xeb;return a}}}); var B_=A_;B_.prototype.debouncedComputeVariants=B_.prototype.debouncedComputeVariants;w([P(W.YtRendererBehavior),x("design:type",Object)],B_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],B_.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],B_.prototype,"componentBehavior",void 0);w([P(iI),x("design:type",Object)],B_.prototype,"ironResizableBehavior",void 0); w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],B_.prototype,"ytdOpenPopupBehavior",void 0);w([R(),x("design:type",Object)],B_.prototype,"data",void 0);w([R(),x("design:type",Object)],B_.prototype,"shownElements",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],B_.prototype,"initialized",void 0);w([AE("#items"),x("design:type",HTMLDivElement)],B_.prototype,"items",void 0);w([AE("#container"),x("design:type",HTMLDivElement)],B_.prototype,"container",void 0); w([AE("#more-variants-button"),x("design:type",HTMLElement)],B_.prototype,"moreVariantsButton",void 0);w([zE("data"),x("design:type",String),x("design:paramtypes",[])],B_.prototype,"selectedOptionName",null);w([yE("data"),S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],B_.prototype,"debouncedComputeVariants",null);w([zE("data"),x("design:type",String),x("design:paramtypes",[])],B_.prototype,"displayType",null); w([zE("displayType"),x("design:type",Object),x("design:paramtypes",[])],B_.prototype,"variantItemsClassname",null);w([zE("data","shownElements"),x("design:type",Boolean),x("design:paramtypes",[])],B_.prototype,"hideDropdown",null);B_=w([U({is:"ytd-product-details-variant-renderer"})],B_);var C_=function(){return O.apply(this,arguments)||this}; p(C_,O);C_.prototype.dataChanged=function(){""!==this.data.additionalFeesText&&(this.showAdditionalFees=!0)}; C_.prototype.configureRendererStamper=function(){return{"data.imageCarouselRenderer":{id:"image-carousel-renderer",mapping:{productDetailsImageCarouselRenderer:"ytd-product-details-image-carousel-renderer"}},"data.variants":{id:"variants",mapping:{productDetailsVariantRenderer:"ytd-product-details-variant-renderer"}},"data.offersContainerRenderer":{id:"offers",mapping:{productDetailsOffersContainerRenderer:"ytd-product-details-offers-container-renderer"}},"data.informationButton":{id:"information-button", mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(C_.prototype,{showPurchaseData:{configurable:!0,enumerable:!0,get:function(){var a,b;return!(null===(a=this.data)||void 0===a||!a.formattedFromMerchantText)&&!(null===(b=this.data)||void 0===b||!b.primaryPurchaseButtonRenderer)}}, showBrandText:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.formattedByBrandText)}}, showBrandLogo:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.brandLogoUrl)}}, showOffers:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.offersContainerRenderer)}}, showBuySeparator:{configurable:!0,enumerable:!0,get:function(){return this.showOffers&&this.showPurchaseData}}, showBuyCard:{configurable:!0,enumerable:!0,get:function(){return this.showOffers||this.showPurchaseData}}, heroOfferPrice:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d,f,g=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.offersContainerRenderer)||void 0===b?void 0:b.productDetailsOffersContainerRenderer)||void 0===c?void 0:c.offers;return g&&0
\n
\n \n
\n
\n
\n
[[getSimpleString(data.title)]]
\n
\n
\n
\n \n \n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ueb){var d=document.createElement("template");d.innerHTML=""; Ueb=d}d=Ueb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Veb=a}a=Veb;return a}}}); var D_=C_;D_.prototype.dataChanged=D_.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],D_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],D_.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],D_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],D_.prototype,"data",void 0);w([R(),x("design:type",Boolean)],D_.prototype,"showAdditionalFees",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],D_.prototype,"dataChanged",null);w([AE("#image-carousel-renderer"),x("design:type",w_)],D_.prototype,"imageCarouselRenderer",void 0);w([AE("#variants"),x("design:type",B_)],D_.prototype,"productDetailsVariantRenderer",void 0);w([AE("#offersContainerRenderer"),x("design:type",z_)],D_.prototype,"productDetailsOffersContainerRenderer",void 0); w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],D_.prototype,"showPurchaseData",null);w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],D_.prototype,"showBrandText",null);w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],D_.prototype,"showBrandLogo",null);w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],D_.prototype,"showOffers",null); w([zE("showOffers","showPurchaseData"),x("design:type",Boolean),x("design:paramtypes",[])],D_.prototype,"showBuySeparator",null);w([zE("showOffers","showPurchaseData"),x("design:type",Boolean),x("design:paramtypes",[])],D_.prototype,"showBuyCard",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],D_.prototype,"heroOfferPrice",null);D_=w([U({is:"ytd-product-details-renderer"})],D_);var Yeb;var Zeb;var E_=function(){return O.apply(this,arguments)||this}; p(E_,O);h.Object.defineProperties(E_.prototype,{isImageButton:{configurable:!0,enumerable:!0,get:function(){return"VARIANT_ATTRIBUTE_DISPLAY_TYPE_IMAGE"===this.displayType}}, isPillButton:{configurable:!0,enumerable:!0,get:function(){return"VARIANT_ATTRIBUTE_DISPLAY_TYPE_PILL"===this.displayType||"VARIANT_ATTRIBUTE_DISPLAY_TYPE_DROPDOWN_LIST"===this.displayType}}, isActive:{configurable:!0,enumerable:!0,get:function(){var a;return"VARIANT_OPTION_STATE_SELECTED"===(null===(a=this.data)||void 0===a?void 0:a.variantOptionState)}}, isSubstitute:{configurable:!0,enumerable:!0,get:function(){var a;return"VARIANT_OPTION_STATE_OTHER_ATTRIBUTE_WILL_CHANGE"===(null===(a=this.data)||void 0===a?void 0:a.variantOptionState)}}, hasNoOffers:{configurable:!0,enumerable:!0,get:function(){var a;return"VARIANT_AVAILABILITY_NO_OFFERS"===(null===(a=this.data)||void 0===a?void 0:a.variantAvailability)}}}); h.Object.defineProperties(E_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zeb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Yeb){var d=document.createElement("template");d.innerHTML=""; Yeb=d}d=Yeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zeb=a}a=Zeb;return a}}}); var F_=E_;w([P(W.YtRendererBehavior),x("design:type",Object)],F_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],F_.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],F_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],F_.prototype,"data",void 0);w([R(),x("design:type",String)],F_.prototype,"displayType",void 0); w([zE("displayType","data"),x("design:type",Boolean),x("design:paramtypes",[])],F_.prototype,"isImageButton",null);w([zE("displayType","data"),x("design:type",Boolean),x("design:paramtypes",[])],F_.prototype,"isPillButton",null);w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],F_.prototype,"isActive",null);w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],F_.prototype,"isSubstitute",null); w([zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],F_.prototype,"hasNoOffers",null);F_=w([U({is:"ytd-product-details-variant-option-renderer"})],F_);var $eb;var afb;iP("vcBalanceRenderer","vcBalanceRenderer","ytd-vc-balance-renderer");var G_=function(){return O.apply(this,arguments)||this}; p(G_,O);h.Object.defineProperties(G_.prototype,{formattedAmount:{configurable:!0,enumerable:!0,get:function(){return this.vcBalanceEntity&&this.vcBalanceEntity.formattedAmount?this.vcBalanceEntity.formattedAmount:""}}, vcBalanceAriaLabel:{configurable:!0,enumerable:!0,get:function(){return this.vcBalanceEntity&&this.vcBalanceEntity.accessibilityFormattedAmount?this.vcBalanceEntity.accessibilityFormattedAmount:""}}}); h.Object.defineProperties(G_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===afb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$eb){var d=document.createElement("template");d.innerHTML="";$eb=d}d=$eb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);afb=a}a=afb; return a}}}); var H_=G_;w([P(W.YtRendererBehavior),x("design:type",Object)],H_.prototype,"ytRendererBehavior",void 0);w([P(IQ),x("design:type",Object)],H_.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],H_.prototype,"data",void 0);w([R({selectorArgs:["data.vcBalanceEntityKey"],selector:function(a,b){return aM(a.entities,"vcBalanceEntity",b)}}), x("design:type",Object)],H_.prototype,"vcBalanceEntity",void 0);w([zE("vcBalanceEntity"),x("design:type",String),x("design:paramtypes",[])],H_.prototype,"formattedAmount",null);w([zE("vcBalanceEntity"),x("design:type",String),x("design:paramtypes",[])],H_.prototype,"vcBalanceAriaLabel",null);H_=w([U({is:"ytd-vc-balance-renderer"})],H_);var bfb;var cfb;var I_=function(){return O.apply(this,arguments)||this}; p(I_,O);I_.prototype.configureRendererStamper=function(){return{"data.vcIcon":{id:"vc-icon",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}}}}; h.Object.defineProperties(I_.prototype,{vcBalanceWidgetStyle:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?this.data.style:"VC_BALANCE_WIDGET_STYLE_UNKNOWN"}}}); h.Object.defineProperties(I_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===cfb){var a=document.createElement("template");a.innerHTML="
\n
\n

[[formattedAmount]]

\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bfb){var d=document.createElement("template");d.innerHTML=""; bfb=d}d=bfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);cfb=a}a=cfb;return a}}}); var J_=I_;w([P(W.YtRendererBehavior),x("design:type",Object)],J_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],J_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],J_.prototype,"data",void 0);w([R(),x("design:type",String)],J_.prototype,"formattedAmount",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],J_.prototype,"ariaLabel",void 0); w([R({reflectToAttribute:!0}),zE("data.style"),x("design:type",String),x("design:paramtypes",[])],J_.prototype,"vcBalanceWidgetStyle",null);J_=w([uO({is:"yt-vc-balance-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],J_);var dfb;var efb;var K_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-video-masthead-ad-primary-video-renderer-playing":"onPlayerReady_"};return a}; p(K_,O);e=K_.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more_vert"}}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.updateChannelBanner_()}; e.dataChanged_=function(){this.updateChannelBanner_()}; e.updateChannelBanner_=function(){if(this.data&&this.data.channelBanner){var a=MO(this.data.channelBanner.thumbnails,this.clientWidth);a&&(a.startsWith("//")&&(a="https:"+a),this.classList.add("channel-banner"),this.updateStyles({"--ytvmh-channel-banner":"url("+a+")"}))}}; e.onPlayerReady_=function(){this.onIronResize_()}; e.onIronResize_=function(){211>this.clientWidth?this.classList.add("no-thumbnail"):this.classList.remove("no-thumbnail");var a=this.$$("#banner");a&&(a.style.height=602>this.clientWidth?sh(.273*a.clientWidth,!0):sh(.165*a.clientWidth,!0))}; h.Object.defineProperties(K_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===efb){var a=document.createElement("template");a.innerHTML="\n\n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dfb){var d=document.createElement("template");d.innerHTML=""; dfb=d}d=dfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);efb=a}a=efb;return a}}}); var L_=K_;L_.prototype.onIronResize_=L_.prototype.onIronResize_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],L_.prototype,"ironResizableBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],L_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],L_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],L_.prototype,"ytRendererstamperBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],L_.prototype,"data",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],L_.prototype,"onIronResize_",null);L_=w([U({is:"ytd-video-masthead-ad-advertiser-info-renderer"})],L_);var ffb;var gfb;var M_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-video-masthead-expandable-tile-expanding":"onExpandableTileExpanding_","ytd-video-masthead-expandable-tile-lock-and-collapse":"onExpandableTileLockAndCollapse_","ytd-video-masthead-expandable-tile-unlock":"onExpandableTileUnlock_"};a.isLocked_=!1;return a}; p(M_,O);e=M_.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.maybeExpand_=function(){this.isLocked_||this.expanded||(this.expanded=!0)}; e.onExpandedChanged_=function(){this.expanded&&this.ytActionSenderBehavior.sendOptionalAction("ytd-video-masthead-expandable-tile-expanding",[this])}; e.onMouseOver_=function(){this.maybeExpand_()}; e.onTap_=function(){this.maybeExpand_()}; e.onExpandableTileExpanding_=function(a){a!=this&&(this.expanded=!1)}; e.onExpandableTileLockAndCollapse_=function(a){this.isLocked_=!0;a!=this&&(this.expanded=!1)}; e.onExpandableTileUnlock_=function(){this.isLocked_=!1}; h.Object.defineProperties(M_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gfb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n \n \n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ffb){var d=document.createElement("template");d.innerHTML=""; ffb=d}d=ffb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);gfb=a}a=gfb;return a}}}); var N_=M_;N_.prototype.onTap_=N_.prototype.onTap_;N_.prototype.onMouseOver_=N_.prototype.onMouseOver_;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],N_.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],N_.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],N_.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],N_.prototype,"data",void 0); w([R({observer:"onExpandedChanged_",reflectToAttribute:!0}),x("design:type",Object)],N_.prototype,"expanded",void 0);w([S("mouseover"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],N_.prototype,"onMouseOver_",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],N_.prototype,"onTap_",null);N_=w([U({is:"ytd-video-masthead-ad-expandable-thumbnail-tile-renderer"})],N_);var hfb;var ifb;var O_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-video-masthead-expandable-tile-expanding":"onExpandableTileExpanding_","ytd-video-masthead-expandable-tile-lock-and-collapse":"onExpandableTileLockAndCollapse_","ytd-video-masthead-expandable-tile-unlock":"onExpandableTileUnlock_"};a.playbackFinished_=!1;return a}; p(O_,O);e=O_.prototype;e.configureRendererStamper=function(){return{"data.muteButton":{id:"mute-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.replayButton":{id:"replay-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.created=function(){this.playerManager_=new hO}; e.ready=function(){var a=this;PUa(this.playerManager_,this.$.player,function(){return a.onPlaybackEnded()}); this.$["replay-button"].addEventListener("click",function(){var b;(null===(b=a.data)||void 0===b?0:b.navigationEndpoint)&&a.fire("yt-navigate",{endpoint:a.data.navigationEndpoint})})}; e.onPlaybackEnded=function(){this.classList.remove("video-playing");this.classList.add("video-ended");this.unlockExpandableTiles_();this.playbackFinished_=!0}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.async(function(){return a.maybePlayVideo_()})}; e.maybePlayVideo_=function(){this.expanded&&this.isAttached&&this.data&&this.data.videoId&&!this.playbackFinished_&&(this.classList.add("video-playing"),this.lockAndCollapseExpandableTiles_(),this.playerManager_.playVideo())}; e.dataChanged_=function(){this.data&&(QUa(this.playerManager_,this.data.videoId,this.data.playbackStartMs,this.data.playbackDurationMs,this.data.playerParams),this.maybePlayVideo_())}; e.getPlayerPromise=function(){return this.playerManager_.getPlayerPromise()}; e.onYtToggleButton_=function(a){a.detail.toggled?this.playerManager_.mute():this.playerManager_.unMute()}; e.onYtNavigate_=function(a){var b=RUa(a.detail.endpoint),c=SUa(this.data.clickthroughReportingData);b&&c&&(a.detail.endpoint.watchEndpoint?a.detail.tempData=c:rJ(b,c,ek("desktop_polymer_video_masthead_session_tempdata_ttl")))}; e.maybeExpand_=function(){this.isLocked_||this.expanded||(this.expanded=!0)}; e.onExpandedChanged_=function(){this.expanded?(this.ytActionSenderBehavior.sendOptionalAction("ytd-video-masthead-expandable-tile-expanding",[this]),this.maybePlayVideo_()):this.playerManager_.stopVideo()}; e.onMouseOver_=function(){this.maybeExpand_()}; e.onTap_=function(){this.maybeExpand_()}; e.onExpandableTileExpanding_=function(a){a!=this&&(this.playerManager_.stopVideo(),this.expanded=!1)}; e.onExpandableTileLockAndCollapse_=function(a){a!=this&&(this.isLocked_=!0,this.expanded=!1)}; e.onExpandableTileUnlock_=function(){this.isLocked_=!1}; e.lockAndCollapseExpandableTiles_=function(){this.ytActionSenderBehavior.sendAction("ytd-video-masthead-expandable-tile-lock-and-collapse",[this])}; e.unlockExpandableTiles_=function(){this.ytActionSenderBehavior.sendAction("ytd-video-masthead-expandable-tile-unlock")}; h.Object.defineProperties(O_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ifb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hfb){var d=document.createElement("template");d.innerHTML=""; hfb=d}d=hfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ifb=a}a=ifb;return a}}}); var P_=O_;P_.prototype.onTap_=P_.prototype.onTap_;P_.prototype.onMouseOver_=P_.prototype.onMouseOver_;P_.prototype.onYtNavigate_=P_.prototype.onYtNavigate_;P_.prototype.onYtToggleButton_=P_.prototype.onYtToggleButton_;w([P(Y),x("design:type",Object)],P_.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],P_.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],P_.prototype,"ytActionSenderBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],P_.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],P_.prototype,"data",void 0);w([R({observer:"onExpandedChanged_",reflectToAttribute:!0}),x("design:type",Object)],P_.prototype,"expanded",void 0);w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],P_.prototype,"onYtToggleButton_",null); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],P_.prototype,"onYtNavigate_",null);w([S("mouseover"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],P_.prototype,"onMouseOver_",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],P_.prototype,"onTap_",null);P_=w([U({is:"ytd-video-masthead-ad-expandable-video-tile-renderer"})],P_);var jfb;var kfb;var Q_=function(){return O.apply(this,arguments)||this}; p(Q_,O);Q_.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; h.Object.defineProperties(Q_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kfb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n \n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jfb){var d=document.createElement("template");d.innerHTML=""; jfb=d}d=jfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kfb=a}a=kfb;return a}}}); var R_=Q_;w([P(W.YtRendererBehavior),x("design:type",Object)],R_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],R_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],R_.prototype,"data",void 0);R_=w([U({is:"ytd-video-masthead-ad-primary-video-overlay-renderer"})],R_);var lfb;var mfb;var S_=function(){return O.apply(this,arguments)||this}; p(S_,O);e=S_.prototype;e.configureRendererStamper=function(){return{"data.muteButton":{id:"mute-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.replayButton":{id:"replay-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.created=function(){this.playerManager_=new hO}; e.ready=function(){var a=this;PUa(this.playerManager_,this.$.player,function(){return a.onPlaybackEnded()}); this.$["replay-button"].addEventListener("click",function(){a.data&&a.data.navigationEndpoint&&a.fire("yt-navigate",{endpoint:a.data.navigationEndpoint})})}; e.onPlaybackEnded=function(){this.classList.remove("video-playing");this.classList.add("video-ended")}; e.dataChanged_=function(){var a=this;this.data&&("string"===typeof this.data.videoId&&(QUa(this.playerManager_,this.data.videoId,this.data.playbackStartMs,this.data.playbackDurationMs,this.data.playerParams||void 0),this.playerManager_.playVideo(),this.classList.add("video-playing"),this.getPlayerPromise().then(function(){a.ytActionSenderBehavior.sendAction("ytd-video-masthead-ad-primary-video-renderer-playing")})),this.data.isWidescreen&&this.$["player-container"].classList.add("widescreen"))}; e.getPlayerPromise=function(){return this.playerManager_.getPlayerPromise()}; e.onYtToggleButton_=function(a){a.detail.toggled?this.playerManager_.mute():this.playerManager_.unMute()}; e.onYtNavigate_=function(a){var b=RUa(a.detail.endpoint),c=SUa(this.data.clickthroughReportingData);b&&c&&(a.detail.endpoint.watchEndpoint?a.detail.tempData=c:rJ(b,c,ek("desktop_polymer_video_masthead_session_tempdata_ttl")))}; h.Object.defineProperties(S_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mfb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lfb){var d=document.createElement("template");d.innerHTML=""; lfb=d}d=lfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mfb=a}a=mfb;return a}}}); var T_=S_;T_.prototype.onYtNavigate_=T_.prototype.onYtNavigate_;T_.prototype.onYtToggleButton_=T_.prototype.onYtToggleButton_;w([P(Y),x("design:type",Object)],T_.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],T_.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],T_.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],T_.prototype,"data",void 0); w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],T_.prototype,"onYtToggleButton_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],T_.prototype,"onYtNavigate_",null);T_=w([U({is:"ytd-video-masthead-ad-primary-video-renderer"})],T_);var nfb;var ofb;var U_=function(){var a=O.apply(this,arguments)||this;a.collapsed=!1;a.isServerSideContext_=!1;a.impressionResolver_=Qi();a.activeViewMeasurementDataResolver_=Qi();a.MASTHEAD_PREF_KEY_="HIDDEN_MASTHEAD_ID";a.actionMap={"yt-mute-ad-action":"handleMuteAd_"};return a}; p(U_,O);e=U_.prototype;e.configureRendererStamper=function(){return{"data.expandableTiles":{id:"expandable-tile-container",mapping:{videoMastheadAdExpandableThumbnailTileRenderer:"ytd-video-masthead-ad-expandable-thumbnail-tile-renderer",videoMastheadAdExpandableVideoTileRenderer:"ytd-video-masthead-ad-expandable-video-tile-renderer"}},"data.showAdRenderer":{id:"show-ad",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.ready=function(){var a=this;this.$["show-ad"].addEventListener("click",this.expandAd_.bind(this));this.addEventListener("yt-action",function(b){if("yt-service-request"==b.detail.actionName){var c=b.detail.args[1];c.videoMastheadAdMuteCommand&&(a.collapseAd_(c.videoMastheadAdMuteCommand.encryptedMastheadId),b.stopPropagation())}}); this.isServerSideContext_=!this.classList.contains("client-side")}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.async(this.ironResizableBehavior.notifyResize);this.impressionResolver_.promise.then(function(b){a.collapsed||(b.forEach(function(c){Sn(c.baseUrl)}),a.data.impressionCommand=void 0)}); this.activeViewMeasurementDataResolver_.promise.then(function(b){dQ(a.ytdActiveViewBehavior,b,14)})}; e.dataChanged_=function(){var a,b;(null===(a=this.data.impressionCommand)||void 0===a?0:a.loggingUrls)&&this.impressionResolver_.resolve(this.data.impressionCommand.loggingUrls);(null===(b=this.data)||void 0===b?0:b.activeView)&&this.activeViewMeasurementDataResolver_.resolve(this.data.activeView);var c=this.get("data.showAdRenderer.buttonRenderer.command.videoMastheadAdMuteCommand");c&&this.restoreCollapsedState_(c.encryptedMastheadId);this.collapsed&&(this.data.primaryVideo&&(this.data.primaryVideo= void 0),this.data.expandableTiles&&(this.data.expandableTiles=void 0))}; e.computeWidescreen_=function(a){return!!(a&&a.videoMastheadAdPrimaryVideoRenderer&&a.videoMastheadAdPrimaryVideoRenderer.isWidescreen)}; e.computeExpandable_=function(a){return!!(a&&0
\n
\n \n \n
\n \n
\n
\n \n \n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(PV().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nfb){var d=document.createElement("template");d.innerHTML=""; nfb=d}d=nfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ofb=a}a=ofb;return a}}}); var V_=U_;V_.prototype.onIronResize_=V_.prototype.onIronResize_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],V_.prototype,"ironResizableBehavior",void 0);w([P(eQ),x("design:type",Object)],V_.prototype,"ytdActiveViewBehavior",void 0);w([P(BQ),x("design:type",Object)],V_.prototype,"ytdGridStateAwareBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],V_.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],V_.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],V_.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],V_.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeWidescreen_(data.primaryVideo)"}),x("design:type",Boolean)],V_.prototype,"widescreen",void 0); w([R({reflectToAttribute:!0,computed:"computeExpandable_(data.expandableTiles)"}),x("design:type",Boolean)],V_.prototype,"expandable",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],V_.prototype,"collapsed",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],V_.prototype,"onIronResize_",null);V_=w([U({is:"ytd-video-masthead-ad-v3-renderer"})],V_);var pfb;var qfb;var W_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-button-refresh-action":"handleButtonRefreshAction_","yt-insert-channel-tab-command":"handleInsertTabCommand_","ytd-refresh-channel-tab-action":"handleRefreshChannelTabAction_","yt-unsubscribe-action":"handleUnsubscribeAction_"};return a}; p(W_,O);e=W_.prototype; e.configureRendererStamper=function(){return{"data.purchaseButton":{id:"purchase-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.sponsorButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}},"data.editChannelButtons":{id:"edit-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}, "data.otherButtons":{id:"other-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.bannerEditor":{id:"banner-editor",mapping:{channelBannerEditorRenderer:"ytd-channel-banner-editor-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.data&&this.dataChanged_(this.data)}; e.handleButtonRefreshAction_=function(a){a.buttonRefreshAction&&this.set("data.sponsorButton",a.buttonRefreshAction.membershipButton)}; e.handleInsertTabCommand_=function(a){if(a.insertChannelTabCommand){var b=a.insertChannelTabCommand;b.externalChannelId==this.data.channelId&&(b.tabIdentifier&&this.ytdTabbedHeaderBehavior.tabs.some(function(c){return c.tabRenderer&&c.tabRenderer.tabIdentifier==b.tabIdentifier})||this.splice("tabs",b.tabIndex||-1,0,b.tab))}}; e.handleRefreshChannelTabAction_=function(a){this.ytdTabbedHeaderBehavior.selected&&this.ytdTabbedHeaderBehavior.tabs[this.ytdTabbedHeaderBehavior.selected].tabRenderer.tabIdentifier==a&&this.fire("yt-navigate",{endpoint:this.ytdGuideStateAwareBehavior.activeEndpoint})}; e.dataChanged_=function(){var a=this.hasChannelArt;this.hasChannelArt=!1;if(this.data&&this.data.banner){var b=MO(this.data.banner.thumbnails,this.clientWidth);b&&(0==b.indexOf("//")&&(b="https:"+b),this.hasChannelArt=!0,this.updateStyles({"--yt-channel-banner":"url("+b+")"}))}this.hasChannelArt!=a&&this.$.header.fire("iron-resize")}; e.onBannerUpdated_=function(a,b){a=1
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pfb){var d=document.createElement("template");d.innerHTML=""; pfb=d}d=pfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qfb=a}a=qfb;return a}}}); var X_=W_;X_.prototype.observeLightsourcePalette_=X_.prototype.observeLightsourcePalette_;X_.prototype.onBannerUpdated_=X_.prototype.onBannerUpdated_;w([P(S1a),x("design:type",Object)],X_.prototype,"ytdTabbedHeaderBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],X_.prototype,"ytActionHandlerBehavior",void 0);w([P(Y),x("design:type",Object)],X_.prototype,"ytRendererstamperBehavior",void 0); w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],X_.prototype,"ytdGuideStateAwareBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],X_.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],X_.prototype,"hasChannelArt",void 0);w([S("yt-banner-updated"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],X_.prototype,"onBannerUpdated_",null); w([yE("data.headerColorPalette.lightsourceColorPaletteData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X_.prototype,"observeLightsourcePalette_",null);X_=w([U({is:"ytd-c4-tabbed-header-renderer"})],X_);var rfb;var sfb;var tfb=function(a,b,c,d,f,g,l,m,n){this.minWidth_=a;this.minHeight_=b;this.recommendedWidth_=c;this.recommendedHeight_=d;this.maxFileSize_=f;this.title_=g;this.bannerGalleryTitle_=l;this.cropMode_="ytcb";this.channelId_=m;this.pickerToken_=n;a=DTa("yt-banner");b=a.addView;c=new lE("youtubebanner").addUploadMetadata("silo_id","19");c.opts.ytMaxFileSize=this.maxFileSize_;d=this.recommendedHeight_;c.opts.ytRecWidth=this.recommendedWidth_;c.opts.ytRecHeight=d;b.call(a,c);a.addView(new fD);a.addView(new fD().setType("ytbanner").setLabel(this.bannerGalleryTitle_)); b=a.setTitle(this.title_).setSize(1E3);b.urlParamMap_.set("thumbs","orig");b.setMinSize(this.minWidth_,this.minHeight_).urlParamMap_.set("cropMode",this.cropMode_);this.pickerToken_&&a.setSecretToken(this.pickerToken_);this.builder_=a;this.picker_=null}; tfb.prototype.open=function(){var a=this;return new Ki(function(b,c){a.builder_.setCallback(function(d){"picked"==d.action?b(d):"cancel"==d.action&&c(Error("banner image edit cancel"))}); a.picker_&&a.picker_.dispose();a.picker_=a.builder_.build();a.picker_.setVisible(!0)})}; tfb.prototype.dispose=function(){this.picker_&&(this.picker_.dispose(),this.picker_=null)};function Y_(a,b,c,d){return window.spf?ufb(a,b,c,void 0===d?!1:d):vfb(a,b)} function ufb(a,b,c,d){var f=null,g=new Ki(function(m,n){var r={};if(b){r.method=b.method;var u=b.postParams||{};Qha(a,b)&&(u[A("XSRF_FIELD_NAME",void 0)]=A("XSRF_TOKEN",void 0));r.postData=Id(u);b.type&&(r.type=b.type);u=b.headers}r.headers=Hha(a,u);N("debug_forward_web_query_parameters")&&(a=pl(a));r.experimental_headers=r.headers;r.onError=function(z){z.err&&z.xhr&&(z.err.params={url:z.xhr.responseURL,response:z.xhr.responseText.substr(0,64)});n(z.err)}; r.onPartDone=function(z){c&&c.call(null,z.part)}; r.onDone=function(z){var C=wfb(z.response,"xsrf_token");Ed(window.location.href,a)&&C&&qd("XSRF_TOKEN",C);if(C=wfb(z.response,"service_worker_killswitch"))qd("SERVICE_WORKER_KILLSWITCH",C),tVa();m(z.response)}; f=spf.request(a,r)}),l=g.then(xfb); Ti(l,function(m){var n=m instanceof Ui;d&&n&&g.cancel("canceled requestPromise");var r=m&&m.hasOwnProperty("params")&&m.params.response?m.params.response:"";if(m instanceof Error)if(r){if(n)m.sampleWeight=0;else if(")]}'\n{\"reload\":\"now\"}"==r)m.sampleWeight=0;else{n=m.message||"";var u={original:n,url:a},z=n.match(/position:?\s*(\d+)/);if(z){z=z&&Number(z[1])?Number(z[1]):0;var C=Math.max(z-25,0);u.position=z;u.response=r.substring(C,z+25)}else u.response=r.substring(0,50);Wm(m,u);n=0<=n.indexOf("<")|| 0<=n.indexOf("end of ")||0<=n.indexOf("Unterminated string")||n.indexOf("Unexpected EOF");try{m.message="JSON parse error"}catch(J){}if(!n)for(u=r.length,z=!1,C=0;CMath.random()&&(m=Error("No timing found"),m.params=l,vm(m)),l={responseStart:-1}):l={responseStart:0},n.timing=n.timing||{},Va(n.timing,l),f(n))}else g(Error("HTTP error: "+l.status))}; (c=ql(a,b))||g(Error("HTTP error: "+c.status))}); N("cancel_pending_navs")&&Ti(d,function(){c.abort()}); return d} function wfb(a,b){var c=a[b],d=a.parts;"multipart"==a.type&&d&&(c=(a=d.find(function(f){return b in f}))&&a[b]); return c} ;var yfb=function(a){this.channelId_=a}; yfb.prototype.upload=function(a){var b="";a.viewToken&&(b=a.viewToken[2].type);var c=a.docs[0];a=c.crop;b={channel_id:this.channelId_,fife_url:c.thumbnails[0].url,photo_id:c.id,is_gallery_image:"ytbanner"==b};a&&(b.crop_top=a.top,b.crop_right=a.right,b.crop_bottom=a.bottom,b.crop_left=a.left);return Y_("/channels_profile_ajax?action_update_banner_image=1",{method:"POST",postParams:b})};var Z_=function(){return O.apply(this,arguments)||this}; p(Z_,O);e=Z_.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}; e.detached=function(){this.picker&&this.picker.dispose()}; e.dataChanged=function(){this.uploader=this.picker=this.message=null}; e.computeAriaLabel=function(a){return a}; e.onTap=function(){var a;null!==(a=this.data)&&void 0!==a&&a.editBannerCommand||(this.message=null,this.picker||(this.picker=new tfb(this.data.bannerMinWidth||0,this.data.bannerMinHeight||0,this.data.bannerRecommendedWidth||0,this.data.bannerRecommendedHeight||0,this.data.bannerMaxFileSizeInMegabytes||0,this.data.editorTitle||"",this.data.galleryViewTitle||"",this.data.channelId||"",this.data.onepickToken||"")),this.picker.open().then(this.handleBannerPicked.bind(this),Ka))}; e.handleBannerPicked=function(a){this.uploader||(this.uploader=new yfb(this.data.channelId||""));this.message=this.data.uploadingText;this.uploader.upload(a).then(this.handleBannerUploadSucceeded.bind(this),this.handleBannerUploadFailed.bind(this))}; e.handleBannerUploadSucceeded=function(a){a&&a.errors?this.handleBannerUploadFailed(a):(this.fire("yt-banner-updated",a),this.message=null)}; e.handleBannerUploadFailed=function(a){this.message=a&&a.errors&&a.errors.length?a.errors[0]:null}; h.Object.defineProperties(Z_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===sfb){var a=document.createElement("template");a.innerHTML="\n \n [[ariaLabel]]\n
[[message]]
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rfb){var d=document.createElement("template");d.innerHTML=""; rfb=d}d=rfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);sfb=a}a=sfb;return a}}}); var $_=Z_;w([P(V.YtActionSenderBehavior),x("design:type",Object)],$_.prototype,"ytActionSenderBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],$_.prototype,"componentBehavior",void 0);w([P(Polymer.IronButtonState),x("design:type",Object)],$_.prototype,"ironButtonState",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],$_.prototype,"data",void 0); w([R({reflectToAttribute:!0,readOnly:!0,computed:"computeAriaLabel(data.buttonLabel)"}),x("design:type",String)],$_.prototype,"ariaLabel",void 0);w([R(),x("design:type",Object)],$_.prototype,"message",void 0);w([R(),x("design:type",Object)],$_.prototype,"picker",void 0);w([R(),x("design:type",Object)],$_.prototype,"uploader",void 0);$_=w([U({is:"ytd-channel-banner-editor-renderer"})],$_);var zfb;var Afb;var a0=function(){return O.apply(this,arguments)||this}; p(a0,O);e=a0.prototype;e.ready=function(){this.$.form.addEventListener("submit",this.onSubmit.bind(this))}; e.onDataChanged=function(){var a;if(null===(a=this.data)||void 0===a?0:a.selected)this.ytdExpandableInputBehavior.showInput=!0}; e.closeOnOutsideClickHandler=function(){this.set("data.expandedText","")}; e.openOnClickHandler=function(){this.$.input.focus()}; e.onSubmit=function(a){a.preventDefault();return!1}; e.submitOnEnterKeyUp=function(a){var b,c;if(13===a.keyCode){a=this.data.endpoint;var d=y.unsafeClone(a);(null===(c=null===(b=null===d||void 0===d?void 0:d.commandMetadata)||void 0===b?void 0:b.webCommandMetadata)||void 0===c?0:c.url)?(d.commandMetadata.webCommandMetadata.url=Nd(d.commandMetadata.webCommandMetadata.url,"query",this.data.expandedText),d.browseEndpoint&&(d.browseEndpoint.query=this.data.expandedText),this.fire("yt-navigate",{endpoint:d})):Um(new Pl("Error: Trying to navigate to an endpoint without url", a))}}; h.Object.defineProperties(a0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Afb){var a=document.createElement("template");a.innerHTML="\n \n\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zfb){var d=document.createElement("template");d.innerHTML=""; zfb=d}d=zfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Afb=a}a=Afb;return a}}}); var b0=a0;b0.prototype.onDataChanged=b0.prototype.onDataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],b0.prototype,"ytRendererBehavior",void 0);w([P(K1a),x("design:type",Object)],b0.prototype,"ytdExpandableInputBehavior",void 0);w([R(),x("design:type",Object)],b0.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b0.prototype,"onDataChanged",null);b0=w([U({is:"ytd-expandable-tab-renderer"})],b0);var Bfb;var Cfb;var c0=function(){var a=O.apply(this,arguments)||this;a.ariaLabel=mL("EDIT_AVATAR_LABEL",void 0,"Edit channel icon");return a}; p(c0,O);c0.prototype.attached=function(){this.setAttribute("role","button");this.setAttribute("tabindex","0")}; c0.prototype.computeHref=function(a){var b;return(null===(b=null===a||void 0===a?void 0:a.urlEndpoint)||void 0===b?0:b.url)?this.componentBehavior.computeHref_(a):null}; c0.prototype.onTap=function(){var a,b;null===(a=this.data)||void 0===a||!a.editAvatarServiceEndpoint||(null===(b=this.data.editAvatarServiceEndpoint.urlEndpoint)||void 0===b?0:b.url)||this.ytActionSenderBehavior.sendServiceRequestAction([this.data.editAvatarServiceEndpoint])}; h.Object.defineProperties(c0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cfb){var a=document.createElement("template");a.innerHTML="\n \n \n [[ariaLabel]]\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bfb){var d=document.createElement("template");d.innerHTML=""; Bfb=d}d=Bfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cfb=a}a=Cfb;return a}}}); var d0=c0;w([P(Polymer.IronButtonState),x("design:type",Object)],d0.prototype,"ironButtonState",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],d0.prototype,"ytActionSenderBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],d0.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],d0.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],d0.prototype,"ariaLabel",void 0);d0=w([U({is:"ytd-channel-avatar-editor"})],d0);var Dfb;var Efb;var e0=function(){return O.apply(this,arguments)||this}; p(e0,O);e0.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; e0.prototype.dataChanged=function(){if(this.data){var a=this.hasBannerArt;this.hasBannerArt=!1;if(this.data&&this.data.banner){var b=MO(this.data.banner.thumbnails,this.clientWidth);b&&(0===b.indexOf("//")&&(b="https:"+b),this.hasBannerArt=!0,this.updateStyles({"--ytd-interactive-tabbed-header-renderer-banner-url":"url("+b+")"}))}this.hasBannerArt!==a&&this.$.header.fire("iron-resize")}}; h.Object.defineProperties(e0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Efb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
[[getSimpleString(data.description)]]
[[getSimpleString(data.metadata)]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dfb){var d=document.createElement("template");d.innerHTML=""; Dfb=d}d=Dfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Efb=a}a=Efb;return a}}}); var f0=e0;f0.prototype.dataChanged=f0.prototype.dataChanged;w([P(S1a),x("design:type",Object)],f0.prototype,"ytdTabbedHeaderBehavior",void 0);w([P(Y),x("design:type",Object)],f0.prototype,"ytRendererstamperBehavior",void 0);w([P(BQ),x("design:type",Object)],f0.prototype,"ytdGridStateAwareBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],f0.prototype,"ytdGuideStateAwareBehavior",void 0); w([P(AO.YtComponentBehavior),x("design:type",Object)],f0.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],f0.prototype,"data",void 0);w([R(),x("design:type",Number)],f0.prototype,"selected",void 0);w([R(),x("design:type",Boolean)],f0.prototype,"active",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],f0.prototype,"hasBannerArt",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f0.prototype,"dataChanged",null); f0=w([U({is:"ytd-interactive-tabbed-header-renderer"})],f0);var Ffb;var Gfb;var g0=function(){return O.apply(this,arguments)||this}; p(g0,O);g0.prototype.configureRendererStamper=function(){return{"data.leftActions":{id:"left-actions",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(g0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gfb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ffb){var d=document.createElement("template");d.innerHTML=""; Ffb=d}d=Ffb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gfb=a}a=Gfb;return a}}}); var h0=g0;w([P(W.YtRendererBehavior),x("design:type",Object)],h0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],h0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],h0.prototype,"data",void 0);h0=w([U({is:"ytd-page-footer-renderer"})],h0);var Hfb;var Ifb;var i0=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-open-one-pick-add-video-modal-command":"onYtOnePickerAddVideoCommand"};return a}; p(i0,O); i0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{playlistSidebarPrimaryInfoRenderer:{component:"ytd-playlist-sidebar-primary-info-renderer",noInjection:!0},playlistSidebarSecondaryInfoRenderer:{component:"ytd-playlist-sidebar-secondary-info-renderer",noInjection:!0},playlistSidebarTertiaryInfoRenderer:{component:"ytd-playlist-sidebar-tertiary-info-renderer",noInjection:!0},channelLegalInfoRenderer:{component:"ytd-channel-legal-info-renderer",params:{isCompact:!0},noInjection:!0}}}}}; i0.prototype.onYtOnePickerAddVideoCommand=function(a){a.openOnePickAddVideoModalCommand&&new FTa(a.openOnePickAddVideoModalCommand).show()}; h.Object.defineProperties(i0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ifb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hfb){var d=document.createElement("template");d.innerHTML=""; Hfb=d}d=Hfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ifb=a}a=Ifb;return a}}}); var j0=i0;w([P(W.YtRendererBehavior),x("design:type",Object)],j0.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],j0.prototype,"ytActionHandlerBehavior",void 0);w([P(Y),x("design:type",Object)],j0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],j0.prototype,"data",void 0);j0=w([U({is:"ytd-playlist-sidebar-renderer"})],j0);var Jfb;var Kfb;var k0=function(){var a=O.apply(this,arguments)||this;a.isEditing=!1;a.isMultiline=!1;return a}; p(k0,O);e=k0.prototype;e.onKeydown_=function(a){if(13===a.keyCode&&!this.isMultiline)this.onSave_();else if(27===a.keyCode)this.onCancel_()}; e.computeComponentStyle_=function(a){return a.style?a.style:"INLINE_FORM_STYLE_UNKNOWN"}; e.computeisMultiline=function(a){return a.formField&&a.formField.textInputFormFieldRenderer&&a.formField.textInputFormFieldRenderer.isMultiline?a.formField.textInputFormFieldRenderer.isMultiline:!1}; e.computeTextDisplayed=function(a,b){if(a)return a;if(b)return b}; e.onEdit_=function(){this.isEditing=!0;this.$["text-form"].focusTextInput()}; e.onSave_=function(){var a;if(this.$["text-form"].validate()){this.$["text-form"].save();var b=this.$["text-form"].value;b?this.set("data.textDisplayed",zL(b)):(null===(a=this.data)||void 0===a?0:a.placeholder)&&this.set("data.textDisplayed",this.data.placeholder);this.isEditing=!1}}; e.onCancel_=function(){var a=CL(this.data.textDisplayed);a==this.data.placeholder?this.$["text-form"].reset(""):this.$["text-form"].reset(a);this.isEditing=!1}; h.Object.defineProperties(k0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kfb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jfb){var d=document.createElement("template");d.innerHTML=""; Jfb=d}d=Jfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kfb=a}a=Kfb;return a}}}); var l0=k0;l0.prototype.onKeydown_=l0.prototype.onKeydown_;w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],l0.prototype,"ytEventForwardingBehavior",void 0);w([P(Y),x("design:type",Object)],l0.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],l0.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],l0.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],l0.prototype,"data",void 0); w([R(),x("design:type",Object)],l0.prototype,"isEditing",void 0);w([R({reflectToAttribute:!0,computed:"computeComponentStyle_(data)"}),x("design:type",String)],l0.prototype,"componentStyle",void 0);w([R({computed:"computeisMultiline(data)"}),x("design:type",Object)],l0.prototype,"isMultiline",void 0);w([S("keydown"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],l0.prototype,"onKeydown_",null);l0=w([U({is:"ytd-inline-form-renderer"})],l0);var Lfb;var Mfb;var m0=function(){var a=O.apply(this,arguments)||this;a.hideCharCounter=!1;a.hideLabel=!1;a.noLabelFloat=!1;a.autoValidate=!0;a.invalid=!1;a.actionMap={"yt-update-text-input-form-field-renderer-command":"handleUpdateTextInputFormFieldRendererCommand"};return a}; p(m0,O);e=m0.prototype;e.reset=function(a){this.value=a&&this.data?this.data.value=a:"";this.input.invalid=!1;this.input.autoValidate=!1}; e.save=function(){this.data&&this.ytRendererBehavior.sendServiceRequestAction([this.data.onChange])}; e.focusTextInput=function(){this.input.focus()}; e.validate=function(){var a;if(!this.autoValidate)return!this.invalid;if(!this.input)return!1;if(N("web_show_regex_error_textarea")&&(null===(a=this.data)||void 0===a?0:a.isMultiline)&&null!=this.value&&this.data.validValueRegexp&&!RegExp("^"+this.data.validValueRegexp+"$").test(this.input.value))return this.input.autoValidate=!1,this.invalid=!0,!1;this.input.autoValidate=!0;return this.input.validate()}; e.valueChanged=function(a){N("web_show_regex_error_textarea")&&(this.invalid=!1);a||""===a?this.value=a:void 0!==a||this.value||(this.value="")}; e.computeLabel=function(a,b){return b?"":CL(a)}; e.computeAriaLabel=function(a,b){return b?CL(a):""}; e.computeErrorMessage=function(a,b,c,d){!a&&b?a=c||this.strings.REQUIRED_LABEL:(a=CL(d),a=Qb(a,"&")?"document"in t?xba(a):yba(a):a);return a}; e.computeType=function(a){return"TEXT_INPUT_FORM_FIELD_TYPE_PASSWORD"===a?"password":null}; e.onTextValueChanged=function(){this.validate()&&this.data&&this.data.key&&this.data.onChange&&this.set(this.data.key,this.input.value,this.data.onChange)}; e.handleUpdateTextInputFormFieldRendererCommand=function(a){(a=a.updateTextInputFormFieldRendererCommand)&&this.data&&this.data.id===a.id&&(void 0!==a.invalid&&(this.invalid=a.invalid),void 0!==a.invalidValueErrorMessage&&this.set("data.invalidValueErrorMessage",a.invalidValueErrorMessage))}; h.Object.defineProperties(m0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mfb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lfb){var d=document.createElement("template");d.innerHTML=""; Lfb=d}d=Lfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mfb=a}a=Mfb;return a}}}); var n0=m0;n0.prototype.valueChanged=n0.prototype.valueChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],n0.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],n0.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],n0.prototype,"data",void 0);w([R({notify:!0}),x("design:type",String)],n0.prototype,"value",void 0);w([R(),x("design:type",String)],n0.prototype,"pattern",void 0); w([R(),x("design:type",String)],n0.prototype,"errorMessage",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],n0.prototype,"componentStyle",void 0);w([R(),x("design:type",Object)],n0.prototype,"hideCharCounter",void 0);w([R(),x("design:type",Object)],n0.prototype,"hideLabel",void 0);w([R(),x("design:type",Object)],n0.prototype,"noLabelFloat",void 0);w([R(),x("design:type",Object)],n0.prototype,"autoValidate",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],n0.prototype,"invalid",void 0);w([R({value:{REQUIRED_LABEL:mL("REQUIRED_LABEL",void 0,"Required")}}),x("design:type",Object)],n0.prototype,"strings",void 0);w([AE("#input"),x("design:type",Object)],n0.prototype,"input",void 0);w([yE("data.value"),x("design:type",Function),x("design:paramtypes",[String]),x("design:returntype",void 0)],n0.prototype,"valueChanged",null); n0=w([uO({is:"yt-text-input-form-field-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],n0);var Nfb;var Ofb;var o0=function(){var a=O.apply(this,arguments)||this;a.previousSelectValue=void 0;return a}; p(o0,O);o0.prototype.detached=function(){this.previousSelectValue=void 0}; o0.prototype.selectedValueChanged=function(){var a;-1!==this.selectedValue&&(void 0===this.previousSelectValue?this.previousSelectValue=this.selectedValue:this.previousSelectValue!==this.selectedValue&&null!==(a=this.data)&&void 0!==a&&a.key&&this.data.onChange&&(this.set(this.data.key,this.selectedValue,this.data.onChange),this.ytRendererBehavior.sendServiceRequestAction([this.data.onChange]),this.previousSelectValue=this.selectedValue))}; h.Object.defineProperties(o0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ofb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nfb){var d=document.createElement("template");d.innerHTML="";Nfb=d}d=Nfb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);Ofb=a}a=Ofb;return a}}}); var p0=o0;p0.prototype.selectedValueChanged=p0.prototype.selectedValueChanged;w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],p0.prototype,"ytEventForwardingBehavior",void 0);w([P(Y),x("design:type",Object)],p0.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],p0.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],p0.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],p0.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Number)],p0.prototype,"selectedValue",void 0);w([yE("selectedValue"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],p0.prototype,"selectedValueChanged",null);p0=w([U({is:"ytd-dropdown-form-field-renderer"})],p0);var Pfb;var Qfb;var q0=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-playlist-action":"onUpdatePlaylistAction_"};return a}; p(q0,O);e=q0.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.playButtons":{id:"play-buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer"},toggleButtonRenderer:{component:"ytd-toggle-button-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.computeIsCustomThumbnail_=function(a){return a?!!a.playlistCustomThumbnailRenderer:!1}; e.onYtNavigate_=function(a,b){if(b&&b.actions&&-1

"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pfb){var d=document.createElement("template");d.innerHTML=""; Pfb=d}d=Pfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qfb=a}a=Qfb;return a}}}); var r0=q0;r0.prototype.onYtNavigate_=r0.prototype.onYtNavigate_;w([P(Y),x("design:type",Object)],r0.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],r0.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],r0.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],r0.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],r0.prototype,"data",void 0); w([R({reflectToAttribute:!0,computed:"computeIsCustomThumbnail_(data.thumbnailRenderer)"}),x("design:type",Boolean)],r0.prototype,"isCustomThumbnail",void 0);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[Event,Object]),x("design:returntype",void 0)],r0.prototype,"onYtNavigate_",null);r0=w([U({is:"ytd-playlist-sidebar-primary-info-renderer"})],r0);var Rfb;var Sfb;var s0=function(){return O.apply(this,arguments)||this}; p(s0,O);s0.prototype.computeOwnerVisibility=function(a){return!(!a.videoOwner&&!a.button)}; s0.prototype.configureRendererStamper=function(){return{"data.videoOwner":{id:"video-owner",mapping:{videoOwnerRenderer:"ytd-video-owner-renderer"}},"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; h.Object.defineProperties(s0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Sfb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rfb){var d=document.createElement("template");d.innerHTML=""; Rfb=d}d=Rfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Sfb=a}a=Sfb;return a}}}); var t0=s0;w([P(W.YtRendererBehavior),x("design:type",Object)],t0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],t0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],t0.prototype,"data",void 0);t0=w([U({is:"ytd-playlist-sidebar-secondary-info-renderer"})],t0);var Tfb;var Ufb;var u0=function(){return O.apply(this,arguments)||this}; p(u0,O);u0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{gridShowRenderer:"ytd-grid-show-renderer"}}}}; h.Object.defineProperties(u0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ufb){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tfb){var d=document.createElement("template");d.innerHTML=""; Tfb=d}d=Tfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ufb=a}a=Ufb;return a}}}); var v0=u0;w([P(W.YtRendererBehavior),x("design:type",Object)],v0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],v0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],v0.prototype,"data",void 0);v0=w([U({is:"ytd-playlist-sidebar-tertiary-info-renderer"})],v0);var Vfb;var Wfb;var w0=function(){var a=O.apply(this,arguments)||this;a.expanded=!1;a.isCompact=!1;return a}; p(w0,O);e=w0.prototype;e.attached=function(){this.ytdAutoScrollBehavior.scrollTarget=this.$.text}; e.dataChanged_=function(a){a&&(Polymer.dom(this.$.text.root).innerHTML=CL(a.text||null))}; e.computeAutoScrollEnabled_=function(a,b){return a&&!b}; e.expandedChanged_=function(){this.$["expander-icon"].icon="yt-icons:expand-"+(this.expanded?"less":"more")}; e.toggleOnTap_=function(){this.expanded=!this.expanded}; h.Object.defineProperties(w0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wfb){var a=document.createElement("template");a.innerHTML="\n\n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vfb){var d=document.createElement("template");d.innerHTML=""; Vfb=d}d=Vfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wfb=a}a=Wfb;return a}}}); var x0=w0;w([P(S0a),x("design:type",Object)],x0.prototype,"ytdAutoScrollBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],x0.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],x0.prototype,"data",void 0);w([R({reflectToAttribute:!0,observer:"expandedChanged_"}),x("design:type",Object)],x0.prototype,"expanded",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],x0.prototype,"isCompact",void 0); w([R({computed:"computeAutoScrollEnabled_(data.autoscroll, expanded)"}),x("design:type",Boolean)],x0.prototype,"autoScrollEnabled",void 0);x0=w([U({is:"ytd-channel-legal-info-renderer"})],x0);var Xfb;var Yfb;var y0=function(){var a=O.apply(this,arguments)||this;a.canvas=null;return a}; p(y0,O);e=y0.prototype;e.dataChanged_=function(a,b){b&&b.style&&this.classList.remove(this.getCssClass_(b.style.styleType));a&&a.style&&this.classList.add(this.getCssClass_(a.style.styleType));a&&a.title&&this.updateTextSizeClass_(a.title)}; e.getCssClass_=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; e.computeUrlImg_=function(a){if(a)return LO(a.thumbnails,Number.MAX_VALUE)}; e.computeBackgroundImgStyle_=function(a,b){if(!this.computeUseInlineImg_(a))return dc({"background-image":this.computeUrlImg_(b)||null})}; e.computeLogoHeight_=function(a){if("BANNER_PROMO_STYLE_TYPE_MASTHEAD_V2"==a)return 24}; e.computeUseInlineImg_=function(a){return"BANNER_PROMO_STYLE_TYPE_MASTHEAD_V2"==a}; e.sendImpressionEndpoints_=function(a){a.impressionEndpoints&&this.ytActionSenderBehavior.sendServiceRequestAction(a.impressionEndpoints)}; e.observeBasicPalette_=function(){var a,b,c=null===(b=null===(a=this.data)||void 0===a?void 0:a.colorData)||void 0===b?void 0:b.basicColorPaletteData;c?fP(this,c):fP(this,{})}; e.observeDataForCounterfactual_=function(){var a;N("kevlar_banner_cf_extra_logging")&&((null===(a=this.data)||void 0===a?0:a.isVisible)||this.sendImpressionEndpoints_(this.data))}; e.onDismissTap_=function(){this.classList.add("dismissed")}; e.updateTextSizeClass_=function(a){if(a){var b="";if(a.simpleText)b=a.simpleText;else if(a.runs)b=a.runs.reduce(function(g,l){return g+(l.text||"")},"");else return;this.canvas||(this.canvas=document.createElement("canvas"));a=this.canvas.getContext("2d");a.font=N(" kevlar_update_youtube_sans")?"42px YouTube Sans":"42px YT Sans";b=b.split(" ");for(var c=1,d="",f=0;f\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xfb){var d=document.createElement("template");d.innerHTML=""; Xfb=d}d=Xfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Yfb=a}a=Yfb;return a}}}); var z0=y0;z0.prototype.observeDataForCounterfactual_=z0.prototype.observeDataForCounterfactual_;z0.prototype.observeBasicPalette_=z0.prototype.observeBasicPalette_;w([P(W.YtRendererBehavior),x("design:type",Object)],z0.prototype,"ytRendererBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],z0.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],z0.prototype,"ytActionSenderBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],z0.prototype,"data",void 0);w([yE("data.colorData.basicColorPaletteData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],z0.prototype,"observeBasicPalette_",null);w([yE("data.isVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],z0.prototype,"observeDataForCounterfactual_",null);z0=w([U({is:"ytd-banner-promo-renderer"})],z0);var Zfb;var $fb;var A0=function(){return O.apply(this,arguments)||this}; p(A0,O);A0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{compactLinkRenderer:{component:"ytd-compact-link-renderer",noInjection:!0}}}}}; h.Object.defineProperties(A0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$fb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zfb){var d=document.createElement("template");d.innerHTML=""; Zfb=d}d=Zfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$fb=a}a=$fb;return a}}}); var B0=A0;w([P(Y),x("design:type",Object)],B0.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],B0.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],B0.prototype,"data",void 0);B0=w([U({is:"ytd-settings-sidebar-renderer"})],B0);var agb;var bgb;var C0=function(){return O.apply(this,arguments)||this}; p(C0,O);e=C0.prototype;e.computeUrlImg=function(a){return a?MO(a.thumbnails,Number.MAX_VALUE):null}; e.computeBackgroundColorAndImage_=function(a){var b=Polymer.dom(this.root).querySelector("#background"),c=Polymer.dom(this.root).querySelector("#background-image");b&&c&&(a.backgroundColor&&(b.style.backgroundColor=dO(a.backgroundColor)),a.backgroundImage&&(a=this.computeUrlImg(a.backgroundImage)))&&(c.style.backgroundImage="url("+a+")")}; e.shouldHideHashtagInfo_=function(a){return!a.hashtagInfoText&&this.shouldHideAvatarFacepile_(a.avatarFacepile)}; e.shouldHideAvatarFacepile_=function(a){return!a||5>a.length}; e.processThumbnails_=function(a){return!a||5>a.length?[]:5<=a.length&&9>a.length?a.slice(0,5).reverse():a.reverse()}; h.Object.defineProperties(C0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bgb){var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===agb){var d=document.createElement("template");d.innerHTML=""; agb=d}d=agb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bgb=a}a=bgb;return a}}}); var D0=C0;D0.prototype.computeBackgroundColorAndImage_=D0.prototype.computeBackgroundColorAndImage_;w([P(W.YtRendererBehavior),x("design:type",Object)],D0.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],D0.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],D0.prototype,"computeBackgroundColorAndImage_",null);D0=w([U({is:"ytd-hashtag-header-renderer"})],D0);var cgb;var dgb;var E0=function(){var a=O.apply(this,arguments)||this;a.enableTopicChannelTabs=N("enable_topic_channel_tabs");return a}; p(E0,O);E0.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; E0.prototype.onSearchNavigate=function(){this.selected=void 0}; E0.prototype.onTabsChange=function(a){a=null===a||void 0===a?void 0:a.findIndex(function(b){var c;return null===(c=null===b||void 0===b?void 0:b.tabRenderer)||void 0===c?void 0:c.selected}); void 0!==a&&(this.selected=a)}; E0.prototype.onTabsActive=function(a){var b,c;void 0!==this.tabs&&(a=null===(c=null===(b=this.tabs[a.detail.selected])||void 0===b?void 0:b.tabRenderer)||void 0===c?void 0:c.endpoint)&&this.fire("yt-navigate",{endpoint:a})}; h.Object.defineProperties(E0.prototype,{tabsEnabled:{configurable:!0,enumerable:!0,get:function(){return void 0!==this.tabs&&1
\n \n \n
\n"; a.content.insertBefore(PV().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cgb){var d=document.createElement("template");d.innerHTML=""; cgb=d}d=cgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dgb=a}a=dgb;return a}}}); var F0=E0;F0.prototype.onTabsChange=F0.prototype.onTabsChange;w([P(Y),x("design:type",Object)],F0.prototype,"ytRendererstamperBehavior",void 0);w([P(BQ),x("design:type",Object)],F0.prototype,"ytdGridStateAwareBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],F0.prototype,"ytRendererBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],F0.prototype,"ytdGuideStateAwareBehavior",void 0);w([R(),x("design:type",Object)],F0.prototype,"data",void 0); w([R(),x("design:type",Array)],F0.prototype,"tabs",void 0);w([R(),x("design:type",Number)],F0.prototype,"selected",void 0);w([R(),x("design:type",Object)],F0.prototype,"enableTopicChannelTabs",void 0);w([zE("enableTopicChannelTabs","tabs"),x("design:type",Boolean),x("design:paramtypes",[])],F0.prototype,"tabsEnabled",null);w([yE("tabs"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],F0.prototype,"onTabsChange",null); F0=w([U({is:"ytd-topic-channel-details-renderer"})],F0);var egb;var fgb;var G0=function(){var a=O.apply(this,arguments)||this;a.disableGridStateAware=!1;return a}; p(G0,O);G0.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{topicChannelDetailsRenderer:{component:"ytd-topic-channel-details-renderer",properties:{disableGridStateAware:"[[disableGridStateAware]]",tabs:"[[tabs]]"}},carouselItemRenderer:{component:"ytd-carousel-item-renderer",attributes:{"has-animation":!0},properties:{disableGridStateAware:"[[disableGridStateAware]]"}}}}}}; G0.prototype.activeChanged=function(a){this.carousel&&(this.carousel.active=a)}; G0.prototype.updateCssVars=function(){this.updateStyles({"--ytd-rich-grid-max-width":this.richGridItemsPerRow*((this.richGridMiniMode?320:360)+16)-16+"px"})}; h.Object.defineProperties(G0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fgb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===egb){var d=document.createElement("template");d.innerHTML=""; egb=d}d=egb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fgb=a}a=fgb;return a}}}); var H0=G0;w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],H0.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(IQ),x("design:type",Object)],H0.prototype,"ytdReduxBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],H0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],H0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],H0.prototype,"data",void 0);w([R(),x("design:type",Array)],H0.prototype,"tabs",void 0); w([R({observer:"activeChanged"}),x("design:type",Object)],H0.prototype,"active",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],H0.prototype,"disableGridStateAware",void 0);w([R({selector:G5a,observer:"updateCssVars"}),x("design:type",Number)],H0.prototype,"richGridItemsPerRow",void 0);w([R({selector:tT,observer:"updateCssVars"}),x("design:type",Boolean)],H0.prototype,"richGridMiniMode",void 0);w([AE("ytd-carousel-item-renderer"),x("design:type",Object)],H0.prototype,"carousel",void 0); H0=w([U({is:"ytd-carousel-header-renderer"})],H0);var ggb;var igb;var I0=function(){var a=O.apply(this,arguments)||this;a.scriptAnalyticsAdded=!1;return a}; p(I0,O);I0.prototype.dataChanged=function(){this.data&&this.data.analyticsId&&this.sendGoogleAnalyticsPageview(this.data.analyticsId)}; I0.prototype.sendGoogleAnalyticsPageview=function(a){this.scriptAnalyticsAdded||this.appendAnalyticsScript();window.ga=window.ga||function(c){for(var d=[],f=0;f\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ggb){var d=document.createElement("template");d.innerHTML="";ggb=d}d=ggb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); igb=a}a=igb;return a}}}); var J0=I0;J0.prototype.dataChanged=J0.prototype.dataChanged;w([R(),x("design:type",Object)],J0.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],J0.prototype,"dataChanged",null);J0=w([U({is:"ytd-channel-metadata-renderer"})],J0);var jgb;var kgb;var K0=function(){return O.apply(this,arguments)||this}; p(K0,O);K0.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0},searchBoxRenderer:{component:"ytd-search-box-renderer",noInjection:!0},subFeedSelectorRenderer:{component:"ytd-sub-feed-selector-renderer",noInjection:!0},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",noInjection:!0},compactLinkRenderer:{component:"ytd-compact-link-renderer",noInjection:!0}}}}}; h.Object.defineProperties(K0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kgb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jgb){var d=document.createElement("template");d.innerHTML=""; jgb=d}d=jgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kgb=a}a=kgb;return a}}}); var L0=K0;w([P(W.YtRendererBehavior),x("design:type",Object)],L0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],L0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],L0.prototype,"data",void 0);L0=w([U({is:"ytd-browse-feed-actions-renderer"})],L0);var lgb;var mgb;var ngb=function(){return O.apply(this,arguments)||this}; p(ngb,O); h.Object.defineProperties(ngb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mgb){var a=document.createElement("template");a.innerHTML="\n \n \n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lgb){var d=document.createElement("template");d.innerHTML=""; lgb=d}d=lgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mgb=a}a=mgb;return a}}}); var M0=ngb;w([P(W.YtRendererBehavior),x("design:type",Object)],M0.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],M0.prototype,"data",void 0);M0=w([U({is:"ytd-sub-feed-option-renderer"})],M0);var ogb;var pgb;var N0=function(){return O.apply(this,arguments)||this}; p(N0,O);N0.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{subFeedOptionRenderer:{component:"ytd-sub-feed-option-renderer",noInjection:!0}}}}}; h.Object.defineProperties(N0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pgb){var a=document.createElement("template");a.innerHTML="

\n [[getSimpleString(data.title)]]\n

\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ogb){var d=document.createElement("template");d.innerHTML=""; ogb=d}d=ogb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);pgb=a}a=pgb;return a}}}); var O0=N0;w([P(W.YtRendererBehavior),x("design:type",Object)],O0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],O0.prototype,"ytRendererStamperBehavior",void 0);w([R(),x("design:type",Object)],O0.prototype,"data",void 0);O0=w([U({is:"ytd-sub-feed-selector-renderer"})],O0);var qgb;var rgb;var P0=function(){return O.apply(this,arguments)||this}; p(P0,O);P0.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{verticalChannelSectionRenderer:{component:"ytd-vertical-channel-section-renderer",noInjection:!0}}}}}; h.Object.defineProperties(P0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rgb){var a=document.createElement("template");a.innerHTML="
\n
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qgb){var d=document.createElement("template");d.innerHTML=""; qgb=d}d=qgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rgb=a}a=rgb;return a}}}); var Q0=P0;w([P(W.YtRendererBehavior),x("design:type",Object)],Q0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],Q0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],Q0.prototype,"data",void 0);Q0=w([U({is:"ytd-browse-secondary-contents-renderer"})],Q0);var sgb;var tgb;var R0=function(){return O.apply(this,arguments)||this}; p(R0,O);R0.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe",mapping:{subscribeButtonRenderer:"ytd-subscribe-button-renderer",buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(R0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tgb){var a=document.createElement("template");a.innerHTML="\n \n \n [[getSimpleString(data.title)]]\n\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===sgb){var d=document.createElement("template");d.innerHTML=""; sgb=d}d=sgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tgb=a}a=tgb;return a}}}); var S0=R0;w([P(W.YtRendererBehavior),x("design:type",Object)],S0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],S0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],S0.prototype,"data",void 0);S0=w([U({is:"ytd-mini-channel-renderer"})],S0);var ugb;var vgb;var T0=function(){return O.apply(this,arguments)||this}; p(T0,O);T0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{miniChannelRenderer:"ytd-mini-channel-renderer"}}}}; h.Object.defineProperties(T0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vgb){var a=document.createElement("template");a.innerHTML="

[[data.title]]

\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ugb){var d=document.createElement("template");d.innerHTML=""; ugb=d}d=ugb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vgb=a}a=vgb;return a}}}); var U0=T0;w([P(W.YtRendererBehavior),x("design:type",Object)],U0.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],U0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],U0.prototype,"data",void 0);U0=w([U({is:"ytd-vertical-channel-section-renderer"})],U0);var wgb;var xgb;var W0=function(){var a=wE.apply(this,arguments)||this;a.dragging=!1;a.dragMouseStart=0;a.dragOffsetStart=0;a.containerWidthDiff=0;a.boundPrevClick=function(){a.set("offset",V0(a,a.offset-320))}; a.boundNextClick=function(){a.set("offset",V0(a,a.offset+320))}; a.boundScrollContainerMouseDown=function(b){a.dragMouseStart=b.clientX;a.dragOffsetStart=a.offset;a.dragging=!0}; a.boundScrollContainerDrag=function(b){a.dragging&&a.set("offset",V0(a,a.dragOffsetStart-(b.clientX-a.dragMouseStart)))}; a.boundMouseUp=function(){a.dragging=!1}; a.boundWheelScroll=function(b){b.stopPropagation();b.preventDefault();a.offset+=Math.abs(b.deltaX)>Math.abs(b.deltaY)?b.deltaX:b.deltaY}; a.boundChipFocused=function(b){var c=a.$$("#scroll-container");(b=b.detail)&&c&&Math.abs(a.offset-(b.offsetLeft+b.clientWidth))>c.clientWidth&&(a.offset=V0(a,b.offsetLeft))}; return a}; p(W0,wE);W0.prototype.attached=function(){this.$$("#scroll-container").addEventListener("wheel",this.boundWheelScroll);this.$$("#scroll-container").addEventListener("yt-chip-cloud-chip-focused",this.boundChipFocused);this.$$("#scroll-container").addEventListener("mousedown",this.boundScrollContainerMouseDown);this.$$("#scroll-container").addEventListener("mousemove",this.boundScrollContainerDrag);window.addEventListener("mouseup",this.boundMouseUp)}; W0.prototype.detached=function(){this.$$("#scroll-container").removeEventListener("wheel",this.boundWheelScroll);this.$$("#scroll-container").removeEventListener("yt-chip-cloud-chip-focused",this.boundChipFocused);this.$$("#scroll-container").removeEventListener("mousedown",this.boundScrollContainerMouseDown);this.$$("#scroll-container").removeEventListener("mousemove",this.boundScrollContainerDrag);window.removeEventListener("mouseup",this.boundMouseUp)}; W0.prototype.reset=function(){this.set("offset",0);ygb(this);X0(this)}; var V0=function(a,b){return Math.min(Math.max(b,0),a.containerWidthDiff)}; W0.prototype.transformContainer=function(){this.offset=V0(this,this.offset);this.transform("translateX(-"+this.offset+"px)",this.$$("#chips"));X0(this)}; var X0=function(a){Polymer.RenderStatus.afterNextRender(a,a.setButtonsState)}; W0.prototype.setButtonsState=function(){(this.atEnd=this.offset>=this.containerWidthDiff)&&!this.atStart&&(this.offset=V0(this,this.offset));this.atStart=0>=this.offset}; var ygb=function(a){Polymer.RenderStatus.afterNextRender(a,a.setContainerWidthDiff)}; W0.prototype.setContainerWidthDiff=function(){var a=this.$$("#scroll-container"),b=this.$$("#chips");a&&b&&(this.containerWidthDiff=b.clientWidth-a.clientWidth)}; var Y0=W0;Y0.prototype.transformContainer=Y0.prototype.transformContainer;w([R({value:0}),x("design:type",Number)],Y0.prototype,"offset",void 0);w([R({value:!0,reflectToAttribute:!0}),x("design:type",Boolean)],Y0.prototype,"atStart",void 0);w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],Y0.prototype,"atEnd",void 0);w([yE("offset"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Y0.prototype,"transformContainer",null);Y0=w([xE()],Y0);var Z0=function(){var a=O.apply(this,arguments)||this;a.isDarkTheme=!1;a.notSticky=!1;a.actionMap={"yt-chip-cloud-chip-select-action":"handleChipCloudChipSelectAction","yt-chip-cloud-chip-deselect-action":"handleChipCloudChipDeselectAction","yt-dark-mode-toggled-action":"onDarkModeToggledAction","yt-rich-grid-layout-refreshed":"updateChipBarWidthAndTop"};return a}; p(Z0,O);e=Z0.prototype;e.configureRendererStamper=function(){return{"data.contents":{id:"chips",mapping:{chipCloudChipRenderer:{component:"yt-chip-cloud-chip-renderer"}}},"data.previousButton":{id:"left-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}}}},"data.nextButton":{id:"right-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"}}}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme=document.documentElement.hasAttribute("dark")}; e.dataChanged=function(){this.selectedIndex=0;this.updateChipBarWidthAndTop();this.ytScrollableChipCloudBehavior.reset()}; e.computeStyle=function(a){return a}; e.handleChipCloudChipSelectAction=function(a){a=this.chipsSelector.indexOf(a);-1
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wgb){var d=document.createElement("template");d.innerHTML=""; wgb=d}d=wgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xgb=a}a=xgb;return a}}}); var $0=Z0;$0.prototype.onResize=$0.prototype.onResize;$0.prototype.dataChanged=$0.prototype.dataChanged;w([P(Y),x("design:type",Object)],$0.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],$0.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],$0.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],$0.prototype,"actionSenderBehavior",void 0); w([P(iI),x("design:type",Object)],$0.prototype,"ironResizableBehavior",void 0);w([P(),x("design:type",Y0)],$0.prototype,"ytScrollableChipCloudBehavior",void 0);w([R(),x("design:type",Object)],$0.prototype,"data",void 0);w([R({value:0}),x("design:type",Number)],$0.prototype,"selectedIndex",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],$0.prototype,"isDarkTheme",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],$0.prototype,"notSticky",void 0); w([R({reflectToAttribute:!0,computed:"computeStyle(data.styleType)"}),x("design:type",String)],$0.prototype,"componentStyle",void 0);w([AE("#chips"),x("design:type",Object)],$0.prototype,"chipsSelector",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$0.prototype,"dataChanged",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$0.prototype,"onResize",null); $0=w([U({is:"ytd-feed-filter-chip-bar-renderer"})],$0);var zgb;var Agb;Polymer({is:"yt-chip-cloud-chip-renderer",_template:function(){if(void 0!==Agb)return Agb;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zgb){var d=document.createElement("template");d.innerHTML=""; zgb=d}d=zgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Agb=a}, properties:{data:Object,chipStyle:{type:String,computed:"computeChipStyle_(data.style.styleType)",reflectToAttribute:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"selectionChanged_"}},hostAttributes:{role:"tab",tabindex:0},actionMap:{"yt-select-chip-command":"onSelectChipCommand_"},behaviors:[W.YtRendererBehavior,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,Polymer.IronButtonState],listeners:{tap:"onTap_",focus:"onFocus_"},onSelectChipCommand_:function(a){if(!this.selected&& this.data&&a.selectChipCommand.targetId&&a.selectChipCommand.targetId===this.data.targetId)this.onTap_()}, selectionChanged_:function(){this.setAttribute("aria-selected",""+this.selected)}, computeChipStyle_:function(a){return a?a:"STYLE_DEFAULT"}, onTap_:function(){this.data&&(this.logExplicitClick(this.data),this.selected||!this.data.navigationEndpoint?this.sendAction("yt-chip-cloud-chip-deselect-action"):(this.sendAction("yt-chip-cloud-chip-select-action",[this]),this.data&&this.data.navigationEndpoint&&this.data.navigationEndpoint.continuationCommand?this.sendServiceRequestAction([this.data.navigationEndpoint]):this.data&&this.data.navigationEndpoint&&this.sendInnerTubeActions([this.data.navigationEndpoint],this)))}, onFocus_:function(){var a=this.getInterface(eP);a&&a.isKeyBoardInUse()&&this.fire("yt-chip-cloud-chip-focused",this)}});var Bgb;var Cgb;function Dgb(a,b,c,d){d=void 0===d?{}:d;var f=[],g=[],l=d;d=void 0===l.minimumRowsOfVideosAtStart?2:l.minimumRowsOfVideosAtStart;l=void 0===l.minimumRowsOfVideosBetweenSections?1:l.minimumRowsOfVideosBetweenSections;if(!a||!a.length)return[];for(var m=0;m=r-b*l;if(u>=r||n||z)r=u+b*l+1}else r=Math.max(r,b*d);g.push(r)}d=[];l=0;m=k(a);for(r=m.next();!r.done;r= m.next()){for(r=r.value;d.length===g[l];)d.push(a[f[l]]),l++;r.richItemRenderer&&d.push(r)}for(;g[l];)d.push(a[f[l]]),l++;(a=a.find(function(C){return C.continuationItemRenderer}))&&d.push(a); Egb(d,b);return Fgb(d,g,b,c)} function Egb(a,b){for(var c,d,f=0,g=0,l=0;l=b&&N("rich_grid_mini_mode");f&&(b=this.calcElementsPerRow(240,4));this.actionSenderBehavior.sendOptionalAction("yt-rich-grid-layout-refreshed");if(this.elementsPerRow!==b||this.postsPerRow!==c||this.moviesPerRow!==d){var g=this.elementsPerRow!==b;this.elementsPerRow=b;this.postsPerRow=c;this.moviesPerRow=d; this.reflowContent();this.actionSenderBehavior.sendOptionalAction("ytd-update-elements-per-row-action",[b,c,d]);this.updateStyles({"--ytd-rich-grid-items-per-row":""+this.elementsPerRow,"--ytd-rich-grid-posts-per-row":""+this.postsPerRow,"--ytd-rich-grid-movies-per-row":""+this.moviesPerRow});this.ytdReduxBehavior.dispatch(ZL({type:"SET_RICH_GRID_ITEMS_PER_ROW",payload:this.elementsPerRow}));this.miniMode=f;return g}this.miniMode=f;return!1}; e.calcElementsPerRow=function(a,b){var c=this.clientWidth;600\n\n\n
\n \n \n
\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bgb){var d=document.createElement("template");d.innerHTML=""; Bgb=d}d=Bgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cgb=a}a=Cgb;return a}}}); var b1=a1;b1.prototype.onReloadContinuationFinish=b1.prototype.onReloadContinuationFinish;b1.prototype.onResize=b1.prototype.onResize;b1.prototype.onRequestElementsPerRow=b1.prototype.onRequestElementsPerRow;b1.prototype.contentLengthChanged=b1.prototype.contentLengthChanged;b1.prototype.dataChanged=b1.prototype.dataChanged;w([P(Y),x("design:type",Object)],b1.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],b1.prototype,"ytRendererBehavior",void 0); w([P(iI),x("design:type",Object)],b1.prototype,"ironResizableBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],b1.prototype,"actionHandlerBehavior",void 0);w([P(FU),x("design:type",Object)],b1.prototype,"ytContinuationHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],b1.prototype,"actionSenderBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],b1.prototype,"componentBehavior",void 0); w([P(IQ),x("design:type",Object)],b1.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],b1.prototype,"data",void 0);w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],b1.prototype,"miniMode",void 0);w([R(),x("design:type",String)],b1.prototype,"pagePath",void 0);w([R({value:[]}),x("design:type",Array)],b1.prototype,"shownItems",void 0);w([R({value:!1}),x("design:type",Boolean)],b1.prototype,"isReflowing",void 0); w([R({value:!1}),x("design:type",Boolean)],b1.prototype,"isFilteredFeed",void 0);w([R({value:!1,reflectToAttribute:!0,computed:"computeHasSubmenu(data)"}),x("design:type",Boolean)],b1.prototype,"hasSubmenu",void 0);w([R({selector:function(a){return a.ui.guideIsExpanded}, observer:"refreshAndLog"}),x("design:type",Boolean)],b1.prototype,"guideIsExpanded",void 0);w([R({value:!1}),x("design:type",Boolean)],b1.prototype,"isSearch",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b1.prototype,"dataChanged",null);w([yE("data.contents.length"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b1.prototype,"contentLengthChanged",null); w([S("yt-request-elements-per-row"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b1.prototype,"onRequestElementsPerRow",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b1.prototype,"onResize",null);w([S("yt-reload-continuation-finish"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b1.prototype,"onReloadContinuationFinish",null); b1=w([U({is:"ytd-rich-grid-renderer"})],b1);var Hgb;var Igb;var c1=function(){return O.apply(this,arguments)||this}; p(c1,O); c1.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{backgroundPromoRenderer:"ytd-background-promo-renderer",clarificationRenderer:"ytd-clarification-renderer",compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",counterfactualRenderer:"ytd-counterfactual-renderer",didYouMeanRenderer:"yt-did-you-mean-renderer",includingResultsForRenderer:"yt-including-results-for-renderer",inlineSurveyRenderer:"ytd-inline-survey-renderer",messageRenderer:"ytd-message-renderer",noResultsFoundShowingResultsForRenderer:"yt-no-results-found-showing-results-for-renderer", primetimePromoRenderer:"ytd-primetime-promo-renderer",richShelfRenderer:"ytd-rich-shelf-renderer",showingResultsForRenderer:"yt-showing-results-for-renderer",statementBannerRenderer:"ytd-statement-banner-renderer",infoPanelContainerRenderer:"ytd-info-panel-container-renderer",promotedSparklesTextSearchRenderer:"ytd-promoted-sparkles-text-search-renderer"},reuseComponents:!1}}}; h.Object.defineProperties(c1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Igb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hgb){var d=document.createElement("template");d.innerHTML=""; Hgb=d}d=Hgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Igb=a}a=Igb;return a}}}); var d1=c1;w([P(Y),x("design:type",Object)],d1.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],d1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],d1.prototype,"data",void 0);d1=w([U({is:"ytd-rich-section-renderer"})],d1);var Jgb;var Kgb;var e1=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction"};return a}; p(e1,O);e=e1.prototype; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{richItemRenderer:{component:"ytd-rich-item-renderer",params:{isShelfItem:!0}}}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",attributes:{condensed:!0,icon:"yt-icons:more"},params:{buttonTooltipPosition:"rtl"===A("HTML_DIR")?"right":"left"}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",params:{shelfDismissal:!0}}}}}}; e.attached=function(){this.listen(document,"yt-page-type-changed","collapseShelf");this.actionHandlerBehavior.actionMap=this.actionMap;this.requestElementsPerRow()}; e.detached=function(){this.unlisten(document,"yt-page-type-changed","collapseShelf")}; e.onRowIndexChange=function(){var a=On();this.data&&this.data.trackingParams&&a&&nNa(a,In(this.data.trackingParams),{gridData:{veRowCoordinate:this.data.rowIndex}})}; e.collapseShelf=function(){var a;if(null===(a=this.data)||void 0===a?0:a.isExpanded)this.data.isExpanded=!1,this.updateItemVisibility()}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; e.onUpdateElementsPerRowAction=function(a,b,c){a&&b&&c&&(this.elementsPerRow!==a||this.postsPerRow!==b||this.moviesPerRow!==c)&&(this.elementsPerRow=a,this.postsPerRow=b,this.moviesPerRow=c,this.updateItemVisibility())}; e.updateItemVisibility=function(){var a=this;if(this.data&&this.data.contents){var b=this.isPostShelfRenderer()?this.postsPerRow:this.isMovieShelfRenderer()?this.moviesPerRow:this.elementsPerRow;Polymer.dom(this.root).querySelectorAll("ytd-rich-item-renderer").forEach(function(c,d){var f;(null===(f=a.data)||void 0===f?0:f.isExpanded)?(c.hidden=!1,c.ytRendererBehavior.markDirty()):c.hidden=d>b-1}); this.isShowMoreHidden=this.data.contents.length<=b||!!this.data.isExpanded}}; e.onDataChange=function(){var a=this,b;Polymer.RenderStatus.afterNextRender(this,function(){a.updateItemVisibility()}); if(null===(b=this.data)||void 0===b?0:b.contents)for(var c=0;c
\n
\n

\n \n \n

\n
\n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jgb){var d=document.createElement("template");d.innerHTML=""; Jgb=d}d=Jgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kgb=a}a=Kgb;return a}}}); var f1=e1;f1.prototype.onDataChange=f1.prototype.onDataChange;f1.prototype.onRowIndexChange=f1.prototype.onRowIndexChange;w([P(Y),x("design:type",Object)],f1.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],f1.prototype,"ytRendererBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],f1.prototype,"ytdDismissableItemBehavior",void 0); w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],f1.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],f1.prototype,"data",void 0);w([R({value:3}),x("design:type",Number)],f1.prototype,"elementsPerRow",void 0);w([R({value:3}),x("design:type",Number)],f1.prototype,"postsPerRow",void 0);w([R({value:6}),x("design:type",Number)],f1.prototype,"moviesPerRow",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],f1.prototype,"isShowMoreHidden",void 0); w([yE("data.rowIndex"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f1.prototype,"onRowIndexChange",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f1.prototype,"onDataChange",null);f1=w([U({is:"ytd-rich-shelf-renderer"})],f1);var Lgb;var Mgb;var g1=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction","yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(g1,O);e=g1.prototype;e.attached=function(){this.requestElementsPerRow();var a=!!document.documentElement.hasAttribute("dark");this.data&&(this.currentColorData=a?this.data.darkColorData:this.data.lightColorData)}; e.configureRendererStamper=function(){return{primaryButton:{id:"primary-button",mapping:{buttonRenderer:"ytd-button-renderer"},reuseComponents:!0},secondaryButton:{id:"secondary-button",mapping:{buttonRenderer:"ytd-button-renderer"},reuseComponents:!0},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.dataChanged=function(a){this.requestElementsPerRow();this.updateButtonPalette();this.updateTitleSpec();var b=!!a.tileImage;b!==this.hasTileImage&&this.set("hasTileImage",b);this.currentColorData=this.isDarkTheme?a.darkColorData:a.lightColorData}; e.themeChanged=function(a){this.data&&this.set("currentColorData",a?this.data.darkColorData:this.data.lightColorData)}; e.currentColorChanged=function(){this.updateButtonPalette()}; e.computeBackgroundStyle=function(a){var b;if(a&&this.data){var c={};if(this.data.lightBackgroundImage&&this.data.darkBackgroundImage){var d=LO((this.isDarkTheme?this.data.darkBackgroundImage:this.data.lightBackgroundImage).thumbnails,Number.MAX_VALUE);d&&(c["background-image"]=d)}if(null===(b=a.basicColorData)||void 0===b?0:b.backgroundColor)c["background-color"]=dO(a.basicColorData.backgroundColor);return dc(c)}}; e.onDarkModeToggledAction=function(a){a!==this.isDarkTheme&&this.set("isDarkTheme",a)}; e.getCurrentLogo=function(a,b){if(a)return b?a.lightLogoImage:a.darkLogoImage}; e.computeTitleStyle=function(a){if(this.data&&this.data.title&&a&&a.basicColorData&&void 0!==a.basicColorData.foregroundTitleColor)return dc({color:dO(a.basicColorData.foregroundTitleColor)})}; e.computeSubtitleStyle=function(a){if(this.data&&this.data.subtitle&&a&&a.basicColorData&&void 0!==a.basicColorData.foregroundBodyColor)return dc({color:dO(a.basicColorData.foregroundBodyColor)})}; e.computeBadgeStyle=function(a){if(this.data&&this.data.badgeText&&a&&a.basicColorData&&void 0!==a.basicColorData.foregroundActivatedColor)return dc({color:dO(a.basicColorData.foregroundActivatedColor)})}; e.shouldExpandLogo=function(a,b){return a?!1:2<=b}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; e.updateTitleSpec=function(){var a;null!==(a=this.data)&&void 0!==a&&a.titleLength&&(this.titleSize=2>=this.elementsPerRow?20>=this.data.titleLength?"TITLE_SIZE_MEDIUM":"TITLE_SIZE_SMALL":40>=this.data.titleLength?"TITLE_SIZE_LARGE":80>=this.data.titleLength?"TITLE_SIZE_MEDIUM":"TITLE_SIZE_SMALL")}; e.updateButtonPalette=function(){var a,b;if(this.data&&this.currentColorData){if(null===(a=this.data.primaryButton)||void 0===a?0:a.buttonRenderer)this.currentColorData.primaryButtonColorData?(this.data.primaryButton.buttonRenderer.colorData={basicColorPaletteData:this.currentColorData.primaryButtonColorData},this.data.primaryButton.buttonRenderer.style=void 0):this.currentColorData.primaryButtonStyleType&&(this.data.primaryButton.buttonRenderer.style=this.currentColorData.primaryButtonStyleType, this.data.primaryButton.buttonRenderer.colorData=void 0),this.set("primaryButton",Object.assign({},this.data.primaryButton));if(null===(b=this.data.secondaryButton)||void 0===b?0:b.buttonRenderer)this.currentColorData.secondaryButtonColorData?(this.data.secondaryButton.buttonRenderer.colorData={basicColorPaletteData:this.currentColorData.secondaryButtonColorData},this.data.secondaryButton.buttonRenderer.style=void 0):this.currentColorData.secondaryButtonStyleType&&(this.data.secondaryButton.buttonRenderer.style= this.currentColorData.secondaryButtonStyleType,this.data.secondaryButton.buttonRenderer.colorData=void 0),this.set("secondaryButton",Object.assign({},this.data.secondaryButton))}}; e.onUpdateElementsPerRowAction=function(a){a&&this.elementsPerRow!==a&&(this.elementsPerRow=a,this.updateTitleSpec())}; h.Object.defineProperties(g1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mgb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lgb){var d=document.createElement("template");d.innerHTML=""; Lgb=d}d=Lgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mgb=a}a=Mgb;return a}}}); var h1=g1;h1.prototype.currentColorChanged=h1.prototype.currentColorChanged;h1.prototype.themeChanged=h1.prototype.themeChanged;h1.prototype.dataChanged=h1.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],h1.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],h1.prototype,"ytRendererstamperBehavior",void 0);w([P(kQ.YtdDismissableItemBehavior),x("design:type",Object)],h1.prototype,"ytdDismissableItemBehavior",void 0); w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],h1.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],h1.prototype,"data",void 0);w([R(),x("design:type",Object)],h1.prototype,"primaryButton",void 0);w([R(),x("design:type",Object)],h1.prototype,"secondaryButton",void 0);w([R({reflectToAttribute:!0,value:3}),x("design:type",Number)],h1.prototype,"elementsPerRow",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],h1.prototype,"isDarkTheme",void 0); w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],h1.prototype,"hasTileImage",void 0);w([R(),x("design:type",Object)],h1.prototype,"currentColorData",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],h1.prototype,"titleSize",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],h1.prototype,"dataChanged",null); w([yE("isDarkTheme"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],h1.prototype,"themeChanged",null);w([yE("currentColorData"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],h1.prototype,"currentColorChanged",null);h1=w([U({is:"ytd-statement-banner-renderer"})],h1);var Ngb;var Ogb;var i1,j1=function(){return O.apply(this,arguments)||this}; p(j1,O);e=j1.prototype;e.configureRendererStamper=function(){return{"data.content.closeButton":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.content.ctaButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged=function(){this.data&&this.data.content&&this.data.clickLocationTargets&&this.data.content.navigationEndpoint&&(this.data.adBadge||this.set("data.adBadge",i1.DEFAULT_AD_BADGE_RENDERER),this.sendImpression(),this.ytSparklesClickLocationBehavior.configureClickTargets("root-container",this.data.clickLocationTargets,i1.CLICK_LOCATION_ID_MAP))}; e.onSitelinkTap=function(a){var b,c;a.stopPropagation();var d=null===(c=null===(b=null===a||void 0===a?void 0:a.model)||void 0===b?void 0:b.item)||void 0===c?void 0:c.onTap;d&&this.ytSparklesClickLocationBehavior.handleClick(d,a)}; e.onTap=function(a){var b=this.data&&this.data.content&&this.data.content.navigationEndpoint;b&&this.ytSparklesClickLocationBehavior.handleClick(b,a)}; e.sendImpression=function(){if(this.data&&this.data.content)for(var a=k(this.data.content.impressionEndpoints||[]),b=a.next();!b.done;b=a.next()){b=k(b.value.loggingUrls||[]);for(var c=b.next();!c.done;c=b.next())c=c.value,c.baseUrl&&Sn(c.baseUrl)}}; h.Object.defineProperties(j1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ogb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n [[getSimpleString(data.content.title)]]\n

\n \n \n \n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ngb){var d=document.createElement("template");d.innerHTML=""; Ngb=d}d=Ngb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ogb=a}a=Ogb;return a}}}); var k1=i1=j1;i1.prototype.onTap=i1.prototype.onTap;i1.prototype.dataChanged=i1.prototype.dataChanged;k1.CLICK_LOCATION_ID_MAP=new Map([["PROMOTED_SPARKLES_CLICK_LOCATION_TITLE","title"],["PROMOTED_SPARKLES_CLICK_LOCATION_DESCRIPTION","description"],["PROMOTED_SPARKLES_CLICK_LOCATION_AD_BADGE","ad-badge"],["PROMOTED_SPARKLES_CLICK_LOCATION_TEXT_AD_WEBSITE","display-url"],["PROMOTED_SPARKLES_CLICK_LOCATION_BACKGROUND","root-container"],["PROMOTED_SPARKLES_CLICK_LOCATION_SITELINK","sitelinks"]]); k1.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:mL("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Y),x("design:type",Object)],k1.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],k1.prototype,"ytRendererBehavior",void 0);w([P(Q7a.YtSparklesClickLocationBehavior),x("design:type",Object)],k1.prototype,"ytSparklesClickLocationBehavior",void 0);w([R(),x("design:type",Object)],k1.prototype,"data",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],k1.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],k1.prototype,"onTap",null);k1=i1=w([U({is:"ytd-promoted-sparkles-text-search-renderer"})],k1);var Pgb;var Qgb;var l1=function(){var a=O.apply(this,arguments)||this;a.active=!1;a.watchResponse=null;a.playerEvents=new Map;a.actionMap={"yt-open-video-preview-action":"handleOpenVideoPreviewAction"};return a}; p(l1,O);e=l1.prototype;e.configureRendererStamper=function(){return{"previewData.thumbnailOverlays":{id:"endorsement",mapping:{thumbnailOverlayEndorsementRenderer:"ytd-thumbnail-overlay-endorsement-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.playerEvents.set("onCloseMiniplayer",this.deactivate);this.playerEvents.set("onExpandMiniplayer",this.onDetailsClick)}; e.handleOpenVideoPreviewAction=function(a,b,c){null!==a&&void 0!==a&&a.navigationEndpoint&&(this.updateStyles({"--ytd-video-preview-top-position":b+"px","--ytd-video-preview-left-position":c+"px"}),this.previewData=a,(b=(b=this.componentBehavior.getInterfaceForTs("ytd-page-manager"))&&b.getPlayerFromWatch())&&a&&this.activate(b,a))}; e.activate=function(a,b){return Ya(this,function d(){var f=this,g,l,m;return ya(d,function(n){if(1==n.nextAddress)return f.playerElement=a,a.preparePlayer(a),f.$["player-container"].append(a),q(n,a.getPlayerPromise(),2);if(3!=n.nextAddress)return g=n.yieldResult,f.active||(g.setMinimized(!0),g.setSizeStyle(!1,!0),g.mute(),f.ytPlayerListenerBehavior.listenToPlayerEvents(g,f.playerEvents)),f.player=g,l=f.componentBehavior.getInterfaceForTs("yt-network-manager"),q(n,l.requestDataForEndpoint(b.navigationEndpoint, {},void 0,{},!0),3);m=n.yieldResult;return q(n,f.handleWatchDataResponse(m),0)})})}; e.handleWatchDataResponse=function(a){return Ya(this,function c(){var d=this;return ya(c,function(f){if(1==f.nextAddress){if(!a)return f.return();a.playerResponse&&!a.player&&(a.player=bN(a.playerResponse));d.watchResponse=a;return d.playerElement?q(f,d.playerElement.update(a.player),3):f.jumpTo(0)}d.active=!0;oa(f)})})}; e.onDetailsClick=function(){this.watchResponse&&this.previewData&&this.previewData.navigationEndpoint.watchEndpoint&&(this.fire("yt-navigate-cache",{url:this.watchResponse.url,endpoint:this.previewData.navigationEndpoint.watchEndpoint,data:this.watchResponse,miniplayer:!0}),this.deactivate())}; e.deactivate=function(){return Ya(this,function b(){var c=this,d,f;return ya(b,function(g){if(1==g.nextAddress)return c.playerElement?q(g,c.playerElement.getPlayerPromise(),2):g.return();if(3!=g.nextAddress)return d=g.yieldResult,d.setMinimized(!1),d.unMute(),f=c.componentBehavior.getInterfaceForTs("ytd-page-manager"),q(g,f.movePlayerToWatch(c.playerElement),3);c.active=!1;c.data=void 0;c.watchResponse=null;c.player&&c.ytPlayerListenerBehavior.unlistenFromPlayerEvents(c.player,c.playerEvents);c.playerElement= null;oa(g)})})}; h.Object.defineProperties(l1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qgb){var a=document.createElement("template");a.innerHTML="
\n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pgb){var d=document.createElement("template");d.innerHTML=""; Pgb=d}d=Pgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qgb=a}a=Qgb;return a}}}); var m1=l1;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],m1.prototype,"actionHandlerBehavior",void 0);w([P(Y),x("design:type",Object)],m1.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],m1.prototype,"ytPlayerListenerBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],m1.prototype,"componentBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],m1.prototype,"ytRendererBehavior",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],m1.prototype,"active",void 0);w([R(),x("design:type",Object)],m1.prototype,"data",void 0);m1=w([U({is:"ytd-video-preview"})],m1);var Rgb;var Sgb;var n1=function(){return O.apply(this,arguments)||this}; p(n1,O);e=n1.prototype;e.concatLatLng=function(a,b){return a+","+b}; e.concatViewports=function(a){if(!a)return"";var b="";a.forEach(function(c){c.lat&&c.lng&&(b+=c.lat+","+c.lng+"|")}); return b.slice(0,-1)}; e.computeMapsUrl=function(a,b,c,d,f){if(!(a&&b&&c&&f&&d))return"";a={center:this.concatLatLng(a,b),visible:this.concatViewports(c),size:f+"x"+d,markers:"color:red|"+this.concatLatLng(a,b),key:"AIzaSyCs1my5Q2eCGoyfRDDCkd4yxplienmWEDc"};return"//maps.googleapis.com/maps/api/staticmap?"+hl(a)}; e.computeMapsUrlNoWidth=function(a,b,c,d){return this.computeMapsUrl(a,b,c,d,screen.width)}; e.computeThumbnailDetailsWithNewURL=function(a){if(a){var b=this.$["background-img"].offsetWidth;a.thumbnails.forEach(function(c){var d=c.url,f=d.lastIndexOf("=");-1!==f&&(c.url=d.substring(0,f)+"=w"+b)}); return a}}; h.Object.defineProperties(n1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Sgb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n object-fit=\"COVER\"\n \n \n
\n
\n
[[getSimpleString(data.placeName)]]
\n
[[getSimpleString(data.placeAddress)]]
\n
\n
\n \n \n \n \n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rgb){var d=document.createElement("template");d.innerHTML=""; Rgb=d}d=Rgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Sgb=a}a=Sgb;return a}}}); var o1=n1;w([P(W.YtRendererBehavior),x("design:type",Object)],o1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],o1.prototype,"data",void 0);o1=w([U({is:"ytd-geo-search-details-renderer"})],o1);var Tgb;var Ugb;var Vgb=function(){return O.apply(this,arguments)||this}; p(Vgb,O); h.Object.defineProperties(Vgb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ugb){var a=document.createElement("template");a.innerHTML="

\n \n

\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tgb){var d=document.createElement("template");d.innerHTML=""; Tgb=d}d=Tgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ugb=a}a=Ugb;return a}}}); var p1=Vgb;w([P(W.YtRendererBehavior),x("design:type",Object)],p1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],p1.prototype,"data",void 0);p1=w([U({is:"ytd-search-filter-group-renderer"})],p1);var Wgb;var Xgb;var q1=function(){return O.apply(this,arguments)||this}; p(q1,O);q1.prototype.onDataChanged=function(a,b){b&&(b=this.getFilterClass(b.status))&&this.classList.remove(b);(a=this.getFilterClass(a.status))&&this.classList.add(a);"selected"===a?this.$.endpoint.setAttribute("aria-selected","true"):this.$.endpoint.removeAttribute("aria-selected");"disabled"===a?this.$.endpoint.setAttribute("aria-disabled","true"):this.$.endpoint.removeAttribute("aria-disabled")}; q1.prototype.getFilterClass=function(a){switch(a){case"FILTER_STATUS_SELECTED":return"selected";case"FILTER_STATUS_DISABLED":return"disabled";}}; h.Object.defineProperties(q1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xgb){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wgb){var d=document.createElement("template");d.innerHTML=""; Wgb=d}d=Wgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xgb=a}a=Xgb;return a}}}); var r1=q1;w([P(W.YtRendererBehavior),x("design:type",Object)],r1.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],r1.prototype,"data",void 0);r1=w([U({is:"ytd-search-filter-renderer"})],r1);var Ygb;var Zgb;var s1=function(){return O.apply(this,arguments)||this}; p(s1,O);s1.prototype.configureRendererStamper=function(){return{"data.detailedSearchRenderer":{id:"detailsContainer",mapping:{geoSearchDetailsRenderer:{component:"ytd-geo-search-details-renderer"}}}}}; s1.prototype.toggleFilters_=function(){this.renderCollapsibleMenu_||(this.renderCollapsibleMenu_=!0,Polymer.dom.flush());this.isCollapsed_=!this.isCollapsed_}; s1.prototype.dataChanged_=function(){this.isCollapsed_=!0}; h.Object.defineProperties(s1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zgb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ygb){var d=document.createElement("template");d.innerHTML=""; Ygb=d}d=Ygb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zgb=a}a=Zgb;return a}}}); var t1=s1;w([P(W.YtRendererBehavior),x("design:type",Object)],t1.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],t1.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],t1.prototype,"data",void 0);w([R(),x("design:type",Boolean)],t1.prototype,"renderCollapsibleMenu_",void 0);w([R(),x("design:type",Boolean)],t1.prototype,"isCollapsed_",void 0);t1=w([U({is:"ytd-search-sub-menu-renderer"})],t1);var $gb;var ahb;var bhb=function(){return O.apply(this,arguments)||this}; p(bhb,O); h.Object.defineProperties(bhb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ahb){var a=document.createElement("template");a.innerHTML="
\n
\n
[[data.channelTitle]]
\n \n
\n
\n \n \n \n \n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$gb){var d=document.createElement("template");d.innerHTML=""; $gb=d}d=$gb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ahb=a}a=ahb;return a}}}); var u1=bhb;w([P(W.YtRendererBehavior),x("design:type",Object)],u1.prototype,"kevlarBehaviors",void 0);w([R(),x("design:type",Object)],u1.prototype,"data",void 0);u1=w([U({is:"ytd-channel-age-gate-renderer"})],u1);var chb;var dhb;iP("sharingItemSection","channelOwnerEmptyStateRenderer","ytd-channel-owner-empty-state-renderer");var v1=function(){var a=O.apply(this,arguments)||this;a.data=null;return a}; p(v1,O);v1.prototype.configureRendererStamper=function(){return{"data.uploadVideoButton":{id:"upload-video-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(v1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dhb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n \n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===chb){var d=document.createElement("template");d.innerHTML=""; chb=d}d=chb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dhb=a}a=dhb;return a}}}); var w1=v1;w([P(Y),x("design:type",Object)],w1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],w1.prototype,"data",void 0);w1=w([U({is:"ytd-channel-owner-empty-state-renderer"})],w1);var ehb;var fhb;var ghb;var hhb;var ihb;var jhb;function x1(a,b){return a.year===b.year&&a.month===b.month&&a.day===b.day} function y1(a,b){return a.year!==b.year?a.yeard;d++)c.push(NA.NARROWWEEKDAYS[(d+ohb)%7]);return{months:qhb(a,b),daysOfWeekLabel:c}}}}); h.Object.defineProperties(C1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jhb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ihb){var d=document.createElement("template");d.innerHTML=""; ihb=d}d=ihb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jhb=a}a=jhb;return a}}}); var D1=C1;w([P([V.YtActionSenderBehavior]),x("design:type",Object)],D1.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],D1.prototype,"calendarConfig",void 0);w([AE("#calendar-main"),x("design:type",Object)],D1.prototype,"calendarMain",void 0);w([zE("calendarConfig"),x("design:type",Object),x("design:paramtypes",[])],D1.prototype,"renderData",null);D1=w([U({is:"ytd-scrollable-calendar"})],D1);var E1=function(){var a=O.apply(this,arguments)||this;a.data=void 0;a.selectionState="START_DATE";a.isStartDateInvalid=!1;a.isEndDateInvalid=!1;a.autoapply=!1;a.actionMap={"ytd-calendar-date-clicked":"handleCalendarDateClicked","ytd-calendar-date-mousedown":"handleCalendarDateMouseDown","ytd-calendar-date-mouseup":"handleCalendarDateMouseUp","ytd-calendar-date-mouseenter":"handleCalendarDateMouseEnter","ytd-calendar-date-mouseleave":"handleCalendarDateMouseLeave","yt-signal-action-submit-form":"handleCalendarSubmitDateRange"}; return a}; p(E1,O);e=E1.prototype;e.configureRendererStamper=function(){return{"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{attributes:{"dialog-dismiss":!0},component:"ytd-button-renderer"}}},"data.applyButton":{id:"apply-button",mapping:{buttonRenderer:{attributes:{"dialog-dismiss":!0},component:"ytd-button-renderer"}}}}}; e.focus=function(){this.startDateInput.focus()}; e.dataChanged=function(){this.data&&this.data.selection&&(this.selection={start:A1(this.data.selection.start),end:A1(this.data.selection.end)})}; e.observeSelection=function(){this.selection&&this.updateCalendarSelection(this.selection);this.isEndDateInvalid=this.isStartDateInvalid=!1;this.updateDateStrings()}; e.resetTextboxes=function(){switch(this.selectionState){case"START_DATE":this.isStartDateInvalid=!1;break;case"END_DATE":this.isEndDateInvalid=!1;break;default:Za(this.selectionState);}}; e.onDateInputBlur=function(){this.isEndDateInvalid=this.isStartDateInvalid=!1;this.updateDateStrings()}; e.onStartDateTapOrFocus=function(){this.startDate&&this.calendar.scrollToDate(this.startDate);this.selectionState="START_DATE"}; e.onEndDateTapOrFocus=function(){this.endDate&&this.calendar.scrollToDate(this.endDate);this.selectionState="END_DATE"}; e.onStartDateTextChange=function(){if(this.calendar.calendarConfig){var a=this.calendar.calendarConfig,b=a.end;a=shb({start:a.start,end:this.endDate||b},this.startDateInput.value||"");this.isStartDateInvalid=!a.isValid;a.isValid&&(a=a.value,this.selection=this.endDate?{start:a,end:this.endDate}:a,this.calendar.scrollToDate(a));this.updateInvalidState()}}; e.onEndDateTextChange=function(){if(this.calendar.calendarConfig){var a=this.calendar.calendarConfig,b=a.start;a=shb({start:this.startDate||b,end:a.end},this.endDateInput.value||"");this.isEndDateInvalid=!a.isValid;a.isValid&&(a=a.value,this.selection={start:this.startDate,end:a},this.calendar.scrollToDate(a));this.updateInvalidState()}}; e.handleCalendarDateClicked=function(a){var b=this.selection&&mhb(this.selection),c=this.selection&&nhb(this.selection);b&&!y1(a,b)&&"END_DATE"===this.selectionState?(this.selection={start:b,end:a},this.selectionState="START_DATE"):(this.selection=c&&!y1(c,a)?{start:a,end:c}:a,this.selectionState="END_DATE")}; e.handleCalendarDateMouseDown=function(a){this.selection&&!B1(this.selection)&&(this.dragPivot=x1(a,this.selection.start)?this.selection.end:x1(a,this.selection.end)?this.selection.start:a)}; e.handleCalendarDateMouseUp=function(){this.dragPivot=void 0}; e.handleCalendarDateMouseEnter=function(a){this.dragPivot&&(this.selection={start:function(b,c){return y1(b,c)?b:c}(this.dragPivot,a), end:function(b,c){return y1(b,c)?c:b}(this.dragPivot,a)},this.dragPivot||(this.selectionState="START_DATE"))}; e.handleCalendarDateMouseLeave=function(){}; e.handleCalendarSubmitDateRange=function(){this.selection&&!B1(this.selection)&&this.ytActionSenderBehavior.sendAction("ytd-date-period-picker-apply",[this.selection])}; e.updateInvalidState=function(){var a=function(b,c){c?b.setAttribute("invalid",""):b.removeAttribute("invalid")}; a(this.startDateInput,this.isStartDateInvalid);a(this.endDateInput,this.isEndDateInvalid)}; e.updateDateStrings=function(){this.selection&&(B1(this.selection)?(this.startDateString=khb(this.selection),this.endDateString=""):(this.startDateString=khb(this.selection.start),this.endDateString=khb(this.selection.end)))}; e.updateCalendarSelection=function(a){this.calendar.updateSelection(Object.assign(Object.assign({},a),{selectionState:this.selectionState}))}; h.Object.defineProperties(E1.prototype,{calendarConfig:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.selection?{start:A1(this.data.dateRangeStart),end:A1(this.data.dateRangeEnd),selection:{start:A1(this.data.selection.start),end:A1(this.data.selection.end)},circleToday:!0}:{}}}, errorMessage:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.errorMessage}}, startDate:{configurable:!0,enumerable:!0,get:function(){return this.selection&&mhb(this.selection)}}, endDate:{configurable:!0,enumerable:!0,get:function(){return this.selection&&nhb(this.selection)}}}); h.Object.defineProperties(E1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hhb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n \n
\n
\n
\u2013
\n
\n \n \n
\n \n
\n
\n
\n
\n\n\n\n\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ghb){var d=document.createElement("template");d.innerHTML=""; ghb=d}d=ghb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hhb=a}a=hhb;return a}}}); var F1=E1;F1.prototype.resetTextboxes=F1.prototype.resetTextboxes;F1.prototype.observeSelection=F1.prototype.observeSelection;F1.prototype.dataChanged=F1.prototype.dataChanged;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],F1.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],F1.prototype,"ytActionSenderBehavior",void 0);w([P(Y),x("design:type",Object)],F1.prototype,"ytRendererstamperBehavior",void 0); w([AE("#calendar"),x("design:type",D1)],F1.prototype,"calendar",void 0);w([AE("#start-date"),x("design:type",n0)],F1.prototype,"startDateInput",void 0);w([AE("#end-date"),x("design:type",n0)],F1.prototype,"endDateInput",void 0);w([R(),x("design:type",Object)],F1.prototype,"data",void 0);w([R(),x("design:type",Object)],F1.prototype,"selection",void 0);w([R(),x("design:type",String)],F1.prototype,"selectionState",void 0); w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],F1.prototype,"calendarConfig",null);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],F1.prototype,"errorMessage",null);w([zE("selection"),x("design:type",Object),x("design:paramtypes",[])],F1.prototype,"startDate",null);w([zE("selection"),x("design:type",Object),x("design:paramtypes",[])],F1.prototype,"endDate",null); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],F1.prototype,"dataChanged",null);w([yE("selection","selectionState"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],F1.prototype,"observeSelection",null);w([yE("selectionState"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],F1.prototype,"resetTextboxes",null);F1=w([U({is:"ytd-date-period-picker-renderer"})],F1); function shb(a,b){a:{var c=void 0===c?[2,3]:c;c=k(c);for(var d=c.next();!d.done;d=c.next()){var f=new Date;d=new RF(d.value);if(TF(d,b,f,0,!0)){f.setHours(0,0,0,0);b=f;break a}}b=null}if(!b)return{isValid:!1,value:void 0};b=z1(b);c=a.end;return y1(b,a.start)||y1(c,b)?{isValid:!1,value:void 0}:{isValid:!0,value:b}} ;var G1=function(){var a=O.apply(this,arguments)||this;var b={};a.actionMap=(b["ytd-date-period-picker-apply"]="handleDateRangeUpdated",b);return a}; p(G1,O);G1.prototype.configureRendererStamper=function(){return{"data.timeRangeDropdown":{id:"time-range-dropdown",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}}}}; G1.prototype.handleDateRangeUpdated=function(){}; h.Object.defineProperties(G1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fhb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ehb){var d=document.createElement("template");d.innerHTML=""; ehb=d}d=ehb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fhb=a}a=fhb;return a}}}); var H1=G1;w([R(),x("design:type",Object)],H1.prototype,"data",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],H1.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],H1.prototype,"actionSenderBehavior",void 0);w([P(Y),x("design:type",Object)],H1.prototype,"rendererstamperBehavior",void 0);H1=w([U({is:"ytd-report-history-section-header-renderer"})],H1);var thb;var uhb;var I1=function(){return O.apply(this,arguments)||this}; p(I1,O);h.Object.defineProperties(I1.prototype,{icon:{configurable:!0,enumerable:!0,get:function(){var a,b;return(null===(b=null===(a=this.data)||void 0===a?void 0:a.icon)||void 0===b?0:b.iconType)?zO(this.data.icon.iconType):""}}}); h.Object.defineProperties(I1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===uhb){var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===thb){var d=document.createElement("template");d.innerHTML=""; thb=d}d=thb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);uhb=a}a=uhb;return a}}}); var J1=I1;w([R(),x("design:type",Object)],J1.prototype,"data",void 0);w([zE("data"),x("design:type",String),x("design:paramtypes",[])],J1.prototype,"icon",null);J1=w([U({is:"ytd-report-history-table-text-cell-renderer"})],J1);var vhb;var whb;var K1=function(){return O.apply(this,arguments)||this}; p(K1,O);K1.prototype.configureRendererStamper=function(){return{"data.reportedContent":{id:"content-info",mapping:{reportHistoryTableTextCellRenderer:"ytd-report-history-table-text-cell-renderer"}},"data.reasonsTable":{id:"reasons-table",mapping:{tableRenderer:"ytd-table-renderer"}},"data.doneButton":{id:"done-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; h.Object.defineProperties(K1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===whb){var a=document.createElement("template");a.innerHTML="
\n

\n \n

\n
\n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vhb){var d=document.createElement("template");d.innerHTML=""; vhb=d}d=vhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);whb=a}a=whb;return a}}}); var L1=K1;w([P(Y),x("design:type",Object)],L1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],L1.prototype,"data",void 0);L1=w([U({is:"ytd-report-reason-history-modal-renderer"})],L1);var xhb;var yhb;var M1=function(){return O.apply(this,arguments)||this}; p(M1,O);M1.prototype.configureRendererStamper=function(){return{"data.cell":{id:"cell-container",mapping:{reportHistoryTableTextCellRenderer:"ytd-report-history-table-text-cell-renderer",reportHistoryTableReasonCellRenderer:"ytd-report-history-table-reason-cell-renderer"}}}}; h.Object.defineProperties(M1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===yhb){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xhb){var d=document.createElement("template");d.innerHTML="";xhb=d}d=xhb; c.call(b,d.content.cloneNode(!0),a.content.firstChild);yhb=a}a=yhb;return a}}}); var N1=M1;w([P(Y),x("design:type",Object)],N1.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],N1.prototype,"data",void 0);N1=w([U({is:"ytd-report-history-table-cell-renderer"})],N1);var zhb;var Ahb;var O1=function(){return O.apply(this,arguments)||this}; p(O1,O);O1.prototype.configureRendererStamper=function(){return{"data.latestReason":{id:"latest-reason",mapping:{reportHistoryTableTextCellRenderer:"ytd-report-history-table-text-cell-renderer"}}}}; h.Object.defineProperties(O1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ahb){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zhb){var d=document.createElement("template");d.innerHTML=""; zhb=d}d=zhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ahb=a}a=Ahb;return a}}}); var P1=O1;w([P(Y),x("design:type",Object)],P1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],P1.prototype,"data",void 0);P1=w([U({is:"ytd-report-history-table-reason-cell-renderer"})],P1);var Bhb;var Chb;var Q1=function(){var a=O.apply(this,arguments)||this;a.columnType={type:"REPORT_HISTORY_COLUMN_TYPE",content:"REPORT_HISTORY_COLUMN_CONTENT",reason:"REPORT_HISTORY_COLUMN_REASON",status:"REPORT_HISTORY_COLUMN_STATUS",date:"REPORT_HISTORY_COLUMN_DATE"};return a}; p(Q1,O);Q1.prototype.onDataChanged=function(){var a;if(null===(a=this.data)||void 0===a?0:a.style)this.componentStyle=this.getStyleName(this.data.style)}; Q1.prototype.getCellForColumn=function(a){return this.cells.find(function(b){var c,d,f;return(null===(f=(null===(c=null===b||void 0===b?void 0:b.cell)||void 0===c?void 0:c.reportHistoryTableReasonCellRenderer)||(null===(d=null===b||void 0===b?void 0:b.cell)||void 0===d?void 0:d.reportHistoryTableTextCellRenderer))||void 0===f?void 0:f.columnId)===a.type})}; Q1.prototype.getClassForColumn=function(a){switch(a){case"REPORT_HISTORY_COLUMN_DATE":return"date";default:return"";}}; Q1.prototype.getStyleName=function(a){switch(a){case"REPORT_HISTORY_ROW_STYLE_COMPACT":return"COMPACT_ROW";default:return"";}}; h.Object.defineProperties(Q1.prototype,{cells:{configurable:!0,enumerable:!0,get:function(){var a;return((null===(a=this.data)||void 0===a?void 0:a.cells)||[]).map(function(b){return b.reportHistoryTableCellRenderer})}}}); h.Object.defineProperties(Q1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Chb){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bhb){var d=document.createElement("template");d.innerHTML=""; Bhb=d}d=Bhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Chb=a}a=Chb;return a}}}); var R1=Q1;R1.prototype.onDataChanged=R1.prototype.onDataChanged;w([R(),x("design:type",Object)],R1.prototype,"data",void 0);w([R(),x("design:type",Array)],R1.prototype,"columnRenderData",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],R1.prototype,"componentStyle",void 0);w([zE("data"),x("design:type",Array),x("design:paramtypes",[])],R1.prototype,"cells",null); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],R1.prototype,"onDataChanged",null);R1=w([U({is:"ytd-report-history-table-row-renderer"})],R1);var Dhb;var Ehb;function Fhb(a){var b=Ghb;b=void 0===b?S1:b;var c=a.columnsToShow||[],d=Hhb(a.columnDimensions,a.columnsToShow,a.leftFloatingColumns,b);return c.map(function(f,g){var l=a.columns[f];if(void 0===l)throw Error("columnSpec mismatch");var m=d?d[g]:dc({});var n=a.getCustomTooltip?a.getCustomTooltip(f,l.headerTooltipParagraphs):l.headerTooltipParagraphs;var r=Ihb(a,f);return{type:f,index:g,style:m,classes:r,headerName:l.headerName||"",headerIcon:l.headerIcon,headerTooltipParagraphs:n||[],headerTooltipHelpContext:l.headerTooltipHelpContext, sortOrders:l.sortOrders||[],selectionState:l.isSelectionCheckbox?a.selectionState:void 0}})} function Ihb(a,b){var c=["DEFAULTS","FLOATING","RIGHT_ALIGN","SORTING"],d=a.columns[b];if(void 0===d)return"";var f=c.includes("DEFAULTS")&&d.cssClass?[d.cssClass]:[];if(c.includes("SORTING")){d.sortOrders&&d.sortOrders.length&&f.push("sortable");if(a.sorting&&a.sorting.columnType===b)a:switch(a.sorting.sortOrder){case"ASCENDING":case"DESCENDING":var g="column-sorted";break a;default:g="";}else g="";g&&f.push(g)}c.includes("FLOATING")&&(b=a.columnsToShow.indexOf(b),a.leftFloatingColumns&&b
\n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dhb){var d=document.createElement("template");d.innerHTML=""; Dhb=d}d=Dhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ehb=a}a=Ehb;return a}}}); var U1=T1;w([P(FU),x("design:type",Object)],U1.prototype,"ytContinuationHandlerBehavior",void 0);w([P(Y),x("design:type",Object)],U1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],U1.prototype,"data",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],U1.prototype,"tableSpec",null);w([zE("tableSpec"),x("design:type",Array),x("design:paramtypes",[])],U1.prototype,"columnRenderData",null); w([zE("tableSpec"),x("design:type",Number),x("design:paramtypes",[])],U1.prototype,"totalMinWidth",null);w([zE("totalMinWidth"),x("design:type",cc),x("design:paramtypes",[])],U1.prototype,"tableWidthStyle",null);U1=w([U({is:"ytd-table-renderer"})],U1); function Khb(a){var b=a.reduce(function(d,f){var g=f.columnId,l,m={};f.headerText&&(m.headerName=CL(f.headerText));f.rightAlignHeader&&(m.rightAlignHeader=f.rightAlignHeader);if(null===(l=f.headerIcon)||void 0===l?0:l.iconType)m.headerIcon=zO(f.headerIcon.iconType);d[g]=m;return d},{}),c=a.filter(function(d){return!d.hideColumn}).map(function(d){return d.columnId}); a=a.filter(function(d){return!!d.dimensions}).reduce(function(d,f){d[f.columnId]=f.dimensions; return d},{}); return{columns:b,columnsToShow:c,columnDimensions:a}} ;var Lhb;var Mhb;var V1=function(){return O.apply(this,arguments)||this}; p(V1,O);V1.prototype.configureRendererStamper=function(){return{"data.reportHistorySectionRenderers":{id:"items",mapping:{videoReportRenderer:"ytd-video-report-renderer"}},"data.header":{id:"header",mapping:{reportHistorySectionHeaderRenderer:"ytd-report-history-section-header-renderer"}},"data.table":{id:"history-table",mapping:{tableRenderer:"ytd-table-renderer",messageRenderer:"ytd-message-renderer"}}}}; V1.prototype.configureContinuationPathMap=function(){return{"yt-reload-continuation-items-command-body":"table"}}; V1.prototype.onRequestError=function(){this.ytContinuationHandlerBehavior.continuationIsReloading=!1}; h.Object.defineProperties(V1.prototype,{isUnifiedReportHistory:{configurable:!0,enumerable:!0,get:function(){var a,b;return!!((null===(a=this.data)||void 0===a?0:a.header)&&(null===(b=this.data)||void 0===b?0:b.table))}}}); h.Object.defineProperties(V1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mhb){var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lhb){var d=document.createElement("template");d.innerHTML=""; Lhb=d}d=Lhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mhb=a}a=Mhb;return a}}}); var W1=V1;W1.prototype.onRequestError=W1.prototype.onRequestError;w([P(FU),x("design:type",Object)],W1.prototype,"ytContinuationHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],W1.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],W1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],W1.prototype,"data",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],W1.prototype,"isUnifiedReportHistory",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W1.prototype,"onRequestError",null);W1=w([U({is:"ytd-report-history-section-renderer"})],W1);var Nhb;var Ohb;var Phb=function(){return O.apply(this,arguments)||this}; p(Phb,O); h.Object.defineProperties(Phb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ohb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nhb){var d=document.createElement("template");d.innerHTML=""; Nhb=d}d=Nhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ohb=a}a=Ohb;return a}}}); var X1=Phb;w([P(W.YtRendererBehavior),x("design:type",Object)],X1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],X1.prototype,"data",void 0);X1=w([U({is:"ytd-report-description-renderer"})],X1);var Qhb;var Rhb;var Y1=function(){return O.apply(this,arguments)||this}; p(Y1,O);Y1.prototype.configureRendererStamper=function(){return{"data.description":{id:"description",mapping:{reportDescriptionRenderer:"ytd-report-description-renderer"}}}}; h.Object.defineProperties(Y1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rhb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qhb){var d=document.createElement("template");d.innerHTML=""; Qhb=d}d=Qhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rhb=a}a=Rhb;return a}}}); var Z1=Y1;w([P(Y),x("design:type",Object)],Z1.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],Z1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],Z1.prototype,"data",void 0);Z1=w([U({is:"ytd-video-report-renderer"})],Z1);var Shb;var Thb;var Uhb=function(){return O.apply(this,arguments)||this}; p(Uhb,O); h.Object.defineProperties(Uhb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Thb){var a=document.createElement("template");a.innerHTML="\n \n \n
[[getSimpleString(data.title)]]
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Shb){var d=document.createElement("template");d.innerHTML=""; Shb=d}d=Shb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Thb=a}a=Thb;return a}}}); var $1=Uhb;w([P(W.YtRendererBehavior),x("design:type",Object)],$1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],$1.prototype,"data",void 0);$1=w([U({is:"ytd-channel-list-sub-menu-avatar-renderer"})],$1);var Vhb;var hib;var a2=function(){return O.apply(this,arguments)||this}; p(a2,O);a2.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{channelListSubMenuAvatarRenderer:"ytd-channel-list-sub-menu-avatar-renderer"}}}}; h.Object.defineProperties(a2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hib){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vhb){var d=document.createElement("template");d.innerHTML=""; Vhb=d}d=Vhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hib=a}a=hib;return a}}}); var b2=a2;w([P(Y),x("design:type",Object)],b2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],b2.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],b2.prototype,"aligment",void 0);b2=w([U({is:"ytd-channel-list-sub-menu-renderer"})],b2);var iib;var jib;var c2=function(){return O.apply(this,arguments)||this}; p(c2,O);c2.prototype.configureRendererStamper=function(){return{"data.playAllButton":{id:"play-all",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.rightButtons":{id:"right-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.sortSetting":{id:"sort-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{isRightAligned:!0}}}}}}; h.Object.defineProperties(c2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===iib){var d=document.createElement("template");d.innerHTML=""; iib=d}d=iib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jib=a}a=jib;return a}}}); var d2=c2;w([P(W.YtRendererBehavior),x("design:type",Object)],d2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],d2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],d2.prototype,"data",void 0);d2=w([U({is:"ytd-channel-sub-menu-renderer"})],d2);var kib;var lib;var e2=function(){return O.apply(this,arguments)||this}; p(e2,O);e2.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.viewChannelButton":{id:"view-channel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; h.Object.defineProperties(e2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lib){var a=document.createElement("template");a.innerHTML="

\n \n \n
\n [[getSimpleString(data.title)]]\n
\n
\n
\n

\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kib){var d=document.createElement("template");d.innerHTML=""; kib=d}d=kib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lib=a}a=lib;return a}}}); var f2=e2;w([P(W.YtRendererBehavior),x("design:type",Object)],f2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],f2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],f2.prototype,"data",void 0);f2=w([U({is:"ytd-feed-channel-filter-header-renderer"})],f2);var mib;var nib;var oib=function(){return O.apply(this,arguments)||this}; p(oib,O); h.Object.defineProperties(oib,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nib){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mib){var d=document.createElement("template");d.innerHTML="";mib=d}d=mib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nib=a}a=nib;return a}}}); var g2=oib;w([P(IQ),x("design:type",Object)],g2.prototype,"ytdReduxBehavior",void 0);w([R({selector:function(a){a=fRa(a.download);return cRa(a)}}), x("design:type",Object)],g2.prototype,"offlineItemSectionData",void 0);g2=w([U({is:"ytd-offline-item-section-renderer"})],g2);var pib;var qib;var h2=function(){var a=O.apply(this,arguments)||this;a.isSearch=!1;a.nextContinuation={continuationType:"sectionListContinuation"};return a}; p(h2,O);e=h2.prototype; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{feedChannelFilterHeaderRenderer:{component:"ytd-feed-channel-filter-header-renderer",noInjection:!0},textHeaderRenderer:{component:"ytd-text-header-renderer",noInjection:!0},richListHeaderRenderer:{component:"ytd-rich-list-header-renderer",noInjection:!0},headerWithBackRenderer:{component:"yt-header-with-back-renderer",noInjection:!0}}},"data.subMenu":{id:"sub-menu",mapping:{searchSubMenuRenderer:{component:"ytd-search-sub-menu-renderer",noInjection:!0}, channelSubMenuRenderer:{component:"ytd-channel-sub-menu-renderer",noInjection:!0},channelListSubMenuRenderer:{component:"ytd-channel-list-sub-menu-renderer",noInjection:!0},sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",noInjection:!0}}},shownItems:{id:"contents",mapping:{itemSectionRenderer:{matcher:function(a){switch(a.sectionIdentifier){case"comment-item-section":return"ytd-comments";case"backstage-item-section":return"ytd-backstage-items";default:return"ytd-item-section-renderer";}}, properties:{isSearchDova:"[[isSearchDova]]",isSearch:"[[isSearch]]"},noInjection:!0},channelOwnerEmptyStateRenderer:{component:"ytd-channel-owner-empty-state-renderer",noInjection:!0},channelAgeGateRenderer:{component:"ytd-channel-age-gate-renderer",noInjection:!0},pageIntroductionRenderer:{component:"ytd-page-introduction-renderer",noInjection:!0},reportHistorySectionRenderer:{component:"ytd-report-history-section-renderer",noInjection:!0},sponsorshipsManagementRenderer:{component:"ytd-sponsorships-management-renderer", noInjection:!0},offlineItemSectionRenderer:{component:"ytd-offline-item-section-renderer",noInjection:!0},continuationItemRenderer:"ytd-continuation-item-renderer"}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",noInjection:!0}},renderPriority:N("kevlar_low_priority_continuation")?0:void 0,usePageScheduler:N("kevlar_low_priority_continuation")}}}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents","yt-reload-continuation-items-command-body":"contents"}}; e.getItemsPath=function(){return"data.contents"}; e.replacePrimaryContent=function(a){this.set("data.contents",a)}; e.computeHasSortFilter_=function(a){return!!a&&!!a.sortFilterSubMenuRenderer}; h.Object.defineProperties(h2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qib){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pib){var d=document.createElement("template");d.innerHTML=""; pib=d}d=pib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qib=a}a=qib;return a}}}); var i2=h2;w([P(W.YtRendererBehavior),x("design:type",Object)],i2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],i2.prototype,"ytRendererstamperBehavior",void 0);w([P(MQ),x("design:type",Object)],i2.prototype,"ytLazyListBehavior",void 0);w([P(SQ),x("design:type",Object)],i2.prototype,"ytNextContinuationBehavior",void 0);w([P(w0a.YtBooleanLogicBehavior),x("design:type",Object)],i2.prototype,"ytBooleanLogicBehavior",void 0); w([P(FU),x("design:type",Object)],i2.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],i2.prototype,"data",void 0);w([R({value:2}),x("design:type",Number)],i2.prototype,"initialCount",void 0);w([R({value:!0}),x("design:type",Boolean)],i2.prototype,"autoFill",void 0);w([R({reflectToAttribute:!0,computed:"computeHasSortFilter_(data.subMenu)"}),x("design:type",Boolean)],i2.prototype,"hasSortFilter",void 0); w([R({reflectToAttribute:!0,computed:"toBool(data.hideBottomSeparator)"}),x("design:type",Boolean)],i2.prototype,"hideBottomSeparator",void 0);w([R(),x("design:type",Object)],i2.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],i2.prototype,"pageSubtype",void 0);i2=w([U({is:"ytd-section-list-renderer"})],i2);var rib;var sib;var j2=function(){return O.apply(this,arguments)||this}; p(j2,O);j2.prototype.computeStyle=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; h.Object.defineProperties(j2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===sib){var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.title)]]\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rib){var d=document.createElement("template");d.innerHTML=""; rib=d}d=rib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);sib=a}a=sib;return a}}}); var k2=j2;w([P(W.YtRendererBehavior),x("design:type",Object)],k2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],k2.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),x("design:type",String)],k2.prototype,"headerStyle",void 0);k2=w([U({is:"ytd-text-header-renderer"})],k2);var tib;var uib;var l2=function(){return O.apply(this,arguments)||this}; p(l2,O);l2.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.secondaryActionButton":{id:"secondary-action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; h.Object.defineProperties(l2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===uib){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tib){var d=document.createElement("template");d.innerHTML=""; tib=d}d=tib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);uib=a}a=uib;return a}}}); var m2=l2;w([P(W.YtRendererBehavior),x("design:type",Object)],m2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],m2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],m2.prototype,"data",void 0);m2=w([U({is:"ytd-sponsorships-alert-renderer"})],m2);var vib;var wib;var n2=function(){return O.apply(this,arguments)||this}; p(n2,O);e=n2.prototype;e.configureRendererStamper=function(){return{"data.expandableItems":{id:"content-container",mapping:{sponsorshipsPerksRenderer:{component:"ytd-sponsorships-perks-renderer"},sponsorshipsTierRenderer:{component:"ytd-sponsorships-tier-renderer"}}}}}; e.getExpansionIcon=function(a){return a?"yt-icons:arrow_drop_up":"yt-icons:arrow_drop_down"}; e.onToggleExpand=function(){this.data.expandableItems&&this.set("expanded",!this.get("expanded"))}; e.computeMessageContainerStyle=function(a){var b=a.expandableItems?" style-clickable":"";return a.messageContainerStyle?a.messageContainerStyle.split("MESSAGE_CONTAINER_")[1].replace(/_/g,"-").toLowerCase()+b:"style-unspecified"+b}; e.isSinglePerk=function(a){return!!a.messageContainerStyle&&("MESSAGE_CONTAINER_STYLE_SINGLE_PERK"===a.messageContainerStyle||"MESSAGE_CONTAINER_STYLE_SINGLE_PERK_FIRST"===a.messageContainerStyle)}; e.onExpandedChanged=function(){var a=this;this.expanded&&this.querySelectorAll("yt-img-shadow").forEach(function(b){b.onShow()}); Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")})}; e.onDataChanged=function(){this.get("data.startExpanded")&&(this.expanded=!0)}; h.Object.defineProperties(n2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vib){var d=document.createElement("template");d.innerHTML=""; vib=d}d=vib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wib=a}a=wib;return a}}}); var o2=n2;w([P(W.YtRendererBehavior),x("design:type",Object)],o2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],o2.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],o2.prototype,"data",void 0);w([R({observer:"onExpandedChanged",value:!1}),x("design:type",Boolean)],o2.prototype,"expanded",void 0);o2=w([U({is:"ytd-sponsorships-expandable-message-renderer"})],o2);var xib;var yib;var p2=function(){var a=O.apply(this,arguments)||this;a.expanded=!0;return a}; p(p2,O);p2.prototype.getBadgeRowClass=function(a,b,c){this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()}); a=a.selected;return c?-1!==a?a===b?"badge-line badge-selected":"badge-line badge-not-selected":"badge-line":(void 0!==a?a:0)===b?"badge-line":"badge-hidden"}; h.Object.defineProperties(p2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===yib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xib){var d=document.createElement("template");d.innerHTML=""; xib=d}d=xib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);yib=a}a=yib;return a}}}); var q2=p2;w([P(W.YtRendererBehavior),x("design:type",Object)],q2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],q2.prototype,"data",void 0);w([R(),x("design:type",Object)],q2.prototype,"expanded",void 0);q2=w([U({is:"ytd-sponsorships-loyalty-badges-renderer"})],q2);var zib;var Aib;var r2=function(){var a=O.apply(this,arguments)||this;a.expanded=!0;return a}; p(r2,O);r2.prototype.getContainerClasses=function(a,b){a=a?"expanded":"collapsed";b&&(a+=" item");return a}; h.Object.defineProperties(r2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Aib){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zib){var d=document.createElement("template");d.innerHTML=""; zib=d}d=zib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Aib=a}a=Aib;return a}}}); var s2=r2;w([P(W.YtRendererBehavior),x("design:type",Object)],s2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],s2.prototype,"data",void 0);w([R(),x("design:type",Object)],s2.prototype,"expanded",void 0);s2=w([U({is:"ytd-sponsorships-perk-renderer"})],s2);var Bib;var Cib;var Dib=function(){var a=O.apply(this,arguments)||this;a.expanded=!0;return a}; p(Dib,O); h.Object.defineProperties(Dib,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cib){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bib){var d=document.createElement("template");d.innerHTML=""; Bib=d}d=Bib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cib=a}a=Cib;return a}}}); var t2=Dib;w([P(W.YtRendererBehavior),x("design:type",Object)],t2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],t2.prototype,"data",void 0);w([R(),x("design:type",Object)],t2.prototype,"expanded",void 0);t2=w([U({is:"ytd-sponsorships-perks-renderer"})],t2);var Eib;var Fib;var u2=function(){return O.apply(this,arguments)||this}; p(u2,O);u2.prototype.configureRendererStamper=function(){return{"data.endButton":{id:"end-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.bottomButton":{id:"bottom-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; u2.prototype.onDataChanged=function(){this.get("data.endButton.buttonRenderer.text")&&this.get("data.endButton.buttonRenderer.icon")&&(this.data.endButton.buttonRenderer.iconPosition="BUTTON_ICON_POSITION_TYPE_RIGHT_OF_TEXT")}; h.Object.defineProperties(u2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Fib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Eib){var d=document.createElement("template");d.innerHTML=""; Eib=d}d=Eib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fib=a}a=Fib;return a}}}); var v2=u2;v2.prototype.onDataChanged=v2.prototype.onDataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],v2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],v2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],v2.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],v2.prototype,"onDataChanged",null);v2=w([U({is:"ytd-sponsorships-heading-renderer"})],v2);var Gib;var Hib;var Iib=function(){return O.apply(this,arguments)||this}; p(Iib,O); h.Object.defineProperties(Iib,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hib){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gib){var d=document.createElement("template");d.innerHTML=""; Gib=d}d=Gib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hib=a}a=Hib;return a}}}); var w2=Iib;w([R(),x("design:type",Object)],w2.prototype,"data",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],w2.prototype,"ytRendererBehavior",void 0);w2=w([U({is:"ytd-sponsorships-links-renderer"})],w2);var Jib;var Kib;var x2=function(){return O.apply(this,arguments)||this}; p(x2,O);e=x2.prototype;e.onDataChanged=function(){this.data&&this.data.expandableItems?this.$$("paper-button").setAttribute("role","button"):this.$$("paper-button").removeAttribute("role")}; e.onToggleExpand=function(){this.data&&this.data.expandableItems&&this.set("expanded",!this.get("expanded"))}; e.getExpansionIcon=function(a){return a?"yt-icons:arrow_drop_up":"yt-icons:arrow_drop_down"}; e.getTileClasses=function(a){return a?"tile expandable-tile":"tile"}; e.getButtonDisabled=function(a){return a?void 0:""}; h.Object.defineProperties(x2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kib){var a=document.createElement("template");a.innerHTML="\n \n
\n \n \n \n
\n \n
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jib){var d=document.createElement("template");d.innerHTML=""; Jib=d}d=Jib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kib=a}a=Kib;return a}}}); var y2=x2;y2.prototype.onDataChanged=y2.prototype.onDataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],y2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],y2.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],y2.prototype,"expanded",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y2.prototype,"onDataChanged",null);y2=w([U({is:"ytd-sponsorships-list-tile-renderer"})],y2);var Lib;var Mib;var z2=function(){return O.apply(this,arguments)||this}; p(z2,O); z2.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{sponsorshipsTierRenderer:{component:"ytd-sponsorships-tier-renderer"},sponsorshipsHeadingRenderer:{component:"ytd-sponsorships-heading-renderer"},sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"},sponsorshipsExpandableMessageRenderer:{component:"ytd-sponsorships-expandable-message-renderer"}}},"data.sidebar":{id:"sidebar",mapping:{sponsorshipsHeadingRenderer:{component:"ytd-sponsorships-heading-renderer"},sponsorshipsLinksRenderer:{component:"ytd-sponsorships-links-renderer"}, sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"}}},"data.alert":{id:"alert-renderer",mapping:{sponsorshipsAlertRenderer:{component:"ytd-sponsorships-alert-renderer"}}}}}; h.Object.defineProperties(z2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mib){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lib){var d=document.createElement("template");d.innerHTML=""; Lib=d}d=Lib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mib=a}a=Mib;return a}}}); var A2=z2;w([P(W.YtRendererBehavior),x("design:type",Object)],A2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],A2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],A2.prototype,"data",void 0);A2=w([U({is:"ytd-sponsorships-management-renderer"})],A2);var Nib;var Oib;var B2=function(){return O.apply(this,arguments)||this}; p(B2,O);B2.prototype.configureRendererStamper=function(){return{"data.redeemButton":{id:"redeem-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}}}}; h.Object.defineProperties(B2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Oib){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nib){var d=document.createElement("template");d.innerHTML=""; Nib=d}d=Nib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Oib=a}a=Oib;return a}}}); var C2=B2;w([P(W.YtRendererBehavior),x("design:type",Object)],C2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],C2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],C2.prototype,"data",void 0);C2=w([U({is:"ytd-sponsorships-promotion-renderer"})],C2);var Pib;var Qib;var D2=function(){return O.apply(this,arguments)||this}; p(D2,O);e=D2.prototype;e.configureRendererStamper=function(){return{"data.purchaseButton":{id:"purchase-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.expandableMessage":{id:"expandable-message",mapping:{sponsorshipsExpandableMessageRenderer:{component:"ytd-sponsorships-expandable-message-renderer"}}},"data.premiumFreebiePromo":{id:"premium-freebie-promo",mapping:{sponsorshipsPromotionRenderer:{component:"ytd-sponsorships-promotion-renderer"}}}}}; e.expansionCTA=function(a,b){return a&&(b?a.collapseCallToAction:a.expansionCallToAction)}; e.getExpansionIcon=function(a){return a?"arrow_drop_up":"arrow_drop_down"}; e.expansionCallToActionTap=function(){var a=this;this.expanded=!this.expanded;Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")})}; e.onDataChanged=function(){this.expanded=!this.get("data.expansionCallToAction");this.purchaseButtonClicked=!1}; e.computeDisplayTitle=function(a){return!(!a||"show"!==this.titledisplaystatus)}; e.computeDisplaySeparator=function(a){return!!(a&&a.purchaseText&&a.premiumFreebiePromo)}; e.tierHasPremiumFreebiePromo=function(a){return!(!a||!a.premiumFreebiePromo)}; e.onPurchaseButtonTap=function(){this.purchaseButtonClicked=!0}; h.Object.defineProperties(D2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qib){var a=document.createElement("template");a.innerHTML="\n\n
\n\n
\n
\n \n \n \n \n
\n\n
\n
\n
\n \n
\n \n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pib){var d=document.createElement("template");d.innerHTML=""; Pib=d}d=Pib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qib=a}a=Qib;return a}}}); var E2=D2;w([P(W.YtRendererBehavior),x("design:type",Object)],E2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],E2.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],E2.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],E2.prototype,"expanded",void 0);w([R({value:!1}),x("design:type",Boolean)],E2.prototype,"purchaseButtonClicked",void 0); w([R({reflectToAttribute:!0,value:"show"}),x("design:type",String)],E2.prototype,"titledisplaystatus",void 0);w([R({computed:"computeDisplayTitle(data.title)"}),x("design:type",Boolean)],E2.prototype,"displayTitle",void 0);w([R({computed:"computeDisplaySeparator(data)"}),x("design:type",Boolean)],E2.prototype,"displaySeparator",void 0);E2=w([U({is:"ytd-sponsorships-tier-renderer"})],E2);var Rib;var Sib;var F2=function(){var a=O.apply(this,arguments)||this;a.enableImprovedCommunityTab=N("enable_post_renderer_for_kevlar_community_tab");a.actionMap={"yt-add-backstage-comment-action":"addBackstageCommentAction_","yt-add-backstage-post-action":"addBackstagePostAction_","yt-add-backstage-reply-action":"addBackstageReplyAction_","yt-ban-author-action":"banAuthorAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-replace-backstage-comment-action":"replaceBackstageCommentAction_", "yt-replace-backstage-post-action":"replaceBackstagePostAction_","yt-replace-backstage-reply-action":"replaceBackstageReplyAction_"};return a}; p(F2,O);e=F2.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.addBackstagePostAction_=function(a){this.get("header.commentsHeaderRenderer.shouldShowBackstagePostOptimistically",this.data)&&(a=this.get("addBackstagePostAction.renderer.backstagePostThreadRenderer",a))&&(this.get("header.commentsHeaderRenderer.zeroStateMessage.backstageZeroStateRenderer",this.data)&&this.set("data.header.commentsHeaderRenderer.zeroStateMessage",{}),this.get("header.commentsHeaderRenderer.schedulingZeroStateMessage.postSchedulingZeroStateRenderer",this.data)&&this.set("data.header.commentsHeaderRenderer.schedulingZeroStateMessage", {}),this.get("data.contents")?this.splice("data.contents",0,0,{backstagePostThreadRenderer:a}):this.set("data.contents",[{backstagePostThreadRenderer:a}]))}; e.addBackstageCommentAction_=function(a){var b=this.get("addBackstageCommentAction.parentId",a);a=this.get("addBackstageCommentAction.renderer.commentThreadRenderer",a);if(b&&a){b=this.postIdToIndices_(b);for(var c=0;cd)break;d="data.contents."+d+".backstagePostThreadRenderer.comments";this.get(d)&&(this.get(d+".backstageCommentsRenderer.contents")&&this.push(d+".backstageCommentsRenderer.contents",{commentThreadRenderer:a}),this.get(d+".backstageCommentsRenderer.teaserContents")? this.push(d+".backstageCommentsRenderer.teaserContents",{commentThreadRenderer:a}):this.set(d+".backstageCommentsRenderer.teaserContents",[{commentThreadRenderer:a}]))}}}; e.addBackstageReplyAction_=function(a){var b=this.get("addBackstageReplyAction.parentId",a);a=this.get("addBackstageReplyAction.renderer.commentRenderer",a);b&&a&&this.setCreatorReply_(b,a)}; e.banAuthorAction_=function(a){var b=this.get("banAuthorAction.commentId",a);b&&(a=this.get("banAuthorAction.parentCommentId",a)||this.getParentPostId_(b),this.remove_(b,a))}; e.hideReportedCommentAction_=function(a){var b=this.get("hideReportedCommentAction.commentId",a);b&&((a=this.get("hideReportedCommentAction.parentCommentId",a))||(a=this.getParentPostId_(b)),this.remove_(b,a))}; e.replaceBackstageCommentAction_=function(a){var b=this.get("replaceBackstageCommentAction.commentId",a),c=this.get("replaceBackstageCommentAction.parentId",a);a=this.get("replaceBackstageCommentAction.renderer.commentThreadRenderer",a);if(b&&c&&a){c=this.postIdToIndices_(c);for(var d=0;df)break;var g=this.commentIdToIndex_(b,f,!1);if(0<=g){var l=this.get("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents."+g+".commentThreadRenderer.replies.commentRepliesRenderer"); l&&(a.replies={commentRepliesRenderer:l});this.splice("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents",g,1,{commentThreadRenderer:a})}g=this.commentIdToIndex_(b,f,!0);if(0<=g){if(l=this.get("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents."+g+".commentThreadRenderer.replies.commentRepliesRenderer"))a.replies={commentRepliesRenderer:l};this.splice("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents", g,1,{commentThreadRenderer:a})}}}}; e.replaceBackstagePostAction_=function(a){var b=this.get("replaceBackstagePostAction.itemId",a);if(b){b=this.postIdToIndices_(b);for(var c=0;cd)break;var f=this.getPostRendererType_(d),g=this.get("replaceBackstagePostAction.renderer."+f,a);if(!g&&"sharedPostRenderer"!==f)break;var l=!1;g||(l=!0,g=this.get("replaceBackstagePostAction.renderer.backstagePostRenderer",a));if(!g)break;var m={};l?(m.backstagePostRenderer=g,this.set("data.contents."+d+".backstagePostThreadRenderer.post.sharedPostRenderer.originalPost", m)):(m[f]=g,this.set("data.contents."+d+".backstagePostThreadRenderer.post",m))}}}; e.replaceBackstageReplyAction_=function(a){var b=this.get("replaceBackstageReplyAction.replyId",a),c=this.get("replaceBackstageReplyAction.parentId",a);a=this.get("replaceBackstageReplyAction.renderer.commentRenderer",a);b&&a&&c&&this.setCreatorReply_(c,a)}; e.removeCommentAction_=function(a){var b=this.get("removeCommentAction.commentId",a);if(b){var c=this.get("removeCommentAction.parentCommentId",a);c&&this.get("removeCommentAction.isCreatorReply",a)?this.setCreatorReply_(c,void 0):(c||(c=this.getParentPostId_(b)),this.remove_(b,c))}}; e.setCreatorReply_=function(a,b){var c=this.getParentPostId_(a);if(c){c=this.postIdToIndices_(c);for(var d=0;df)break;var g=this.commentIdToIndex_(a,f,!1);if(0<=g){var l="data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents."+g;g=l+".commentThreadRenderer.comment.commentRenderer.containsCreatorReply";l+=".commentThreadRenderer.replies";void 0==b?(this.set(l,{}),this.set(g,!1)):(this.set(l,{commentRepliesRenderer:{teaserContents:[{commentRenderer:b}]}}), this.set(l+".commentRepliesRenderer.teaserContents.0.commentRenderer.isCreatorReply",!0),this.set(g,!0))}g=this.commentIdToIndex_(a,f,!0);0<=g&&(g="data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents."+g,f=g+".commentThreadRenderer.comment.commentRenderer.containsCreatorReply",g+=".commentThreadRenderer.replies",void 0==b?(this.set(g,{}),this.set(f,!1)):(this.set(g,{commentRepliesRenderer:{teaserContents:[{commentRenderer:b}]}}),this.set(f,!0)))}}}; e.remove_=function(a,b){if(b){b=this.postIdToIndices_(b);for(var c=0;cd)break;var f=this.commentIdToIndex_(a,d,!1);0<=f&&this.splice("data.contents."+d+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents",f,1);f=this.commentIdToIndex_(a,d,!0);0<=f&&this.splice("data.contents."+d+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents",f,1);d=this.enableImprovedCommunityTab?"data.contents."+d+".backstagePostThreadRenderer.post.postRenderer": "data.contents."+d+".backstagePostThreadRenderer.post.backstagePostRenderer";f=d+".backstageAttachment.pollRenderer.votedCommentId";this.get(f)==a&&(this.set(f,null),this.set(d+".backstageAttachment.pollRenderer.commentDelete",null))}}else for(b=this.postIdToIndices_(a).reverse(),c=0;cd)break;f=this.getPostRendererType_(d);var g=this.get("backstagePostThreadRenderer.post."+f,this.data.contents[d]);g.postId===a?this.splice("data.contents",d,1):"sharedPostRenderer"===f&&this.set("data.contents."+ d+".backstagePostThreadRenderer.post.sharedPostRenderer.originalPost",null);g.scheduledPublishTimeSec&&this.ytActionSenderBehavior.sendAction("yt-update-posts-total-count-action",[{updatePostsTotalCountAction:{updateType:"UPDATE_POSTS_TOTAL_COUNT_TYPE_REMOVE",number:1}}])}}; e.postIdToIndices_=function(a){for(var b=[],c=0;cb)return-1;b=null===(m=null===(l=null===(g=null===(f=null===(d=this.data)||void 0===d?void 0:d.contents)||void 0===f?void 0:f[b])||void 0===g?void 0:g.backstagePostThreadRenderer)||void 0===l?void 0:l.comments)||void 0===m?void 0:m.backstageCommentsRenderer;return(c=c?null===b||void 0===b?void 0:b.teaserContents:null===b||void 0===b?void 0:b.contents)&&c.length?lb(c,function(n){return n.commentThreadRenderer.comment.commentRenderer.commentId== a}):-1}; e.getParentPostId_=function(a){a=a.split(".");if(a[1])return a[0]}; e.getPostRendererType_=function(a){return this.enableImprovedCommunityTab?"postRenderer":this.get("backstagePostThreadRenderer.post.sharedPostRenderer",this.data.contents[a])?"sharedPostRenderer":"backstagePostRenderer"}; h.Object.defineProperties(F2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Sib){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rib){var d=document.createElement("template");d.innerHTML="";Rib=d}d=Rib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Sib=a}a=Sib;return a}}}); var G2=F2;w([P(W.YtRendererBehavior),x("design:type",Object)],G2.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],G2.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],G2.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],G2.prototype,"data",void 0);w([R(),x("design:type",Object)],G2.prototype,"enableImprovedCommunityTab",void 0);G2=w([U({is:"ytd-backstage-items"})],G2);var Tib;var Uib;Polymer({is:"ytd-comments",_template:function(){if(void 0!==Uib)return Uib;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tib){var d=document.createElement("template");d.innerHTML=""; Tib=d}d=Tib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Uib=a}, behaviors:[cQ,W.YtRendererBehavior,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isBackstage:{type:Boolean,computed:"computeIsBackstage_(data.header.commentsHeaderRenderer.isBackstageContent)",reflectToAttribute:!0},disablePrescanVisibility:{type:Boolean,value:!0},canScheduleJobs:{type:Boolean,value:!0},canShowDefaultSpinner_:{type:Boolean,computed:"computeCanShowDefaultSpinner_(data, canScheduleJobs)"}},actionMap:{"yt-ban-author-action":"banAuthorAction_", "yt-create-comment-action":"createCommentAction_","yt-create-comment-reply-action":"createCommentReplyAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-pin-comment-action":"pinCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-unpin-comment-action":"unpinCommentAction_","yt-update-comment-action":"updateCommentAction_","yt-update-comment-reply-action":"updateCommentReplyAction_"},listeners:{"yt-retrieve-location":"onRetrieveLocation_"},observers:["contentsChanged_(data.contents.*)", "headerChanged_(data.header)"],created:function(){var a=this;this.cachedCommentIds_=new Set;this.RenderingPriority={RENDERING_PRIORITY_UNKNOWN:0,RENDERING_PRIORITY_PINNED_COMMENT:10,RENDERING_PRIORITY_LINKED_COMMENT:20,RENDERING_PRIORITY_COMMUNITY_GUIDELINES_BELOW_HEADER:80,RENDERING_PRIORITY_COMMENT_HEADER:100};this.initCommentsCsi_();this.player=null;this.PLAYER_EVENTS_=new Map;this.PLAYER_EVENTS_.set("onVideoProgress",function(){a.onVideoProgress_()})}, attached:function(){this.maybeGetAndSetPlayer_()}, maybeGetAndSetPlayer_:function(){var a=this,b=ZM(this);b&&b.getPlayerPromise().then(function(c){a.playerApiReady_(c)})}, playerApiReady_:function(a){this.setPlayer_(a)}, setPlayer_:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.PLAYER_EVENTS_);(this.player_=a)&&this.listenToPlayerEvents(a,this.PLAYER_EVENTS_)}, detached:function(){this.setPlayer_(null)}, onVideoProgress_:function(){var a=this,b=ek("prefetch_comments_ms_after_video");0b)){var d=this.getRepliesPath_(b);if(this.get(d)){a=this.get("createCommentReplyAction.replyToCommentId",a);d=this.getRepliesContentsPath_(b,!1);if(this.get(d)){var f=this.replyIdToIndex_(a,b,!1);this.doReplyInsert_(d,c,f)}d= this.getRepliesContentsPath_(b,!0);this.get(d)?(b=this.replyIdToIndex_(a,b,!0),(!a||0<=b)&&this.doReplyInsert_(d,c,b)):this.set(d,[c])}else this.set(d,{commentRepliesRenderer:{teaserContents:[c]}})}}, setCreatorReply_:function(a,b){var c=this.getParentCommentId_(a.replace("#","."));if(c&&(c=this.commentIdToIndex_(c),!(0>c))){var d=this.replyIdToIndex_(a,c,!1);0<=d&&(d=this.getRepliesContentsPath_(c,!1)+("."+d+".commentRenderer"),this.set(d+".creatorReply",b),this.set(d+".containsCreatorReply",!!this.get("commentRenderer",b)));a=this.replyIdToIndex_(a,c,!0);0<=a&&(a=this.getRepliesContentsPath_(c,!0)+("."+a+".commentRenderer"),this.set(a+".creatorReply",b),this.set(a+".containsCreatorReply",!!this.get("commentRenderer", b)))}}, hideReportedCommentAction_:function(a){var b=this.get("hideReportedCommentAction.commentId",a);b&&(a=this.get("hideReportedCommentAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a))}, getParentCommentId_:function(a){a=a.split(".");if(a[1])return a[0]}, removeCommentAction_:function(a){var b=this.get("removeCommentAction.commentId",a);b&&(this.get("removeCommentAction.isCreatorReply",a)?(b=this.get("removeCommentAction.parentCommentId",a),this.setCreatorReply_(b,{})):(a=this.get("removeCommentAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a)))}, pinCommentAction_:function(a){var b=this.get("pinCommentAction.commentId",a);b&&(a=this.get("pinCommentAction.actionResult.update.commentThreadRenderer",a))&&(this.remove_(b),this.insert_(a,!0))}, unpinCommentAction_:function(a){var b=this.get("unpinCommentAction.commentId",a);b&&(a=this.get("unpinCommentAction.actionResult.update.commentThreadRenderer",a))&&(this.remove_(b),this.insert_(a))}, updateCommentAction_:function(a){var b=this.get("updateCommentAction.commentId",a);a=this.get("updateCommentAction.contents",a);b&&a&&this.update_(b,a)}, updateCommentReplyAction_:function(a){var b=this.get("updateCommentReplyAction.commentId",a),c=this.get("updateCommentReplyAction.contents",a);b&&c&&(this.get("updateCommentReplyAction.isCreatorReply",a)?(b=this.get("updateCommentReplyAction.parentCommentId",a),this.setCreatorReply_(b,c)):(b=b.replace("#","."),a=this.getParentCommentId_(b),this.update_(b,c,a)))}, banAuthorAction_:function(a){var b=this.get("banAuthorAction.commentId",a);b&&(a=this.get("banAuthorAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a))}, commentIdToIndex_:function(a){if(!a||!this.cachedCommentIds_.has(a))return-1;for(var b=0,c=this.data.contents.length;b=this.RenderingPriority[f.renderingPriority]){b&&this.RenderingPriority[a.renderingPriority]==this.RenderingPriority[f.renderingPriority]?this.splice("data.contents",c,1,{commentThreadRenderer:a}):this.splice("data.contents",c,0,{commentThreadRenderer:a}); break}}}, getReplyThreadEndIndex_:function(a,b){a=this.get(a);var c=b+1;if(void 0===a)return c;for(b=a[b];cb.commentRenderer.threadNestingLevel;)c++;return c}, doReplyRemove_:function(a,b,c){a=this.replyIdToIndex_(a,b,c);0>a||(b=this.getRepliesContentsPath_(b,c),c=a+1,N("enable_reply_threading_on_web")&&(c=this.getReplyThreadEndIndex_(b,a)),this.splice(b,a,c-a))}, remove_:function(a,b){b=this.commentIdToIndex_(b);0>b?(b=this.commentIdToIndex_(a),0>b||this.splice("data.contents",b,1)):(this.doReplyRemove_(a,b,!1),this.doReplyRemove_(a,b,!0),0>b||(b="data.contents."+b+".commentThreadRenderer.comment.commentRenderer",this.get(b+".backstageAttachment.pollRenderer.votedCommentId")==a&&(this.set(b+".backstageAttachment.pollRenderer.votedCommentId",null),this.set(b+".backstageAttachment.pollRenderer.commentDelete",null))))}, replyIdToIndex_:function(a,b,c){if(0>b)return-1;b=this.getRepliesContentsPath_(b,c);b=this.get(b);if(!b||!b.length)return-1;c=0;for(var d=b.length;ca)){b=this.getRepliesContentsPath_(b,d);if(d=this.get(b+"."+a+".commentRenderer.creatorReply"))c.commentRenderer.creatorReply=d;c.commentRenderer.threadNestingLevel=this.get(b)[a].commentRenderer.threadNestingLevel;this.splice(b,a,1,c)}}, update_:function(a,b,c){var d=this.commentIdToIndex_(c);!c||0>d?(d=this.commentIdToIndex_(a),0>d||this.set("data.contents."+d+".commentThreadRenderer.comment",b)):(this.doReplyUpdate_(a,d,b,!1),this.doReplyUpdate_(a,d,b,!0))}, computeIsBackstage_:function(a){return!!a}, computeCanShowDefaultSpinner_:function(a,b){return N("kevlar_show_comments_spinner_earlier")&&b?(b=this.getInterface(XM))&&b.isOnWatch&&b.isOnWatch()?!(a&&(a.contents||a.header||a.continuations)):!1:!1}, onRetrieveLocation_:function(a,b){b&&b.hasComments&&this.tickForCommentsTimer_("lss")}, tickForCommentsTimer_:function(a){Xo(a,void 0,"wn_comments")}, loadComments:function(){ek("prefetch_comments_ms_after_video")||N("prefetch_comments_idle_job")?this.$.sections.triggerInitialContinuations():this.$.sections.triggerContinuations()}});var Vib;var Wib;Polymer({is:"yt-header-with-back-renderer",_template:function(){if(void 0!==Wib)return Wib;var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vib){var d=document.createElement("template");d.innerHTML=""; Vib=d}d=Vib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Wib=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}}},onBackIconTap_:function(){window.history.back()}});var Xib;var Yib;var H2=function(){return O.apply(this,arguments)||this}; p(H2,O);e=H2.prototype; e.configureRendererStamper=function(){return{content_:{id:"primary",mapping:{richGridRenderer:"ytd-rich-grid-renderer",sectionListRenderer:{component:"ytd-section-list-renderer",properties:{initialCount:"[[initialCount]]",pageSubtype:"[[pageSubtype]]"}}}},"data.secondaryContents":{id:"secondary",mapping:{browseFeedActionsRenderer:{component:"ytd-browse-feed-actions-renderer",noInjection:!0},browseSecondaryContentsRenderer:{component:"ytd-browse-secondary-contents-renderer",noInjection:!0},profileColumnRenderer:{component:"ytd-profile-column-renderer", noInjection:!0}}}}}; e.getPath_=function(a,b){var c="data.tabs.#"+b+".";a.tabs[b].tabRenderer?c+="tabRenderer.":a.tabs[b].expandableTabRenderer&&(c+="expandableTabRenderer.");return c+"content.sectionListRenderer"}; e.computeDisplayedContent_=function(a){this.unlinkPaths("content_");if(a&&a.tabs)for(var b=a.tabs.length,c=0;c
\n
\n
\n"; a.content.insertBefore(PV().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xib){var d=document.createElement("template");d.innerHTML=""; Xib=d}d=Xib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Yib=a}a=Yib;return a}}}); var I2=H2;I2.prototype.onYtServiceRequestCompleted_=I2.prototype.onYtServiceRequestCompleted_;I2.prototype.onYtServiceRequestSent_=I2.prototype.onYtServiceRequestSent_;I2.prototype.onRetrieveLocation_=I2.prototype.onRetrieveLocation_;w([P(BQ),x("design:type",Object)],I2.prototype,"ytdGridStateAwareBehavior",void 0);w([P(Y),x("design:type",Object)],I2.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],I2.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],I2.prototype,"data",void 0);w([R({computed:"computeDisplayedContent_(data)"}),x("design:type",Object)],I2.prototype,"content_",void 0);w([R({value:function(){return 1024\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zib){var d=document.createElement("template");d.innerHTML=""; Zib=d}d=Zib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return $ib=a}, behaviors:[Y,W.YtRendererBehavior],properties:{data:Object,wrapButtons:{type:Boolean,value:!1,reflectToAttribute:!0},isMusic:{type:Boolean,value:"WEB_REMIX"===A("INNERTUBE_CLIENT_NAME",void 0),reflectToAttribute:!0},alertStyle:{type:String,reflectToAttribute:!0,computed:"computeAlertStyle_(data.alertType.type)"},dismissBoundButtonTap_:{type:Function,value:function(){return this.dismissButtonTap_.bind(this)}}, acceptBoundButtonTap_:{type:Function,value:function(){return this.acceptButtonTap_.bind(this)}}}, stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[dismissBoundButtonTap_]]"}}}},"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[acceptBoundButtonTap_]]"}}}}},observers:["onIsVisibleChanged_(data.isVisible)"],created:function(){this.closeOnDismissButton_=new Set;this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN");this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ON_LINK_TAP"); this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ONLY_DISMISS_BUTTON_TAP");this.closeOnAcceptButton_=new Set;this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN");this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ON_LINK_TAP");this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ONLY_ACTION_BUTTON_TAP")}, dismissButtonTap_:function(){this.set("data.isVisible",!this.closeOnDismissButton_.has(this.data.dismissStrategy||"ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN"))}, acceptButtonTap_:function(){this.set("data.isVisible",!this.closeOnAcceptButton_.has(this.data.dismissStrategy||"ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN"))}, computeAlertStyle_:function(a){return a}, onIsVisibleChanged_:function(){this.data&&!this.data.isVisible&&this.impressionLog()}});var ajb;var bjb;var cjb={_noAccessors:!0,properties:{data:Object},getCurrentData:function(){return this.data}, getCurrentPage:function(){}, getPageOffset:function(a){return a.getScrollTop()}, setPageOffset:function(a,b){a.setScrollTop(b)}, setPageOffsetForNavigation:function(a){this.fire("yt-navigate-set-page-offset",{page:a,offset:0})}};function djb(a){var b=self.location.origin+"/app_shell_home";return Ya(this,function d(){var f;return ya(d,function(g){if(1==g.nextAddress)return q(g,a.open("yt-appshell-assets"),2);f=g.yieldResult;return g.return(f.match(b))})})} function ejb(){var a=t.caches,b=self.location.origin+"/app_shell_home";Ya(this,function d(){var f;return ya(d,function(g){if(1==g.nextAddress)return q(g,a.open("yt-appshell-assets"),2);f=g.yieldResult;return q(g,f.delete(b),0)})})} function fjb(a){Ya(this,function c(){return ya(c,function(d){return q(d,a.delete("yt-appshell-assets"),0)})})} ;var J2=null,gjb={},K2=(0,tm.getDbFactory)("yt-serviceworker-metadata",{objectStores:(gjb.auth=!0,gjb["resource-manifest-assets"]=!0,gjb),shared:!0,upgrade:function(a,b){1>b&&a.createObjectStore("resource-manifest-assets");2>b&&a.createObjectStore("auth")}, version:2});function hjb(){return Ya(this,function b(){var c;return ya(b,function(d){return 1==d.nextAddress?J2?d.jumpTo(2):q(d,K2().open(),3):2!=d.nextAddress?(c=d.yieldResult,q(d,$l(c,["resource-manifest-assets"],"readonly",function(f){return f.objectStore("resource-manifest-assets").withCursor({query:IDBKeyRange.bound(0,Math.floor(new Date().getTime()/1E3)),direction:"prev"},function(g){J2=g.getKey()})}),2)):d.return(J2)})})} function ijb(){Ya(this,function b(){var c;return ya(b,function(d){if(1==d.nextAddress)return J2=null,q(d,K2().open(),2);c=d.yieldResult;return d.return(c.clear("resource-manifest-assets"))})})} ;function jjb(){return Ya(this,function b(){var c,d;return ya(b,function(f){if(1==f.nextAddress)return q(f,K2().open(),2);if(3!=f.nextAddress)return c=f.yieldResult,q(f,c.get("auth","shell_identifier_key"),3);d=f.yieldResult;return f.return(d||"")})})} function kjb(){Ya(this,function b(){var c;return ya(b,function(d){if(1==d.nextAddress)return q(d,K2().open(),2);c=d.yieldResult;return q(d,c.clear("auth"),0)})})} ;function ljb(a){fjb(a);kjb();ijb()} ;function mjb(){return Ya(this,function b(){var c,d,f;return ya(b,function(g){switch(g.nextAddress){case 1:return c="LOGGED_OUT",sa(g,2),q(g,jjb(),4);case 4:c=g.yieldResult;ta(g,3);break;case 2:return d=ua(g),vm(d),g.return(!0);case 3:return f=A("DATASYNC_ID","LOGGED_OUT"),f===c?g.return(!1):g.return(!0);}})})} function njb(a){return Ya(this,function c(){var d,f,g,l,m,n;return ya(c,function(r){switch(r.nextAddress){case 1:return q(r,djb(a),2);case 2:if(d=r.yieldResult){var u;a:{if(d.headers&&(u=d.headers.get("date"))&&(u=Date.parse(u),!isNaN(u))){u=Math.round(Vk()-u);break a}u=-1}f=u;if(-1";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ajb){var d= document.createElement("template");d.innerHTML=""; ajb=d}d=ajb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return bjb=a}, behaviors:[W.YtRendererBehavior,NO.YtActionHandlerBehavior,cjb],provides:XM,properties:{removePageManagerScroll:{type:Boolean,value:N("kevlar_remove_page_manager_scroll"),reflectToAttribute:!0}},actionMap:{"player-update-pre":"prePlayerUpdate_","yt-get-page-offset":"getPageOffset","yt-set-page-offset":"setPageOffset","yt-pause-active-page-context":"pauseActiveContext_","yt-prepare-page-dispose":"preparePageDispose_","yt-stop-old-player":"onYtStopOldPlayer_"},listeners:{"yt-page-manager-navigate-start":"onYtPageManagerNavigateStart_"}, factoryImpl:function(){}, created:function(){this.pageNameToElement_=new Map;this.currentPage_=void 0;this.renderLoadingStateJobId_=0;this.elementPoolPopulator_=ko.getInstance();this.updatePageDataJobId_=0;this.contextSwitcher_=new HSa;this.pageDisposeJobsets_=new WeakMap}, attached:function(){this.fire("attached");var a=this.getInterfaceForTs("yt-network-manager");a&&(this.contextSwitcher_.networkService_=a)}, getPageSubTypeFromUrl_:function(a){var b=a?Ad(a):"";if(b){if("/"==b)return"home";if(["/fashion","/feed/fashion_destination","/channel/UCrpQ4p1Ql_hG8rKXIKM1MOQ"].some(function(c){return 0===b.toLowerCase().indexOf(c.toLowerCase())}))return"fashion"; if(0==b.indexOf("/channel/")||0==b.indexOf("/user/")||0==b.indexOf("/gaming"))return"channel";if("/playlist"==b||0==b.indexOf("/playlist/")||"/view_play_list"==b||0==b.indexOf("/view_play_list/")||0==b.indexOf("/show/"))return"playlist";if("/feed/history"==b||0==b.indexOf("/feed/history/"))return"history";if("/new"==b)return"labs";if("/feed/subscriptions"==b)return"subscriptions";if(0==b.indexOf("/feed/subscriptions/"))return"filteredsubscriptions";if("/history_controls"==b)return"standalone";if(0== b.indexOf("/account")||"/gaia_link"==b)return"WEB_PAGE_TYPE_SETTINGS";if(0==b.indexOf("/paid_memberships")||N("enable_purchase_activity_in_paid_memberships")&&(0==b.indexOf("/purchases")||0==b.indexOf("/feed/purchases")))return"memberships-and-purchases";if(0==b.indexOf("/premium")||0==b.indexOf("/musicpremium"))return"red";if(0==b.indexOf("/redeem")||0==b.indexOf("/reporthistory"))return"browse";if(0==b.indexOf("/hashtag"))return"hashtag-landing-page"}}, getPageSubTypeFromEndpoint_:function(a){var b;(a=this.get("commandMetadata.webCommandMetadata.url",a))&&(b=this.getPageSubTypeFromUrl_(a));return b}, getPageTypeFromData_:function(a){if(!a)return"browse";var b=a.page,c=a.url,d=this.get("response.responseContext.webResponseContextExtensionData.pageTheme",a);d?b=d.toLowerCase().replace(/_/g,"-"):"watch"!=b&&(("browse"==b||"settings"==b)&&this.get("response.sidebar",a)&&this.get("response.sidebar.settingsSidebarRenderer",a)?b="WEB_PAGE_TYPE_SETTINGS":"browse"==b&&this.get("response.metadata.channelMetadataRenderer",a)?b="channel":c&&(b=this.getPageSubTypeFromUrl_(c)||b));return b}, doesWatchPageHavePlaylist_:function(a){var b=!!AM().queueProxy;a=!!this.get("response.currentVideoEndpoint.watchEndpoint.playlistId",a);return b||a}, pauseActiveContext_:function(){var a=this.contextSwitcher_;a.activeContext_&&a.activeContext_.pause()}, getPageElementForType_:function(a){var b=this.pageNameToElement_.get(a);if(!b){switch(a){case"watch":var c=N("kevlar_fixie_watch_layout")?ho("ytd-watch-fixie"):ho("ytd-watch-flexy");break;case"search":c=ho("ytd-search",this);break;case"channel":c=ho("ytd-browse",this);c.pageSubtype="channels";break;case"playlist":case"standalone":case"home":case"red":case"WEB_PAGE_TYPE_SETTINGS":case"history":case"labs":case"subscriptions":case"filteredsubscriptions":case"memberships-and-purchases":case"ypc-offers":case"fashion":case"hashtag-landing-page":c= ho("ytd-browse",this);c.pageSubtype=a;break;case"browse":c=ho("ytd-browse",this);}Po("pc",1);b=c;this.pageNameToElement_.set(a,b)}return b}, attachPage_:function(a){a.isAttached||Polymer.dom(this.root).appendChild(a)}, setActivePage_:function(a){var b=this.currentPage_;a?a!=this.currentPage_&&(b&&(b.hidden=!0,b.active=!1,b.removeAttribute("role")),this.currentPage_=a,b&&this.fire("yt-page-type-changed",{oldPageType:b.is,newPageType:a.is}),a.hidden=!1,this.attachPage_(a),a.active=!0,a.setAttribute("role","main"),b&&this.setPageOffsetForNavigation(a,0)):Um(new Pl("Unable to set active page",b?b.is:"unknown origin"))}, updatePageData:function(a){var b=this,c=this.data;this.updatePageDataJobId_&&Bk.cancelJob(this.updatePageDataJobId_);this.data=a;return new Ki(function(d){var f=function(){a.filler?b.performDataUpdate_(a,c):CUa(function(){b.performDataUpdate_(a,c)}); d()}; a&&"watch"==a.page?b.updatePageDataJobId_=zk(Bk,f):f()})}, performDataUpdate_:function(a,b){this.sendAction("yt-close-all-popups-action",[["ytd-conversation-section-renderer","ytd-video-download-toast-renderer"]]);var c=!a.filler;c&&(Ro("lps"),N("config_age_report_killswitch")||ojb());var d=this.getPageTypeFromData_(a),f=this.getPageElementForType_(d);c&&$ka(this.elementPoolPopulator_,d);c&&!this.renderLoadingStateJobId_&&this.setActivePage_(f);if(f){var g="watch"==d;N("kevlar_flush_jobs_before_setting_player_response")&&this.flushPageDisposeJobset_(f);g&&( f.playerData=a.playerResponse);N("kevlar_prefetch")&&!N("block_all_player_prefetch_requests")&&this.preparePrefetchRequest_(a,f,c,g);g?("watch"!=this.getPageTypeFromData_(b)&&this.sendAction("yt-cache-miniplayer-page-action",[b]),this.sendSingletonAction("yt-deactivate-miniplayer-action")):"watch"==this.getPageTypeFromData_(b)&&this.doesWatchPageHavePlaylist_(b)&&(YL.getInstance().playlistWatchPageActivation=!0,this.activateMiniplayer(b));this.getInterfaceForTs("yt-activity-manager").ignoreNextScroll(); N("kevlar_flush_jobs_before_setting_player_response")||this.flushPageDisposeJobset_(f);c?(b=typeof f.loadPage,"function"==b?(f.pageContext=ISa(this.contextSwitcher_,f,f.data!=a.response),f.loadPage(a.response)):Um(new Pl("b/38014653 ",[d,f.is,f.nodeName,b])),Ro("pdl")):(f.hidden=!0,a.response.filler=!0,f.data=a.response,this.attachPage_(f));this.fire("yt-page-data-updated",{pageType:d})}xk(Bk,function(){N("kevlar_nitrate_driven_tooltips")?NN.getInstance().parsePageData(a,f):LSa(a,f)})}, preparePrefetchRequest_:function(a,b,c,d){return Ya(this,function g(){var l,m,n=this,r,u,z,C,J;return ya(g,function(E){if(1==E.nextAddress)return!c||!d||N("kevlar_disable_background_prefetch")&&0==Qo()?E.return():(l=$M(b))?q(E,l.getPlayerPromise(),2):E.return();m=E.yieldResult;r=n.get("response.responseContext.webResponseContextExtensionData",a);u=n.getInterfaceForTs("yt-network-manager");if(!u||!r)return E.return();z=n.get("response.contents.twoColumnWatchNextResults.autoplay.autoplay",a);C=n.getInterfaceForTs("yt-playlist-manager"); J=DN.getInstance();zTa(J,r,m,u,C,z);oa(E)})})}, movePlayerToWatch:function(a){return Ya(this,function c(){var d=this,f,g;return ya(c,function(l){f=d.getPageElementForType_("watch");g=f.getPlayerContainer();a.appendTo(g);oa(l)})})}, getPlayerFromWatch:function(){var a=this.getPageElementForType_("watch");return $M(a)}, activateMiniplayer:function(a){var b=PQ(a.response),c=$M(this.getPageElementForType_("watch"));this.sendSingletonAction("yt-activate-miniplayer-action",[c,b,a])}, prePlayerUpdate_:function(a){if("watch"==a){var b=this.getPageElementForType_("watch");this.renderLoadingStateJobId_?(Bk.cancelJob(this.renderLoadingStateJobId_),this.renderLoadingStateJobId_=0,this.renderPageLoadingState_(a)):this.setActivePage_(b)}}, getCurrentPage:function(){return this.currentPage_}, isOnWatch:function(){return!!this.currentPage_&&["ytd-watch-flexy","ytd-watch-fixie"].includes(this.currentPage_.is)}, preparePage:function(a,b){try{b&&(a=this.getPageSubTypeFromEndpoint_(b)||a);if("watch"!=a){var c=this.elementPoolPopulator_,d=a;d!=c.targetPage_&&-1\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pjb){var d=document.createElement("template");d.innerHTML=""; pjb=d}d=pjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qjb=a}a=qjb;return a}}}); var M2=L2;w([P($1a),x("design:type",Object)],M2.prototype,"ytPageBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],M2.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],M2.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],M2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],M2.prototype,"ytRendererstamperBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],M2.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_center_search_results")}}), x("design:type",Boolean)],M2.prototype,"centerResults",void 0);w([R({value:!0}),x("design:type",Boolean)],M2.prototype,"monitorScroll",void 0);M2=w([U({is:"ytd-search"})],M2);var rjb=function(){return O.apply(this,arguments)||this}; p(rjb,O);var sjb=rjb;sjb=w([U({is:"ytd-search-items"})],sjb);var tjb;var ujb;var N2=function(){return O.apply(this,arguments)||this}; p(N2,O);N2.prototype.configureRendererStamper=function(){return{"data.adMetadata.displayAdRenderer":{id:"badge",mapping:{badge:{component:"ytd-badge-supported-renderer",properties:{topStandaloneBadge:"[[data.adMetadata.displayAdRenderer.badge]]"}}}},"data.adMetadata.displayAdRenderer.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.content":{id:"content",mapping:{horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{useFloorScrolling:!0}},gridRenderer:"ytd-grid-renderer"}}}}; h.Object.defineProperties(N2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ujb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n \n \n

\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tjb){var d=document.createElement("template");d.innerHTML=""; tjb=d}d=tjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ujb=a}a=ujb;return a}}}); var O2=N2;w([P(Y),x("design:type",Object)],O2.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],O2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],O2.prototype,"data",void 0);O2=w([U({is:"ytd-carousel-ad-renderer"})],O2);var vjb;var wjb;var P2=function(){return O.apply(this,arguments)||this}; p(P2,O);P2.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; P2.prototype.computeBlueBottomLink=function(a){return a}; h.Object.defineProperties(P2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wjb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n\n
\n
\n
\n \n \n \n
\n \n
\n \n \n \n
\n
\n \n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vjb){var d=document.createElement("template");d.innerHTML=""; vjb=d}d=vjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wjb=a}a=wjb;return a}}}); var Q2=P2;w([P(Y),x("design:type",Object)],Q2.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],Q2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],Q2.prototype,"data",void 0);w([R({computed:"computeIcon_(data.bottomIcon)"}),x("design:type",String)],Q2.prototype,"bottomIcon",void 0);w([R({computed:"computeBlueBottomLink(data.blueBottomLink)",reflectToAttribute:!0}),x("design:type",Boolean)],Q2.prototype,"enableBlueBottomLink",void 0); Q2=w([U({is:"ytd-web-answer-renderer"})],Q2);var xjb;var yjb;var R2=function(){return O.apply(this,arguments)||this}; p(R2,O);R2.prototype.configureRendererStamper=function(){return{"data.pages":{id:"pages",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(R2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===yjb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xjb){var d=document.createElement("template");d.innerHTML="";xjb=d}d=xjb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);yjb=a}a=yjb;return a}}}); var S2=R2;w([P(W.YtRendererBehavior),x("design:type",Object)],S2.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],S2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],S2.prototype,"data",void 0);S2=w([U({is:"ytd-page-continuation"})],S2);var zjb;var Ajb;var T2=function(){var a=O.apply(this,arguments)||this;a.selected=0;return a}; p(T2,O);T2.prototype.dataChanged=function(){this.selected=0}; h.Object.defineProperties(T2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ajb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zjb){var d=document.createElement("template");d.innerHTML="";zjb=d}d=zjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); Ajb=a}a=Ajb;return a}}}); var U2=T2;U2.prototype.dataChanged=U2.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],U2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],U2.prototype,"data",void 0);w([R(),x("design:type",Object)],U2.prototype,"selected",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],U2.prototype,"dataChanged",null);U2=w([U({is:"ytd-artist-watch-card-renderer"})],U2);var Bjb;var Cjb;var Djb=function(){return O.apply(this,arguments)||this}; p(Djb,O); h.Object.defineProperties(Djb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cjb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bjb){var d=document.createElement("template");d.innerHTML=""; Bjb=d}d=Bjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cjb=a}a=Cjb;return a}}}); var V2=Djb;w([P(W.YtRendererBehavior),x("design:type",Object)],V2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],V2.prototype,"data",void 0);V2=w([U({is:"ytd-watch-card-album-list-renderer"})],V2);var Ejb;var Fjb;var W2=function(){return O.apply(this,arguments)||this}; p(W2,O);W2.prototype.onLeftThumbnailChanged=function(){this.data&&this.data.leftThumbnail&&(this.sectionLeft.style.backgroundImage="url("+MO(this.data.leftThumbnail.thumbnails,216)+")")}; h.Object.defineProperties(W2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Fjb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ejb){var d=document.createElement("template");d.innerHTML=""; Ejb=d}d=Ejb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fjb=a}a=Fjb;return a}}}); var X2=W2;X2.prototype.onLeftThumbnailChanged=X2.prototype.onLeftThumbnailChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],X2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],X2.prototype,"data",void 0);w([AE("#section-left"),x("design:type",HTMLElement)],X2.prototype,"sectionLeft",void 0);w([yE("data.leftThumbnail"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X2.prototype,"onLeftThumbnailChanged",null); X2=w([U({is:"ytd-watch-card-collage-renderer"})],X2);var Gjb;var Hjb;var Y2=function(){var a=O.apply(this,arguments)||this;a.crop=!1;return a}; p(Y2,O);Y2.prototype.computeStyle=function(a){if(a&&(a=LO(a.thumbnails,385)))return dc({"background-image":a})}; h.Object.defineProperties(Y2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hjb){var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n \n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gjb){var d=document.createElement("template");d.innerHTML=""; Gjb=d}d=Gjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hjb=a}a=Hjb;return a}}}); var Z2=Y2;w([P(W.YtRendererBehavior),x("design:type",Object)],Z2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],Z2.prototype,"data",void 0);w([R(),x("design:type",Object)],Z2.prototype,"crop",void 0);Z2=w([U({is:"ytd-watch-card-single-image-renderer"})],Z2);var Ijb;var Jjb;var Kjb=function(){return O.apply(this,arguments)||this}; p(Kjb,O); h.Object.defineProperties(Kjb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jjb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ijb){var d=document.createElement("template");d.innerHTML=""; Ijb=d}d=Ijb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jjb=a}a=Jjb;return a}}}); var $2=Kjb;w([P(W.YtRendererBehavior),x("design:type",Object)],$2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],$2.prototype,"data",void 0);$2=w([U({is:"ytd-watch-card-video-list-renderer"})],$2);var Ljb;var Mjb;var a3=function(){var a=O.apply(this,arguments)||this;a.badges=null;a.standaloneBadge=null;a.selected=0;a.crop=!1;return a}; p(a3,O);a3.prototype.shouldScrollTabs_=function(a){return 2

"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ljb){var d=document.createElement("template");d.innerHTML=""; Ljb=d}d=Ljb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mjb=a}a=Mjb;return a}}}); var b3=a3;w([P(W.YtRendererBehavior),x("design:type",Object)],b3.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],b3.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],b3.prototype,"titleText",void 0);w([R(),x("design:type",Object)],b3.prototype,"navigationEndpoint",void 0);w([R(),x("design:type",Object)],b3.prototype,"labels",void 0);w([R(),x("design:type",Object)],b3.prototype,"badges",void 0); w([R(),x("design:type",Object)],b3.prototype,"standaloneBadge",void 0);w([R(),x("design:type",Object)],b3.prototype,"callToAction",void 0);w([R(),x("design:type",Object)],b3.prototype,"lists",void 0);w([R(),x("design:type",Object)],b3.prototype,"relatedData",void 0);w([R(),x("design:type",Object)],b3.prototype,"selected",void 0);w([R(),x("design:type",Boolean)],b3.prototype,"crop",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],b3.prototype,"headerStyle",void 0); b3=w([U({is:"ytd-generic-watch-card"})],b3);var Njb;var Ojb;var Pjb=function(){return O.apply(this,arguments)||this}; p(Pjb,O); h.Object.defineProperties(Pjb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ojb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Njb){var d=document.createElement("template");d.innerHTML="";Njb=d}d=Njb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ojb=a}a=Ojb;return a}}}); var c3=Pjb;w([P(W.YtRendererBehavior),x("design:type",Object)],c3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],c3.prototype,"data",void 0);c3=w([U({is:"ytd-show-watch-card-renderer"})],c3);var Qjb;var Rjb;var d3=function(){return O.apply(this,arguments)||this}; p(d3,O); d3.prototype.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{watchCardRichHeaderRenderer:{component:"ytd-watch-card-rich-header-renderer",noInjection:!0}}},"data.callToAction":{id:"hero",mapping:{watchCardHeroVideoRenderer:{component:"ytd-watch-card-hero-video-renderer",noInjection:!0},watchCardHeroOneVsOneEventRenderer:{component:"ytd-watch-card-hero-one-vs-one-event-renderer",noInjection:!0}}},"data.sections":{id:"sections",mapping:{watchCardSectionDropdownRenderer:{component:"ytd-watch-card-section-dropdown-renderer",noInjection:!0}, watchCardSectionSequenceRenderer:{component:"ytd-watch-card-section-sequence-renderer",noInjection:!0}}}}}; h.Object.defineProperties(d3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rjb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qjb){var d=document.createElement("template");d.innerHTML="";Qjb=d}d= Qjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rjb=a}a=Rjb;return a}}}); var e3=d3;w([P(Y),x("design:type",Object)],e3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],e3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],e3.prototype,"data",void 0);e3=w([U({is:"ytd-universal-watch-card-renderer"})],e3);var Sjb;var Tjb;var Ujb=function(){return O.apply(this,arguments)||this}; p(Ujb,O); h.Object.defineProperties(Ujb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tjb){var a=document.createElement("template");a.innerHTML="\n\n\n
\n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Sjb){var d=document.createElement("template");d.innerHTML=""; Sjb=d}d=Sjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tjb=a}a=Tjb;return a}}}); var f3=Ujb;w([P(W.YtRendererBehavior),x("design:type",Object)],f3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],f3.prototype,"data",void 0);f3=w([U({is:"ytd-watch-card-hero-one-vs-one-event-renderer"})],f3);var Vjb;var Wjb;var Xjb=function(){return O.apply(this,arguments)||this}; p(Xjb,O); h.Object.defineProperties(Xjb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wjb){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.homeName)]]\n [[getSimpleString(data.homeParticipantResult)]]\n
\n
\n [[getSimpleString(data.awayName)]]\n [[getSimpleString(data.awayParticipantResult)]]\n
\n
[[getSimpleString(data.eventDescription)]]
\n
[[getSimpleString(data.additionalEventDescription)]]
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vjb){var d=document.createElement("template");d.innerHTML=""; Vjb=d}d=Vjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wjb=a}a=Wjb;return a}}}); var g3=Xjb;w([P(W.YtRendererBehavior),x("design:type",Object)],g3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],g3.prototype,"data",void 0);g3=w([U({is:"ytd-watch-card-one-vs-one-event"})],g3);var Yjb;var Zjb;var $jb=function(){return O.apply(this,arguments)||this}; p($jb,O); h.Object.defineProperties($jb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zjb){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Yjb){var d=document.createElement("template");d.innerHTML=""; Yjb=d}d=Yjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zjb=a}a=Zjb;return a}}}); var h3=$jb;w([P(W.YtRendererBehavior),x("design:type",Object)],h3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],h3.prototype,"data",void 0);h3=w([U({is:"ytd-banner-and-box-hero-image-renderer"})],h3);var akb;var bkb;var i3=function(){return O.apply(this,arguments)||this}; p(i3,O);h.Object.defineProperties(i3.prototype,{buttonColor:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?this.data.style.replace("CALL_TO_ACTION_BUTTON_RENDERER_STYLE_",""):"RED"}}}); h.Object.defineProperties(i3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bkb){var a=document.createElement("template");a.innerHTML="\n \n [[getSimpleString(data.label)]]\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===akb){var d=document.createElement("template");d.innerHTML=""; akb=d}d=akb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bkb=a}a=bkb;return a}}}); var j3=i3;w([P(W.YtRendererBehavior),x("design:type",Object)],j3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],j3.prototype,"data",void 0);w([R({type:String,reflectToAttribute:!0}),zE("data.style"),x("design:type",Object),x("design:paramtypes",[])],j3.prototype,"buttonColor",null);j3=w([U({is:"ytd-call-to-action-button-renderer"})],j3);var ckb;var dkb;var k3=function(){return O.apply(this,arguments)||this}; p(k3,O);k3.prototype.onLeftThumbnailChanged=function(){this.data&&this.data.leftThumbnail&&(this.$["section-left"].style.backgroundImage="url("+MO(this.data.leftThumbnail.thumbnails,216)+")")}; h.Object.defineProperties(k3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dkb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ckb){var d=document.createElement("template");d.innerHTML=""; ckb=d}d=ckb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dkb=a}a=dkb;return a}}}); var l3=k3;l3.prototype.onLeftThumbnailChanged=l3.prototype.onLeftThumbnailChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],l3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],l3.prototype,"data",void 0);w([yE("data.leftThumbnail"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],l3.prototype,"onLeftThumbnailChanged",null);l3=w([U({is:"ytd-collage-hero-image-renderer"})],l3);var ekb;var fkb;var m3=function(){return O.apply(this,arguments)||this}; p(m3,O);m3.prototype.computeStyle=function(a){return a}; h.Object.defineProperties(m3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fkb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ekb){var d=document.createElement("template");d.innerHTML=""; ekb=d}d=ekb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fkb=a}a=fkb;return a}}}); var n3=m3;w([P(W.YtRendererBehavior),x("design:type",Object)],n3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],n3.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),x("design:type",String)],n3.prototype,"componentStyle",void 0);n3=w([U({is:"ytd-single-hero-image-renderer"})],n3);var gkb;var hkb;var o3=function(){return O.apply(this,arguments)||this}; p(o3,O);e=o3.prototype; e.configureRendererStamper=function(){return{"data.heroImage":{id:"hero-image",mapping:{bannerAndBoxHeroImageRenderer:"ytd-banner-and-box-hero-image-renderer",singleHeroImageRenderer:"ytd-single-hero-image-renderer",collageHeroImageRenderer:"ytd-collage-hero-image-renderer"}},"data.callToActionButton":{id:"call-to-action-button",mapping:{callToActionButtonRenderer:"ytd-call-to-action-button-renderer"}},"data.reminderButton":{id:"reminder-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}}, "data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]",bottomPanel:"[[bottomSidePanel]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer", thumbnailOverlayToggleButtonRenderer:{component:"ytd-thumbnail-overlay-toggle-button-renderer",properties:{disableTooltips:"[[disableTooltips]]"}}},initialRenderPriority:N("defer_overlays")?0:void 0,waitForSignal:"eocs"}}}; e.computeSubtitle=function(a){if(this.data){var b;if(this.data.upcomingEventData){a=CL(a.subtitle);var c=Number(this.data.upcomingEventData.startTime);isNaN(c)||(b=zL(EJ(a,c)))}else b=a.subtitle;return b}}; e.onHeroTap=function(a){a.preventDefault();var b=this.data&&this.data.navigationEndpoint;b&&!RR(Polymer.dom(a).path||[],this,["YTD-TOGGLE-BUTTON-RENDERER"])&&this.fire("yt-navigate",{endpoint:b})}; e.computeHeroTabIndex=function(a){return a&&a.simpleText?-1:0}; e.computeHeroRole=function(a){return a&&a.simpleText?"":"link"}; e.computeIsReminderButtonPresent=function(a){return!(!a||!a.reminderButton)}; e.computeHideBottomItems=function(a){return!(this.computeIsReminderButtonPresent(a)||a.subtitle)}; h.Object.defineProperties(o3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hkb){var a=document.createElement("template");a.innerHTML="
\n \n
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gkb){var d=document.createElement("template");d.innerHTML=""; gkb=d}d=gkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hkb=a}a=hkb;return a}}}); var p3=o3;w([P(W.YtRendererBehavior),x("design:type",Object)],p3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],p3.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],p3.prototype,"data",void 0);w([R({computed:"computeSubtitle(data)"}),x("design:type",String)],p3.prototype,"subtitle",void 0);w([R({computed:"computeIsReminderButtonPresent(data)",reflectToAttribute:!0}),x("design:type",Boolean)],p3.prototype,"isReminderButtonPresent",void 0); w([R({computed:"computeHideBottomItems(data)",reflectToAttribute:!0}),x("design:type",Boolean)],p3.prototype,"hideBottomItems",void 0);p3=w([U({is:"ytd-watch-card-hero-video-renderer"})],p3);var ikb;var jkb;var q3=function(){return O.apply(this,arguments)||this}; p(q3,O);q3.prototype.configureRendererStamper=function(){return{"data.callToActionButton":{id:"call-to-action-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; q3.prototype.computeTitleBadges=function(a){return a?[a]:[]}; q3.prototype.computeHeaderStyle=function(a){return a?a.replace("WATCH_CARD_RICH_HEADER_RENDERER_STYLE_","").toLowerCase():""}; q3.prototype.computeAvatarHeight=function(a){return"WATCH_CARD_RICH_HEADER_RENDERER_STYLE_LEFT_AVATAR"===a?72:48}; h.Object.defineProperties(q3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jkb){var a=document.createElement("template");a.innerHTML="\n \n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ikb){var d=document.createElement("template");d.innerHTML=""; ikb=d}d=ikb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jkb=a}a=jkb;return a}}}); var r3=q3;w([P(W.YtRendererBehavior),x("design:type",Object)],r3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],r3.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],r3.prototype,"data",void 0);w([R({computed:"computeTitleBadges(data.titleBadge)"}),x("design:type",Array)],r3.prototype,"titleBadges",void 0);w([R({reflectToAttribute:!0,computed:"computeHeaderStyle(data.style)"}),x("design:type",String)],r3.prototype,"headerStyle",void 0); r3=w([U({is:"ytd-watch-card-rich-header-renderer"})],r3);var kkb;var lkb;var s3=function(){return O.apply(this,arguments)||this}; p(s3,O);s3.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{watchCardCompactVideoRenderer:{component:"ytd-watch-card-compact-video-renderer",noInjection:!0},watchCardOneVsOneEventCompactVideoRenderer:{component:"ytd-watch-card-one-vs-one-event-compact-video-renderer",noInjection:!0}}}}}; h.Object.defineProperties(s3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lkb){var a=document.createElement("template");a.innerHTML="
\n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kkb){var d=document.createElement("template");d.innerHTML=""; kkb=d}d=kkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lkb=a}a=lkb;return a}}}); var t3=s3;w([P(Y),x("design:type",Object)],t3.prototype,"ytRendererStamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],t3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],t3.prototype,"data",void 0);t3=w([U({is:"ytd-vertical-watch-card-list-renderer"})],t3);var mkb;var nkb;var u3=function(){return O.apply(this,arguments)||this}; p(u3,O);u3.prototype.onMetadataTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!RR(Polymer.dom(a).path,this,["A".toString()])&&this.fire("yt-navigate",{endpoint:b})}; h.Object.defineProperties(u3.prototype,{isCondensed:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?"WATCH_CARD_COMPACT_VIDEO_RENDERER_STYLE_CONDENSED"===this.data.style:!1}}, subtitle:{configurable:!0,enumerable:!0,get:function(){if(this.data){var a;if(this.data.upcomingEventData){var b=CL(this.data.subtitle),c=Number(this.data.upcomingEventData.startTime);isNaN(c)||(a=zL(EJ(b,c)))}else a=this.data.subtitle;return a}}}}); h.Object.defineProperties(u3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nkb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mkb){var d=document.createElement("template");d.innerHTML=""; mkb=d}d=mkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nkb=a}a=nkb;return a}}}); var v3=u3;w([P(W.YtRendererBehavior),x("design:type",Object)],v3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],v3.prototype,"data",void 0);w([R({reflectToAttribute:!0}),zE("data.style"),x("design:type",Boolean),x("design:paramtypes",[])],v3.prototype,"isCondensed",null);w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Object),x("design:paramtypes",[])],v3.prototype,"subtitle",null);v3=w([U({is:"ytd-watch-card-compact-video-renderer"})],v3);var okb;var pkb;var qkb=function(){return O.apply(this,arguments)||this}; p(qkb,O); h.Object.defineProperties(qkb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pkb){var a=document.createElement("template");a.innerHTML="\n\n \n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===okb){var d=document.createElement("template");d.innerHTML=""; okb=d}d=okb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);pkb=a}a=pkb;return a}}}); var w3=qkb;w([P(W.YtRendererBehavior),x("design:type",Object)],w3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],w3.prototype,"data",void 0);w3=w([U({is:"ytd-watch-card-one-vs-one-event-compact-video-renderer"})],w3);var rkb;var skb;var x3=function(){return O.apply(this,arguments)||this}; p(x3,O);e=x3.prototype;e.configureRendererStamper=function(){return{"data.lists":{id:"lists",mapping:{verticalWatchCardListRenderer:"ytd-vertical-watch-card-list-renderer"}}}}; e.dataChanged=function(a){this.currentSeasonIndex=a&&a.dropdownDefaultSelectedIndex||0;this.lists.select(this.currentSeasonIndex);this.label=this.getUppercaseSimpleString(a.dropdownTitles[this.currentSeasonIndex])}; e.computeEpisodesInfo=function(a,b,c){if(void 0!==a&&b.length===a.length)return a[c]}; e.onSeasonSelect=function(){this.ytRendererBehavior.markDirty()}; e.currentSeasonIndexChanged=function(){this.data&&this.data.dropdownTitles&&(this.label=this.getUppercaseSimpleString(this.data.dropdownTitles[this.currentSeasonIndex]))}; e.onLabelClick=function(){this.ariaExpanded="true"}; e.onIronOverlayClosed=function(){this.ariaExpanded="false"}; e.getUppercaseSimpleString=function(a){return this.ytRendererBehavior.getSimpleString(a).toUpperCase()}; h.Object.defineProperties(x3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===skb){var a=document.createElement("template");a.innerHTML="
\n \n \n
[[label]]
\n \n \n
\n \n \n \n
\n \n \n \n
\n\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rkb){var d=document.createElement("template");d.innerHTML=""; rkb=d}d=rkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);skb=a}a=skb;return a}}}); var y3=x3;y3.prototype.onIronOverlayClosed=y3.prototype.onIronOverlayClosed;w([P(W.YtRendererBehavior),x("design:type",Object)],y3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],y3.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],y3.prototype,"data",void 0);w([R(),x("design:type",String)],y3.prototype,"label",void 0); w([R({observer:"currentSeasonIndexChanged",value:0}),x("design:type",Number)],y3.prototype,"currentSeasonIndex",void 0);w([R({computed:"computeEpisodesInfo(data.dropdownSubtitles,data.dropdownTitles,currentSeasonIndex)"}),x("design:type",Object)],y3.prototype,"episodesInfo",void 0);w([R({value:"false"}),x("design:type",String)],y3.prototype,"ariaExpanded",void 0);w([AE("#lists"),x("design:type",Object)],y3.prototype,"lists",void 0); w([S("iron-overlay-closed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],y3.prototype,"onIronOverlayClosed",null);y3=w([U({is:"ytd-watch-card-section-dropdown-renderer"})],y3);var tkb;var ukb;var z3=function(){return O.apply(this,arguments)||this}; p(z3,O);z3.prototype.configureRendererStamper=function(){return{"data.lists":{id:"lists",mapping:{verticalWatchCardListRenderer:{component:"ytd-vertical-watch-card-list-renderer",noInjection:!0},horizontalCardListRenderer:{component:"ytd-horizontal-card-list-renderer",noInjection:!0}}}}}; h.Object.defineProperties(z3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ukb){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tkb){var d=document.createElement("template");d.innerHTML=""; tkb=d}d=tkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ukb=a}a=ukb;return a}}}); var A3=z3;w([P(Y),x("design:type",Object)],A3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],A3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],A3.prototype,"data",void 0);A3=w([U({is:"ytd-watch-card-section-sequence-renderer"})],A3);var vkb;var wkb;var xkb=function(){return O.apply(this,arguments)||this}; p(xkb,O); h.Object.defineProperties(xkb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wkb){var a=document.createElement("template");a.innerHTML="\n \n \n \n\n
\n \n
\n \n
\n
\n\n \n \n \n \n \n \n \n \n \n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vkb){var d=document.createElement("template");d.innerHTML=""; vkb=d}d=vkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wkb=a}a=wkb;return a}}}); var B3=xkb;w([P(W.YtRendererBehavior),x("design:type",Object)],B3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],B3.prototype,"data",void 0);B3=w([U({is:"ytd-video-game-watch-card-renderer"})],B3);var ykb;var zkb;var C3=function(){return O.apply(this,arguments)||this}; p(C3,O);C3.prototype.createArray=function(a){return a?[a]:null}; h.Object.defineProperties(C3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zkb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ykb){var d=document.createElement("template");d.innerHTML="";ykb=d}d=ykb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); zkb=a}a=zkb;return a}}}); var D3=C3;w([P(W.YtRendererBehavior),x("design:type",Object)],D3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],D3.prototype,"data",void 0);D3=w([U({is:"ytd-watch-card-renderer"})],D3);var Akb;var Bkb;var E3=function(){return O.apply(this,arguments)||this}; p(E3,O);E3.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{artistWatchCardRenderer:"ytd-artist-watch-card-renderer",watchCardRenderer:"ytd-watch-card-renderer",showWatchCardRenderer:"ytd-show-watch-card-renderer",videoGameWatchCardRenderer:"ytd-video-game-watch-card-renderer",universalWatchCardRenderer:"ytd-universal-watch-card-renderer"}}}}; E3.prototype.setCsi=function(){if(this.data&&this.data.contents){var a=this.configureRendererStamper()["data.contents"];if(a)for(var b=0;b
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Akb){var d=document.createElement("template");d.innerHTML=""; Akb=d}d=Akb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bkb=a}a=Bkb;return a}}}); var F3=E3;F3.prototype.setCsi=F3.prototype.setCsi;w([P(Y),x("design:type",Object)],F3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],F3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],F3.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],F3.prototype,"setCsi",null);F3=w([U({is:"ytd-secondary-search-container-renderer"})],F3);var Ckb;var Dkb;var G3=function(){var a=O.apply(this,arguments)||this;a.renderSecondarySearchContainer_=!1;a.isSearch=!1;a.isSearchDova=N("dova_on_search");return a}; p(G3,O);e=G3.prototype;e.configureRendererStamper=function(){return{"data.primaryContents":{id:"primary",mapping:{sectionListRenderer:{component:"ytd-section-list-renderer",properties:{isSearch:"[[isSearch]]",isSearchDova:"[[isSearchDova]]"}},richGridRenderer:{component:"ytd-rich-grid-renderer",properties:{isSearch:"[[isSearch]]"}}}},"data.continuations":{id:"continuations",mapping:{pageContinuationData:"ytd-page-continuation"}}}}; e.created=function(){this.boundStampSecondarySearchContainerIfFits_=this.stampSecondarySearchContainerIfFits_.bind(this);qd("REMAINING_DOVA_DEFERRED_CHUNKS",1)}; e.computeShowSecondaryColumn_=function(a,b){return!!(b&&b.secondaryContents&&a)}; e.activeChanged_=function(a){a&&!this.renderSecondarySearchContainer_?(this.listen(window,"resize","debounceStampSecondarySearchContainerIfFits_"),this.async(this.debounceStampSecondarySearchContainerIfFits_.bind(this))):a||this.unlisten(window,"resize","debounceStampSecondarySearchContainerIfFits_")}; e.persistentGuideChanged_=function(){this.active&&!this.renderSecondarySearchContainer_&&this.debounceStampSecondarySearchContainerIfFits_()}; e.stampSecondarySearchContainerIfFits_=function(){!this.renderSecondarySearchContainer_&&1090<=window.innerWidth&&(this.renderSecondarySearchContainer_=!0)}; e.debounceStampSecondarySearchContainerIfFits_=function(){this.debounce("stampSecondarySearchContainerIfFits_",this.boundStampSecondarySearchContainerIfFits_)}; e.onRetrieveLocation_=function(a,b){b.locationRetrieved(location.pathname+location.search+"&pbj=1",void 0);a.stopPropagation()}; e.computeIsGridLayout=function(){var a,b;return!(null===(b=null===(a=this.data)||void 0===a?void 0:a.primaryContents)||void 0===b||!b.richGridRenderer)}; h.Object.defineProperties(G3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Dkb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ckb){var d=document.createElement("template");d.innerHTML=""; Ckb=d}d=Ckb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Dkb=a}a=Dkb;return a}}}); var H3=G3;H3.prototype.onRetrieveLocation_=H3.prototype.onRetrieveLocation_;H3.prototype.persistentGuideChanged_=H3.prototype.persistentGuideChanged_;w([P(Y),x("design:type",Object)],H3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],H3.prototype,"ytRendererBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],H3.prototype,"ytdGuideStateAwareBehavior",void 0); w([R({observer:"activeChanged_"}),x("design:type",Boolean)],H3.prototype,"active",void 0);w([R(),x("design:type",Object)],H3.prototype,"data",void 0);w([R(),x("design:type",Object)],H3.prototype,"renderSecondarySearchContainer_",void 0);w([R({computed:"computeShowSecondaryColumn_(renderSecondarySearchContainer_, data)"}),x("design:type",Boolean)],H3.prototype,"showSecondaryColumn_",void 0);w([R(),x("design:type",Object)],H3.prototype,"isSearch",void 0); w([R(),x("design:type",Object)],H3.prototype,"isSearchDova",void 0);w([R({reflectToAttribute:!0,value:N("desktop_search_prominent_thumbs")}),x("design:type",Boolean)],H3.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:fk("desktop_search_prominent_thumbs_style")}),x("design:type",Boolean)],H3.prototype,"prominentThumbStyle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],H3.prototype,"centerResults",void 0); w([R({reflectToAttribute:!0,computed:"computeIsGridLayout(data)"}),x("design:type",Boolean)],H3.prototype,"isGridLayout",void 0);w([yE("guidePersistentAndVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H3.prototype,"persistentGuideChanged_",null);w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],H3.prototype,"onRetrieveLocation_",null); H3=w([U({is:"ytd-two-column-search-results-renderer"})],H3);var Ekb;var Fkb;Polymer({is:"ytd-watch-fixie",_template:function(){if(void 0!==Fkb)return Fkb;var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n\n
\n\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n
\n \n \n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n\n\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ekb){var d=document.createElement("template");d.innerHTML=""; Ekb=d}d=Ekb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Fkb=a}, behaviors:[f2a.YtdWatchBehavior],properties:{secondarySectionExpanded_:{type:Boolean,reflectToAttribute:!0},metadataExpanded_:{type:Boolean,reflectToAttribute:!0}},listeners:{"yt-metadata-expanded":"onYtMetadataExpanded_","yt-comments-loaded":"onYtCommentsLoaded_"},created:function(){this.waitingForTransitionEnd_=!1;this.animatePeekingCommentJob_=this.updateCommentsHeaderVisibilityJob_=0;this.pageDisposeJobs=this.pageDisposeJobs||[];this.pageDisposeJobs.push(this.resetFixieState_.bind(this))}, ready:function(){this.listen(this.$["secondary-scroll"],"scroll","onColumnScroll_");this.listen(this.$.comments,"scroll","onColumnScroll_")}, attached:function(){return Ya(this,function b(){var c=this,d,f;return ya(b,function(g){if(1==g.nextAddress)return d=$M(c),q(g,d.getPlayerPromise(),2);f=g.yieldResult;f.setUseFastSizingOnWatch(!1);oa(g)})})}, detached:function(){this.waitingForTransitionEnd_&&(this.unlisten(this.$["comments-container"],"transitionend","onCommentsContainerTransitionEnd_"),this.waitingForTransitionEnd_=!1)}, onColumnScroll_:function(a){this.markDirty();Polymer.dom(a).rootTarget!=this.$["secondary-scroll"]||this.updateCommentsHeaderVisibilityJob_||(this.updateCommentsHeaderVisibilityJob_=yk(Bk,this.updateCommentsHeaderVisibility_.bind(this)))}, updateCommentsHeaderVisibility_:function(){this.updateCommentsHeaderVisibilityJob_=0;var a=this.$["secondary-scroll"];this.toggleClass("hidden",a.scrollTop+a.offsetHeight>this.$.comments.offsetTop,this.$["comments-header"])}, onCommentsExpandTap_:function(){var a=this,b=this.$["comments-container"];this.secondarySectionExpanded_?(this.listen(b,"transitionend","onCommentsContainerTransitionEnd_"),b.classList.remove("expanded"),this.$["comments-header-icon"].icon="yt-icons:collapse"):(b.classList.add("detached"),Ak(Bk,function(){b.classList.add("animate");b.classList.add("expanded");a.$["comments-header-icon"].icon="yt-icons:expand";a.markDirty()})); this.secondarySectionExpanded_=!this.secondarySectionExpanded_}, onCommentsContainerTransitionEnd_:function(a){var b=this.$["comments-container"];Polymer.dom(a).rootTarget==b&&(this.unlisten(b,"transitionend","onCommentsContainerTransitionEnd_"),this.waitingForTransitionEnd_=!1,b.classList.remove("animate"),b.classList.remove("detached"))}, onYtMetadataExpanded_:function(a){this.metadataExpanded_=a.detail;this.schedulePlayerSizeUpdate_()}, resetFixieState_:function(){this.$["meta-contents"].firstChild.collapse();if(this.secondarySectionExpanded_)this.onCommentsExpandTap_();Bk.cancelJob(this.animatePeekingCommentJob_);this.peekingCommentData_=void 0;this.$["peeking-comment"].hidden=!0;this.$["comments-header"].classList.remove("animate");this.$["comments-header"].classList.add("no-peeking");this.updateStyles({"--ytd-watch-fixie-peeking-comment-height":"0px"})}, onYtCommentsLoaded_:function(){var a=this;this.notifyPath("comments.header.commentsHeaderRenderer.commentsCount");if(N("kevlar_fixie_watch_peeking_comments")){var b=this.get("data.contents.0.commentThreadRenderer.comment.commentRenderer",this.$.comments);b&&(this.peekingCommentData_=b,this.$["peeking-comment"].hidden=!1,this.updateStyles({"--ytd-watch-fixie-peeking-comment-height":this.$["peeking-comment"].offsetHeight+"px"}),this.animatePeekingCommentJob_=yk(Bk,function(){a.$["comments-header"].classList.add("animate"); a.$["comments-header"].classList.remove("no-peeking");a.animatePeekingCommentJob_=0}))}}});var Gkb;var Hkb;var I3=function(){var a=O.apply(this,arguments)||this;a.isTwoColumns=!0;a.fixie_=N("kevlar_fixie_watch_layout");a.playerMoveAutonavToggle_=N("web_player_move_autonav_toggle");a.watchFeedBigThumbs_=N("kevlar_watch_feed_big_thumbs");a.nextContinuation={continuationType:"watchNextSecondaryResultsContinuation",contentsArray:"data.results",continuationsArray:"data.continuations",responseContentsKey:"results",requestPath:"/related_ajax"};return a}; p(I3,O);e=I3.prototype; e.configureRendererStamper=function(){return{"data.offerModule":{id:"offer-module",mapping:{movieOfferModuleRenderer:"ytd-movie-offer-module-renderer",episodeOfferModuleRenderer:"ytd-movie-offer-module-renderer",liveOfferModuleRenderer:"ytd-movie-offer-module-renderer",channelOfferModuleRenderer:"ytd-movie-offer-module-renderer",unlimitedOfferModuleRenderer:{component:"ytd-unlimited-offer-module-renderer",properties:{hidden:"[[hideUnlimitedOfferModule_]]"}},queueToPlayRenderer:"ytd-queue-to-play-renderer",queueToPlayStateRenderer:"ytd-queue-to-play-state-renderer", recognitionShelfRenderer:"ytd-recognition-shelf-renderer"}},shownItems:{id:"items",mapping:{compactAutoplayRenderer:{component:"ytd-compact-autoplay-renderer",properties:{isTwoColumns:"[[isTwoColumns]]",maskAsVideo:"[[hideAutoplay]]"}},compactMovieRenderer:"ytd-compact-movie-renderer",compactVideoRenderer:"ytd-compact-video-renderer",compactPromotedVideoRenderer:"ytd-compact-promoted-video-renderer",compactRadioRenderer:"ytd-compact-radio-renderer",compactPlaylistRenderer:"ytd-compact-playlist-renderer", promotedSparklesWebRenderer:"ytd-promoted-sparkles-web-renderer",relatedChipCloudRenderer:"yt-related-chip-cloud-renderer",itemSectionRenderer:{component:"ytd-item-section-renderer",properties:{continuationShowButton:"[[showButton_]]"}},continuationItemRenderer:{component:"ytd-continuation-item-renderer",properties:{showButton:"[[showButton_]]"}}}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]"}}},renderPriority:0}}}; e.getItemsPath=function(){return"data.results"}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"results","yt-reload-continuation-items-command-body":"results"}}; e.created=function(){ue&&N("polymer2_aggressive_batching")?(this.ytLazyListBehavior.initialCount=12,this.ytLazyListBehavior.minChunkSize=8):this.ytLazyListBehavior.initialCount=1}; e.ready=function(){var a;N("kevlar_watch_skeleton")&&(a={"--yt-img-shadow-placeholder-color":"var(--yt-spec-10-percent-layer)","--yt-img-shadow-min-height":"100%","--yt-img-shadow-min-width":"100%"});a&&this.updateStyles(a)}; e.resultsChanged_=function(){if(this.data&&this.data.results){for(var a=this.data.results,b=null,c=null,d=0;d
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gkb){var d=document.createElement("template");d.innerHTML=""; Gkb=d}d=Gkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hkb=a}a=Hkb;return a}}}); var J3=I3;J3.prototype.resultsChanged_=J3.prototype.resultsChanged_;w([P(W.YtRendererBehavior),x("design:type",Object)],J3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],J3.prototype,"ytRendererstamperBehavior",void 0);w([P(MQ),x("design:type",Object)],J3.prototype,"ytLazyListBehavior",void 0);w([P(SQ),x("design:type",Object)],J3.prototype,"ytNextContinuationBehavior",void 0);w([P(FU),x("design:type",Object)],J3.prototype,"ytContinuationHandlerBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],J3.prototype,"data",void 0);w([R(),x("design:type",Object)],J3.prototype,"playerData",void 0);w([R({value:!0}),x("design:type",Boolean)],J3.prototype,"autoFill",void 0);w([R({value:60}),x("design:type",Number)],J3.prototype,"targetFramerate",void 0);w([R({observer:"autoplayPropertyChanged_",reflectToAttribute:!0}),x("design:type",Boolean)],J3.prototype,"hideAutoplay",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],J3.prototype,"autonavDisabled",void 0);w([R({observer:"autoplayPropertyChanged_",reflectToAttribute:!0}),x("design:type",Object)],J3.prototype,"isTwoColumns",void 0);w([R({notify:!0}),x("design:type",Object)],J3.prototype,"shownItems",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],J3.prototype,"fixie_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],J3.prototype,"playerMoveAutonavToggle_",void 0); w([R({computed:"computeHideUnlimitedOfferModule_(data, playerData)",observer:"hideUnlimitedOfferModuleChanged_"}),x("design:type",Boolean)],J3.prototype,"hideUnlimitedOfferModule_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],J3.prototype,"watchFeedBigThumbs_",void 0);w([R({value:!1}),x("design:type",Boolean)],J3.prototype,"showMoreButton",void 0); w([R({computed:"computeShowButton_(showMoreButton, data.results)",observer:"showButtonChanged_"}),x("design:type",Boolean)],J3.prototype,"showButton_",void 0);w([yE("data.results.*"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],J3.prototype,"resultsChanged_",null);J3=w([U({is:"ytd-watch-next-secondary-results-renderer"})],J3);var Ikb;var Jkb;var K3=function(){var a=O.apply(this,arguments)||this;a.fixedOrder=!1;a.numberOfVisibleAvatars=1;a.hasCta=!1;a.rowAvatarSize=32;return a}; p(K3,O);e=K3.prototype;e.updateNumberOfVisibleAvatars_=function(){var a=this.offsetWidth;a&&(a=Math.floor((a-32)/(this.rowAvatarSize+4)),this.numberOfVisibleAvatars!=a&&(this.numberOfVisibleAvatars=a,this.updateAvatars_()))}; e.attached=function(){var a=this;window.requestAnimationFrame(function(){a.updateNumberOfVisibleAvatars_()})}; e.dataChanged_=function(){this.updateAvatars_()}; e.updateAvatars_=function(){if(this.data&&this.data.avatars){var a=this.data.fixedAvatar?this.numberOfVisibleAvatars-1:this.numberOfVisibleAvatars;this.firstVisibleAvatarsList=this.getVisibleAvatarsList(this.data.avatars,a,0,Math.floor(this.data.avatars.length/2));this.secondVisibleAvatarsList=this.getVisibleAvatarsList(this.data.avatars,a,Math.floor(this.data.avatars.length/2),this.data.avatars.length);this.data.fixedAvatar||(this.ctaAvatars=this.getVisibleAvatarsList(this.data.avatars,12,0,this.data.avatars.length)); this.hasCta=!this.data.fixedAvatar}}; e.getVisibleAvatarsList=function(a,b,c,d){if(b>=a.length)b=a;else if(this.fixedOrder)b=a.slice(c,c+b);else{a=[].concat(fa(a.slice(c,d)));c=Math.random;for(d=a.length-1;0
\n
\n
\n [[getSimpleString(data.rowTitle)]]\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ikb){var d=document.createElement("template");d.innerHTML=""; Ikb=d}d=Ikb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jkb=a}a=Jkb;return a}}}); var L3=K3;L3.prototype.updateNumberOfVisibleAvatars_=L3.prototype.updateNumberOfVisibleAvatars_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],L3.prototype,"ironResizableBehavior",void 0);w([P(Y),x("design:type",Object)],L3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],L3.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],L3.prototype,"data",void 0); w([R(),x("design:type",Object)],L3.prototype,"fixedOrder",void 0);w([R(),x("design:type",Object)],L3.prototype,"numberOfVisibleAvatars",void 0);w([R(),x("design:type",Object)],L3.prototype,"firstVisibleAvatarsList",void 0);w([R(),x("design:type",Object)],L3.prototype,"secondVisibleAvatarsList",void 0);w([R(),x("design:type",Object)],L3.prototype,"ctaAvatars",void 0);w([R({computed:"computeCtaAvatarUrls_(ctaAvatars)"}),x("design:type",Object)],L3.prototype,"ctaAvatarUrls",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],L3.prototype,"hasCta",void 0);w([R(),x("design:type",Object)],L3.prototype,"rowAvatarSize",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],L3.prototype,"updateNumberOfVisibleAvatars_",null);L3=w([U({is:"ytd-recognition-shelf-renderer"})],L3);var Kkb;var Lkb;var M3=function(){var a=O.apply(this,arguments)||this;a.stateData=-1;a.state="QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";a.isLoading=!0;a.startGameTimer=new Wi(1E3);a.expirationDurationMs=0;a.isQueueToPlayLoading=!1;a.actionMap={"yt-queue-to-play-command":"handleQueueToPlayCommand"};return a}; p(M3,O);e=M3.prototype;e.cloudcast=function(){var a=this,b=this.data&&this.data.clientJsUrl,c=this.data&&this.data.cloudcastEndpoint;b?c?this.loadClientJs(b).then(function(d){a.client=d.client.init(c,"",A("SESSION_INDEX"));a.client.startPollingQueueState(a.videoId,function(f,g){a.pollingResponseHandler(f,g)})}):Um(Error("Cloudcast endpoint was not provided")):Um(Error("Queue to play script URL was not provided"))}; e.pollingResponseHandler=function(a,b){this.client&&(this.stateData=void 0===b?-1:b,this.state=this.queueStateToRendererState(a,b),this.isLoading=!1,a===window.cloudcast.client.ClientQueueState.READY_TO_PLAY?this.startGameTimer.enabled||"number"!==typeof b||(this.expirationDurationMs=b,this.startGameTimer.start()):this.startGameTimer.stop(),a===window.cloudcast.client.ClientQueueState.CANNOT_JOIN&&this.client.stopPollingQueueState())}; e.loadClientJs=function(a){return new Promise(function(b,c){var d=!1;void 0!==window.cloudcast?b(window.cloudcast):(window.cloudcastLoaded=function(){d=!0;Ci(function(){b(window.cloudcast)})},kJ(a),setTimeout(function(){d||c("Reached timeout when loading queue to play library.")},5E3))})}; e.joinQueue=function(a){a.joinQueue(this.videoId).then(null,function(b){Um(new Pl("There was an unexpected error when attempting to join the queue",b))})}; e.leaveQueue=function(a){a.leaveQueue(this.videoId).then(null,function(b){Um(new Pl("There was an unexpected error when attempting to leave the queue",b))})}; e.launchGame=function(a){var b=this;a.playGame(this.videoId).then(function(c){zc(b.playerEndpoint+"/"+c)},function(c){Um(new Pl("There was an unexpected error when attempting to launch the game",c))})}; e.queueStateToRendererState=function(a,b){var c=window.cloudcast.client.ClientQueueState,d=window.cloudcast.client.ClientResolvableIssue;switch(a){case c.CANNOT_JOIN:return"QUEUE_TO_PLAY_RENDERER_STATE_CANNOT_JOIN";case c.ELIGIBLE:return"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE";case c.IN_QUEUE:return"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE";case c.READY_TO_PLAY:return"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY";case c.PLAYING:return"QUEUE_TO_PLAY_RENDERER_STATE_PLAYING";case c.RESOLVABLE_ISSUES:if(Array.isArray(b))switch(b[0]){case d.LOGIN_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_NOT_LOGGED_IN"; case d.ACCOUNT_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_NO_ACCOUNT";case d.PURCHASE_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_PURCHASE_REQUIRED";case d.SPONSORSHIP_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_SPONSORSHIP_REQUIRED";case d.PLAYABILITY_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_CHECK_PLAYABILITY";}return"QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";default:return"QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";}}; e.handleQueueToPlayCommand=function(){if(this.client)switch(this.isLoading=!0,this.state){case"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE":this.joinQueue(this.client);break;case"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE":this.leaveQueue(this.client);break;case"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY":this.launchGame(this.client);break;default:Um(new Pl("Unhandled button action",this.state));}else Um(Error("Client is not yet initialized, but there was an button triggered."))}; e.attached=function(){var a=this;this.startGameTimerListenerKey||(this.startGameTimerListenerKey=si(this.startGameTimer,"tick",function(){0>=a.expirationDurationMs?a.startGameTimer.stop():a.expirationDurationMs-=1E3}))}; e.detached=function(){this.client?(this.isLoading=!1,this.client.stopPollingQueueState(),this.startGameTimerListenerKey&&(this.startGameTimer.stop(),wi(this.startGameTimerListenerKey),this.startGameTimerListenerKey=null)):Um(Error("Client is not yet initialized, but there was detached."))}; e.fillStateRenderer=function(a,b){if(-1===b||Array.isArray(b))return a;a=y.unsafeClone(a);var c=this.getStateRendererButtonText(a),d=a.title,f=CL(c),g=CL(d);if("number"===typeof b)b=Math.floor(this.expirationDurationMs/1E3),c&&"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY"===a.state&&(delete c.runs,c.simpleText=f.replace("$time_left",String(b))),d&&(delete d.runs,d.simpleText=g.replace("$time_remaining",String(b)));else switch(a.state){case"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE":c&&(delete c.runs, c.simpleText=f.replace("$num_in_queue",""+b.length));break;case"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE":d&&(delete d.runs,d.simpleText=g.replace("$place_in_queue",""+b.position).replace("$num_in_queue",""+b.length));}return a}; e.getStateRendererButtonText=function(a){if(a.button&&a.button.buttonRenderer&&a.button.buttonRenderer.text)return a.button.buttonRenderer.text}; e.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; h.Object.defineProperties(M3.prototype,{videoId:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.videoId||""}}, playerEndpoint:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.playerEndpoint||""}}, stateRenderer:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.states)for(var a=k(this.data.states),b=a.next();!b.done;b=a.next())if(b=b.value,b.queueToPlayRendererStateRenderer&&b.queueToPlayRendererStateRenderer.state===this.state)return a=b.queueToPlayRendererStateRenderer,-1!==this.stateData?this.fillStateRenderer(a,this.stateData):a}}, button:{configurable:!0,enumerable:!0,get:function(){if(this.stateRenderer&&this.stateRenderer.button)return this.stateRenderer.button}}}); h.Object.defineProperties(M3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Lkb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
[[getSimpleString(data.title)]]
\n
\n
\n \n
\n
\n \n
\n \n
\n
\n
\n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Kkb){var d=document.createElement("template");d.innerHTML=""; Kkb=d}d=Kkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lkb=a}a=Lkb;return a}}}); var N3=M3;N3.prototype.cloudcast=N3.prototype.cloudcast;w([P(W.YtRendererBehavior),x("design:type",Object)],N3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],N3.prototype,"ytRendererstamperBehavior",void 0);w([P([NO.YtActionHandlerBehavior]),x("design:type",Object)],N3.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],N3.prototype,"data",void 0);w([R(),x("design:type",Object)],N3.prototype,"stateData",void 0); w([R(),x("design:type",String)],N3.prototype,"state",void 0);w([R(),x("design:type",Object)],N3.prototype,"isLoading",void 0);w([zE("data"),x("design:type",String),x("design:paramtypes",[])],N3.prototype,"videoId",null);w([zE("data"),x("design:type",String),x("design:paramtypes",[])],N3.prototype,"playerEndpoint",null);w([zE("data","state","stateData","expirationDurationMs"),x("design:type",Object),x("design:paramtypes",[])],N3.prototype,"stateRenderer",null); w([zE("stateRenderer"),x("design:type",Object),x("design:paramtypes",[])],N3.prototype,"button",null);w([yE("data.clientJsUrl","data.cloudcastEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],N3.prototype,"cloudcast",null);N3=w([U({is:"ytd-queue-to-play-renderer"})],N3);var Mkb;var Nkb;var O3=function(){var a=O.apply(this,arguments)||this;a.isLoading=!0;a.startGameTimer=new Wi(1E3);a.timeRemainingSeconds=0;a.isInitialPoll=!0;a.rateLimitedMultiplier=1;a.actionMap={"yt-queue-to-play-state-command":"handleQueueToPlayStateCommand","yt-focus-queue-to-play-state-renderer":"focusQueueToPlayStateRenderer"};return a}; p(O3,O);e=O3.prototype;e.attached=function(){var a=this;this.startGameTimerListenerKey||(this.startGameTimerListenerKey=si(this.startGameTimer,"tick",function(){--a.timeRemainingSeconds;if(0>=a.timeRemainingSeconds){a.startGameTimer.stop();var b=a.data.timeRemainingTimeoutCommand;b&&(a.pollingTimer&&(Yi(a.pollingTimer),a.pollingTimer=null),a.isLoading=!0,a.sendRetryableServiceRequestAction(b))}})); this.maybeGetAndSetPlayer()}; e.detached=function(){this.pollingTimer&&Yi(this.pollingTimer);this.startGameTimerListenerKey&&(this.startGameTimer.stop(),wi(this.startGameTimerListenerKey),this.startGameTimerListenerKey=null);this.tangoStopper&&this.tangoStopper.stop()}; e.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.ready=function(){this.$.button.addEventListener("tap",this.onButtonClick.bind(this))}; e.graftVE=function(a,b){var c=On();b=(void 0===b?null:b)||Nn();return a&&b&&c?(a=In(a),NJ(c,b,a),a):null}; e.initialPoll=function(){this.isInitialPoll&&(this.isInitialPoll=!1,this.poll(),this.data&&this.data.timeRemaining&&(this.timeRemainingSeconds=Number(this.data.timeRemaining.seconds)||0))}; e.poll=function(a){var b=this;a=void 0===a?!1:a;if(this.data){this.pollingTimer&&(Yi(this.pollingTimer),this.pollingTimer=null);var c=this.data.pollingCommand,d=this.get("queueToPlayCommand",c),f=0;!a&&this.data.pollingInterval&&(f=Number(this.data.pollingInterval)*this.rateLimitedMultiplier);c&&(this.pollingTimer=Xi(function(){d?b.handleQueueToPlayCommand(d):b.sendRetryableServiceRequestAction(c)},f))}}; e.handleQueueToPlayStateCommand=function(a){var b=this,c=this.get("queueToPlayStateCommand.renderer.queueToPlayStateRenderer",a);a=this.get("queueToPlayStateCommand.isRateLimited",a);var d=this.get("pollingCommand.queueToPlayCommand",c);if(d)this.isLoading=!1,this.handleQueueToPlayCommand(d),this.poll(!0);else if(a)this.data.pollingInterval=c.pollingInterval,this.rateLimitedMultiplier*=2,this.isLoading=!1,this.poll();else if(this.rateLimitedMultiplier=1,(a=this.get("button.buttonRenderer.navigationEndpoint.urlEndpoint", c))&&a.url&&(a.url=a.url.replace("/u/0/","/u/"+A("SESSION_INDEX")+"/")),c)a=this.graftVE(c.trackingParams),d=this.get("button.buttonRenderer.trackingParams",c),a&&d&&this.graftVE(d,a),this.timeRemainingSeconds=Number(this.get("timeRemaining.seconds",c))||0,this.timeRemainingSeconds?this.timeRemainingSeconds&&!this.startGameTimer.enabled&&(this.$.content.setAttribute("aria-live","off"),this.$.button.setAttribute("aria-live","off"),this.startGameTimer.start(),this.data=c):(this.$.content.setAttribute("aria-live", "live"),this.$.button.setAttribute("aria-live","live"),this.startGameTimer.stop(),this.data=c),this.pollingTimer&&(Yi(this.pollingTimer),this.pollingTimer=null),this.isLoading=!1,(c=c.queueInvalidationInfo)?(this.tangoClient||(a=JC.forProdEnv(c.channelName).withApiKey(c.apiKey),this.tangoClient=rza(a.build()),this.tangoStopper=this.tangoClient.start()),!this.tangoSubscription&&c.topicName&&(this.isInitialTangoSignal=!0,this.tangoSubscription=this.tangoClient.signalsFor(new CC(c.topicName,!1)).subscribe(function(f){if(b.isInitialTangoSignal|| !f.isSynthetic)b.isInitialTangoSignal=!1,b.debounce("crowdPlayInvalidation",function(){b.poll(!0)},2E3)},function(){b.debounce("crowdPlayInvalidation",function(){b.poll(!0)},2E3)}))):this.tangoSubscription&&(this.tangoSubscription.unsubscribe(),this.tangoSubscription=null),this.poll()}; e.onButtonClick=function(){this.buttonCommand&&(this.buttonCommand.queueToPlayCommand?this.handleQueueToPlayCommand(this.buttonCommand.queueToPlayCommand):(this.pollingTimer&&(Yi(this.pollingTimer),this.pollingTimer=null),this.outgoingStadiaRequest&&this.outgoingStadiaRequest.ajaxPromise&&(this.outgoingStadiaRequest.ajaxPromise.cancel(),this.outgoingStadiaRequest=null),this.isLoading=!0,this.sendRetryableServiceRequestAction(this.buttonCommand)))}; e.sendRetryableServiceRequestAction=function(a,b){var c=this;b=void 0===b?0:b;return 2<=b?(this.poll(!0),Mi(null)):Ti(this.actionSenderBehavior.sendServiceRequestAction([a]).then(function(d){if(!d.data.feedbackResponses[0].isProcessed)return c.sendRetryableServiceRequestAction(a,b+1)}),function(d){if(!(d instanceof Ui))return c.sendRetryableServiceRequestAction(a,b+1)})}; e.handleQueueToPlayCommand=function(a){a&&(a=this.get("queueToPlayUrl",a))&&(!N("stadia_crowdplay_disable_video_pause")&&this.player&&this.player.pauseVideo(),a=a.replace("/u/0/","/u/"+A("SESSION_INDEX")+"/"),zc(a))}; e.maybeGetAndSetPlayer=function(){var a=this,b=ZM(this);b&&b.getPlayerPromise().then(function(c){return a.player=c})}; e.onYtServiceRequestSent=function(a,b){this.data&&b.endpoint===this.data.pollingCommand&&(this.outgoingStadiaRequest=b)}; e.onYtServiceRequestCompleted=function(a,b){this.data&&b.endpoint===this.data.pollingCommand&&(this.outgoingStadiaRequest=null)}; e.focusQueueToPlayStateRenderer=function(){lk(this)}; h.Object.defineProperties(O3.prototype,{boxArtUrl:{configurable:!0,enumerable:!0,get:function(){var a=this.get("data.boxArt.thumbnails");if(a)return LO(a,125,void 0,"height")||void 0}}, sectionTitle:{configurable:!0,enumerable:!0,get:function(){if(!this.data||!this.data.sectionTitle)return"";var a=CL(this.data.sectionTitle);this.data.timeRemaining&&(a=a.replace("$time_remaining",String(this.timeRemainingSeconds)));return a}}, button:{configurable:!0,enumerable:!0,get:function(){if(!this.data||!this.data.button)return{};this.data.button.buttonRenderer&&this.data.button.buttonRenderer.command&&(this.data.button.buttonRenderer.command.signInEndpoint?this.buttonCommand=void 0:(this.buttonCommand=this.data.button.buttonRenderer.command,this.data.button.buttonRenderer.command=void 0));var a=y.unsafeClone(this.data.button);if(a.buttonRenderer&&a.buttonRenderer.text){var b=CL(a.buttonRenderer.text);delete a.buttonRenderer.text.runs; this.data.timeRemaining&&(b=b.replace("$time_left",String(this.timeRemainingSeconds)));a.buttonRenderer.text.simpleText=b}return a}}}); h.Object.defineProperties(O3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Nkb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
[[getSimpleString(data.title)]]
\n
\n
\n
\n \n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mkb){var d=document.createElement("template");d.innerHTML=""; Mkb=d}d=Mkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nkb=a}a=Nkb;return a}}}); var P3=O3;P3.prototype.onYtServiceRequestCompleted=P3.prototype.onYtServiceRequestCompleted;P3.prototype.onYtServiceRequestSent=P3.prototype.onYtServiceRequestSent;P3.prototype.initialPoll=P3.prototype.initialPoll;w([P(W.YtRendererBehavior),x("design:type",Object)],P3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],P3.prototype,"ytRendererstamperBehavior",void 0);w([P([NO.YtActionHandlerBehavior]),x("design:type",Object)],P3.prototype,"actionHandlerBehavior",void 0); w([P([V.YtActionSenderBehavior]),x("design:type",Object)],P3.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],P3.prototype,"data",void 0);w([R(),x("design:type",Object)],P3.prototype,"isLoading",void 0);w([R(),x("design:type",Object)],P3.prototype,"pollingTimer",void 0);w([R(),x("design:type",Object)],P3.prototype,"startGameTimer",void 0);w([R(),x("design:type",Object)],P3.prototype,"timeRemainingSeconds",void 0); w([R(),x("design:type",Object)],P3.prototype,"isInitialPoll",void 0);w([R(),x("design:type",Object)],P3.prototype,"outgoingStadiaRequest",void 0);w([zE("data.boxArt"),x("design:type",Object),x("design:paramtypes",[])],P3.prototype,"boxArtUrl",null);w([zE("data.sectionTitle","timeRemainingSeconds"),x("design:type",String),x("design:paramtypes",[])],P3.prototype,"sectionTitle",null); w([zE("data.button","timeRemainingSeconds"),x("design:type",Object),x("design:paramtypes",[])],P3.prototype,"button",null);w([yE("data.pollingCommand"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],P3.prototype,"initialPoll",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],P3.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],P3.prototype,"onYtServiceRequestCompleted",null);P3=w([U({is:"ytd-queue-to-play-state-renderer"})],P3);var Okb;var Pkb;var Q3,R3=function(){return O.apply(this,arguments)||this}; p(R3,O);R3.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; R3.prototype.onTap=function(){this.data&&this.data.navigationEndpoint&&this.data.adPlaybackContextParams&&OKa(this.data.navigationEndpoint,this.data.adPlaybackContextParams)}; R3.prototype.dataChanged=function(){this.data&&Tn(this.data.impressionUrls||[]);this.data&&this.data.activeView&&dQ(this.ytdActiveViewBehavior,this.data.activeView,16);this.set("data.adBadge",Q3.DEFAULT_AD_BADGE_RENDERER)}; h.Object.defineProperties(R3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Pkb){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Okb){var d=document.createElement("template");d.innerHTML=""; Okb=d}d=Okb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pkb=a}a=Pkb;return a}}}); var S3=Q3=R3;Q3.prototype.dataChanged=Q3.prototype.dataChanged;Q3.prototype.onTap=Q3.prototype.onTap;S3.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:mL("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Y),x("design:type",Object)],S3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],S3.prototype,"ytRendererBehavior",void 0);w([P(eQ),x("design:type",Object)],S3.prototype,"ytdActiveViewBehavior",void 0); w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],S3.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],S3.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],S3.prototype,"data",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S3.prototype,"onTap",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S3.prototype,"dataChanged",null);S3=Q3=w([U({is:"ytd-compact-promoted-video-renderer"})],S3);var Qkb;var Rkb;var T3,U3=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-mute-ad-action":"handleMuteAd"};return a}; p(U3,O);U3.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.mediaHoverOverlay":{id:"media-hover-overlay",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{verticallyAligned:!0}}}}}}; U3.prototype.dataChanged=function(){this.data&&this.data.impressionCommands&&(this.set("data.adBadge",T3.DEFAULT_AD_BADGE_RENDERER),this.toggleClass("variable-image-ratio",this.data.variableImageRatio),this.toggleClass("sparkles-light-cta",!0),this.data.activeView&&dQ(this.ytdActiveViewBehavior,this.data.activeView,16),this.data.impressionCommands.forEach(function(a){a=k(a.loggingUrls||[]);for(var b=a.next();!b.done;b=a.next())b=b.value,b.baseUrl&&Sn(b.baseUrl)}))}; U3.prototype.onTap=function(a){this.data&&this.data.navigationEndpoint&&(a.preventDefault(),this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}))}; U3.prototype.handleMuteAd=function(){this.collapsed=!0}; h.Object.defineProperties(U3.prototype,{hideHoverOverlay:{configurable:!0,enumerable:!0,get:function(){return!this.data||!this.data.mediaHoverOverlay}}}); h.Object.defineProperties(U3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rkb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n

\n [[getSimpleString(data.title)]]\n

\n
\n [[getSimpleString(data.description)]]\n
\n
\n \n \n
\n [[getSimpleString(data.websiteText)]]\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qkb){var d=document.createElement("template");d.innerHTML=""; Qkb=d}d=Qkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rkb=a}a=Rkb;return a}}}); var V3=T3=U3;T3.prototype.dataChanged=T3.prototype.dataChanged;V3.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:mL("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Y),x("design:type",Object)],V3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],V3.prototype,"ytRendererBehavior",void 0);w([P(eQ),x("design:type",Object)],V3.prototype,"ytdActiveViewBehavior",void 0); w([P([NO.YtActionHandlerBehavior]),x("design:type",Object)],V3.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],V3.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],V3.prototype,"collapsed",void 0);w([R({reflectToAttribute:!0}),zE("data.mediaHoverOverlay"),x("design:type",Boolean),x("design:paramtypes",[])],V3.prototype,"hideHoverOverlay",null); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],V3.prototype,"dataChanged",null);V3=T3=w([U({is:"ytd-promoted-sparkles-web-renderer"})],V3);var Skb;var Tkb;var W3=function(){return O.apply(this,arguments)||this}; p(W3,O);W3.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; h.Object.defineProperties(W3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tkb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]][[getSimpleString(data.subtitle)]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Skb){var d=document.createElement("template");d.innerHTML=""; Skb=d}d=Skb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tkb=a}a=Tkb;return a}}}); var X3=W3;w([P(W.YtRendererBehavior),x("design:type",Object)],X3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],X3.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],X3.prototype,"data",void 0);X3=w([U({is:"ytd-compact-tvfilm-entry-point-renderer"})],X3);var Ukb;var Vkb;var Y3=function(){var a=O.apply(this,arguments)||this;a.badges=[{textBadge:{label:zL("CC")}}];return a}; p(Y3,O);e=Y3.prototype;e.configureRendererStamper=function(){return{"data.storefrontEntryPoint":{id:"storefront-entry-point",mapping:{compactTvfilmEntryPointRenderer:"ytd-compact-tvfilm-entry-point-renderer"}}}}; e.dataChanged=function(){var a=this.get("data.offerButton.buttonRenderer.serviceEndpoint");a&&a.commandMetadata&&a.commandMetadata.webHandleServiceEndpointExtension&&a.commandMetadata.webHandleServiceEndpointExtension.fireAutomatically?this.actionSenderBehavior.sendServiceRequestAction([a]):a&&a.webHandleServiceEndpointExtension&&a.webHandleServiceEndpointExtension.fireAutomatically&&this.actionSenderBehavior.sendServiceRequestAction([a])}; e.isEmptyContent=function(a){return this.isStorefrontEntryPointEmpty(a)&&this.shouldHideOfferModule(a)}; e.isStorefrontEntryPointEmpty=function(a){return!a||!a.storefrontEntryPoint}; e.shouldHideOfferModule=function(a){return!!a.hideVideoDetails}; e.isOfferModuleNavigationInactive=function(a){return!a.navigationEndpoint&&!a.serviceEndpoint}; e.maybeNavigateWithServiceEndpoint=function(){this.data&&this.data.navigationEndpoint||this.data&&this.data.serviceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])}; h.Object.defineProperties(Y3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vkb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ukb){var d=document.createElement("template");d.innerHTML=""; Ukb=d}d=Ukb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vkb=a}a=Vkb;return a}}}); var Z3=Y3;w([P(W.YtRendererBehavior),x("design:type",Object)],Z3.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],Z3.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],Z3.prototype,"actionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],Z3.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"isEmptyContent(data)"}),x("design:type",Boolean)],Z3.prototype,"hidden",void 0); w([R(),x("design:type",Object)],Z3.prototype,"badges",void 0);Z3=w([U({is:"ytd-movie-offer-module-renderer"})],Z3);var Wkb;var Xkb;var Ykb=function(){return O.apply(this,arguments)||this}; p(Ykb,O); h.Object.defineProperties(Ykb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xkb){var a=document.createElement("template");a.innerHTML="\n\n-\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wkb){var d=document.createElement("template");d.innerHTML=""; Wkb=d}d=Wkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xkb=a}a=Xkb;return a}}}); var $3=Ykb;w([P(W.YtRendererBehavior),x("design:type",Object)],$3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],$3.prototype,"data",void 0);$3=w([U({is:"ytd-offer-review-renderer"})],$3);var Zkb;var $kb;var a4=function(){return O.apply(this,arguments)||this}; p(a4,O);a4.prototype.ready=function(){this.initializeDefs_()}; a4.prototype.initializeDefs_=function(){var a=this.meta_.byKey("yt-icons"),b=a.$$("#star"),c=a.$$("#star_half");a=a.$$("#star_border");this.$.defs.appendChild(b.cloneNode(!0));this.$.defs.appendChild(c.cloneNode(!0));this.$.defs.appendChild(a.cloneNode(!0))}; a4.prototype.percentChanged_=function(a){for(var b=this.$.rating;b.firstChild;)b.removeChild(b.firstChild);b=Math.round(a/10);a=Math.floor(b/2);b%=2;var c=5-a-b;this.appendStars_("star",a,0);this.appendStars_("star_half",b,a);this.appendStars_("star_border",c,a+b)}; a4.prototype.appendStars_=function(a,b,c){for(var d=0;d\n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zkb){var d=document.createElement("template");d.innerHTML=""; Zkb=d}d=Zkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$kb=a}a=$kb;return a}}}); var b4=a4;w([R({observer:"percentChanged_"}),x("design:type",Object)],b4.prototype,"percent",void 0);w([R({value:6}),x("design:type",Object)],b4.prototype,"spacing",void 0);w([R({value:Polymer.Base.create("iron-meta",{type:"iconset"})}),x("design:type",Object)],b4.prototype,"meta_",void 0);b4=w([U({is:"ytd-ratings"})],b4);var alb;var blb;var c4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-autonav-state-changed-action":"onYtAutonavStateChangedAction"};return a}; p(c4,O);e=c4.prototype;e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{compactRadioRenderer:"ytd-compact-radio-renderer",compactVideoRenderer:"ytd-compact-video-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;var a=LL.getInstance().getState();this.toggle.checked=1!==a;this.clientVe=Jn(113957)}; e.onToggleChanged=function(){var a=this.toggle.checked?2:1;LL.getInstance().setState(a);this.logClick()}; e.onYtAutonavStateChangedAction=function(a){this.toggle.checked=1!==a}; e.logClick=function(){var a=On(),b=Nn();a&&b&&this.clientVe&&(NJ(a,b,this.clientVe),QJ(a,this.clientVe))}; h.Object.defineProperties(c4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===blb){var a=document.createElement("template");a.innerHTML="
\n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.toggleDescription)]]
\n \n \n [[getSimpleString(data.infoText)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===alb){var d=document.createElement("template");d.innerHTML=""; alb=d}d=alb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);blb=a}a=blb;return a}}}); var d4=c4;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],d4.prototype,"actionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],d4.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],d4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],d4.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],d4.prototype,"isTwoColumns",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],d4.prototype,"maskAsVideo",void 0);w([R({value:function(){return N("kevlar_fixie_watch_layout")}, reflectToAttribute:!0}),x("design:type",Boolean)],d4.prototype,"fixie",void 0);w([R({reflectToAttribute:!0,value:!0}),x("design:type",Boolean)],d4.prototype,"queueIsEmpty",void 0);w([R({value:function(){return N("kevlar_watch_feed_big_thumbs")}, reflectToAttribute:!0}),x("design:type",Boolean)],d4.prototype,"watchFeedBigThumbs",void 0);w([R({value:function(){return N("web_player_move_autonav_toggle")}, reflectToAttribute:!0}),x("design:type",Boolean)],d4.prototype,"playerMoveAutonavToggle",void 0);w([R({value:function(){return N("web_hide_autonav_headline")}, reflectToAttribute:!0}),x("design:type",Boolean)],d4.prototype,"hideAutonavHeadline",void 0);w([R({value:function(){return N("web_hide_autonav_keyline")}, reflectToAttribute:!0}),x("design:type",Boolean)],d4.prototype,"hideAutonavKeyline",void 0);w([AE("#contents"),x("design:type",AX)],d4.prototype,"contents",void 0);w([AE("#toggle"),x("design:type",Object)],d4.prototype,"toggle",void 0);d4=w([U({is:"ytd-compact-autoplay-renderer"})],d4);var clb;var dlb;var e4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-hide-unlimited-offer-module":"handleHideAction"};return a}; p(e4,O);e=e4.prototype;e.dataChanged=function(){this.hidden=!1}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.configureRendererStamper=function(){return{"data.storefrontEntryPoint":{id:"storefront-entry-point",mapping:{compactTvfilmEntryPointRenderer:"ytd-compact-tvfilm-entry-point-renderer"}}}}; e.onThumbnailTap=function(a){this.data&&this.data.serviceEndpoint&&(this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),a.stopPropagation())}; e.handleHideAction=function(){this.data&&this.data.suppressIfCompanionAds&&(this.hidden=!0)}; h.Object.defineProperties(e4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dlb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n \n \n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===clb){var d=document.createElement("template");d.innerHTML=""; clb=d}d=clb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dlb=a}a=dlb;return a}}}); var f4=e4;f4.prototype.dataChanged=f4.prototype.dataChanged;w([P(Y),x("design:type",Object)],f4.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],f4.prototype,"rendererBehaviors",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],f4.prototype,"actionSenderBehavior",void 0);w([P([NO.YtActionHandlerBehavior]),x("design:type",Object)],f4.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],f4.prototype,"data",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f4.prototype,"dataChanged",null);f4=w([U({is:"ytd-unlimited-offer-module-renderer"})],f4);var elb;var flb;var g4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-related-chip-command":"handleRelatedChipCommand","yt-chip-cloud-chip-select-action":"handleChipCloudChipSelectAction","yt-chip-cloud-chip-deselect-action":"handleChipCloudChipDeselectAction"};return a}; p(g4,O);e=g4.prototype;e.configureRendererStamper=function(){return{"data.chips":{id:"chips",mapping:{chipCloudChipRenderer:{component:"yt-chip-cloud-chip-renderer"}}},"data.previousButton":{id:"left-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}}}},"data.nextButton":{id:"right-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"}}}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.selected=0;this.ytScrollableChipCloudBehavior.reset()}; e.onResize=function(){ygb(this.ytScrollableChipCloudBehavior);X0(this.ytScrollableChipCloudBehavior)}; e.handleRelatedChipCommand=function(a,b){a=this.chipsSelector.indexOf(b);-1!==a&&this.chipsSelector.selectIndex(a)}; e.handleChipCloudChipSelectAction=function(a){a=this.chipsSelector.indexOf(a);-1
\n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===elb){var d=document.createElement("template");d.innerHTML=""; elb=d}d=elb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);flb=a}a=flb;return a}}}); var h4=g4;h4.prototype.onResize=h4.prototype.onResize;h4.prototype.dataChanged=h4.prototype.dataChanged;w([P(Y),x("design:type",Object)],h4.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],h4.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],h4.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],h4.prototype,"actionSenderBehavior",void 0); w([P(Polymer.IronResizableBehavior),x("design:type",Object)],h4.prototype,"ironResizableBehavior",void 0);w([P(),x("design:type",Y0)],h4.prototype,"ytScrollableChipCloudBehavior",void 0);w([R(),x("design:type",Object)],h4.prototype,"data",void 0);w([R({value:0}),x("design:type",Number)],h4.prototype,"selected",void 0);w([AE("#chips"),x("design:type",Object)],h4.prototype,"chipsSelector",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],h4.prototype,"dataChanged",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],h4.prototype,"onResize",null);h4=w([U({is:"yt-chip-cloud-renderer"})],h4);var glb;var hlb;var i4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-related-chip-command":"handleRelatedChipCommand"};return a}; p(i4,O);i4.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{chipCloudRenderer:{component:"yt-chip-cloud-renderer"}}}}}; i4.prototype.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; i4.prototype.handleRelatedChipCommand=function(a){a=a.relatedChipCommand;var b=a.contents;b?this.actionSenderBehavior.sendAction("yt-item-section-replace-action",[b,a.targetSectionIdentifier]):this.actionSenderBehavior.sendAction("yt-item-section-continuation-action",[a.continuationData,a.targetSectionIdentifier])}; h.Object.defineProperties(i4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hlb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===glb){var d=document.createElement("template");d.innerHTML="";glb=d}d=glb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hlb=a}a=hlb;return a}}}); var j4=i4;w([P(Y),x("design:type",Object)],j4.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],j4.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],j4.prototype,"actionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],j4.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],j4.prototype,"data",void 0);j4=w([U({is:"yt-related-chip-cloud-renderer"})],j4);var ilb;var jlb;var k4=function(){}; k4.prototype.showFeedbackDialog=function(){}; k4.prototype.showHelpDialog=function(){}; k4.prototype.showHelpDialog=k4.prototype.showHelpDialog;k4.prototype.showFeedbackDialog=k4.prototype.showFeedbackDialog;var l4=function(){var a=O.apply(this,arguments)||this;a.currentPageUrl="";a.baseUrl="";a.isHiddenByUser=null;a.hidden=!1;a.isListeningForPlayerProgress=!1;a.playerEvents=new Map;a.isFrameReady=!1;a.player=null;a.actionMap={"yt-set-live-chat-collapsed-state-action":"setCollapsedState","yt-forward-redux-action-to-live-chat-iframe":"forwardReduxActionToIframe","yt-dark-mode-toggled-action":"onDarkModeToggledAction","yt-dark-theme-action":"onDarkThemeAction","yt-light-theme-action":"onLightThemeAction", "yt-signal-action-close-pdg-buy-flow":"onClosePdgBuyFlow"};return a}; p(l4,O);e=l4.prototype;e.onYtToggleButton=function(){this.isHiddenByUser=!this.collapsed}; e.configureRendererStamper=function(){return{"data.liveChatRenderer.showHideButton":{id:"show-hide-button",mapping:{toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{noink:!0}}}}}}; e.created=function(){this.handleIframeEventListener=this.handleIframeEvent.bind(this);this.handleKeyboardEventListener=this.handleKeyboardEvent.bind(this);this.playerEvents.set("onVideoProgress",this.playerProgressHandler);this.playerEvents.set("onAdStart",this.playerAdStartHandler);this.playerEvents.set("onAdEnd",this.playerAdEndHandler);this.playerEvents.set("onStateChange",this.playerStateChangeHandler)}; e.attached=function(){window.addEventListener("message",this.handleIframeEventListener);window.addEventListener("keydown",this.handleKeyboardEventListener);window.addEventListener("keyup",this.handleKeyboardEventListener);this.currentPageUrl=window.location.href;this.setupPlayerProgressRelay()}; e.detached=function(){window.removeEventListener("message",this.handleIframeEventListener);window.removeEventListener("keydown",this.handleKeyboardEventListener);window.removeEventListener("keyup",this.handleKeyboardEventListener);this.currentPageUrl="";this.isListeningForPlayerProgress=!1;this.setPlayer(null);if(!N("kevlar_use_ytd_player")){var a=aN(this);this.unlisten(a,"yt-player-released","disconnectFromPlayer")}this.isFrameReady=!1}; e.computeBaseUrl=function(a){var b="/live_chat";this.isChatReplay()&&(b="/live_chat_replay");return cr(br(hr(a).setPath(b),null),"").toString()}; e.dataChanged=function(){this.isHiddenByUser=null}; e.urlChanged=function(){if(void 0!==this.url){this.isFrameReady=!this.isChatReplay();var a=this.url;if(this.isChatReplay()&&this.player){var b=Math.floor(1E3*this.player.getProgressState().current);a=Wq(hr(a),"playerOffsetMs",b.toString()).toString()}b=this.chatframe;try{if("about:blank"===a)var c=kea;else{var d=void 0===d?oea:d;var f=a;d=void 0===d?oea:d;var g,l=f.substring(0,14).indexOf(":");var m=null!==(g=qea[0>l?"":f.substr(0,l).toLowerCase()])&&void 0!==g?g:pea;var n=d.includes(m.scheme)&&m.isValid(f)? new hh(f,Zg):void 0;c=n||lea}var r=b.contentDocument.location,u=r.replace;if(c instanceof iea){if(c instanceof hh)var z=c.privateDoNotAccessOrElseWrappedUrl;else throw Error("wrong type");}else z=Vb(c);u.call(r,z)}catch(C){b.src=a}}}; e.handleIframeEvent=function(a){var b=this;if(a&&Mb(this.baseUrl,a.origin)&&a.source===this.chatframe.contentWindow&&Pa(a.data))if(a.data["yt-iframed-buyflow-launcher"])this.handleBuyflowMessages(a);else if(a.data["yt-iframed-player-progress-relay"])this.handleChatFrameReady();else if(a.data["yt-show-feedback-dialog"]){var c=this.ytComponentBehaviorType.getInterface(k4);if(c){var d=a.ports,f;d&&d.length&&(f=function(){d[0].postMessage({})}); a=a.data["yt-show-feedback-dialog"];c.showFeedbackDialog(a.customProductData,a.feedbackContent,f,a.bucket)}}else a.data["yt-show-survey"]?this.fire("yt-show-survey",a.data["yt-show-survey"]):a.data["yt-purchase-membership"]?this.ytRendererBehavior.sendServiceRequestAction([a.data["yt-purchase-membership"]]):a.data["yt-open-vc-balance-widget"]?this.ytRendererBehavior.sendServiceRequestAction([a.data["yt-open-vc-balance-widget"]]).then(function(){},function(g){b.onLiveChatBuyFlowCallback({success:!1, error:g})}):a.data["yt-user-activity"]?Jk():a.data["yt-attach-live-chat-response-tracking-params"]?this.attachLiveChatResponseVeTrackingParams(a.data["yt-attach-live-chat-response-tracking-params"].trackingParams):a.data["yt-open-popup"]?this.ytOpenPopupBehavior.openPopup(a.data["yt-open-popup"]):a.data["yt-redeem-vc"]&&this.ytRendererBehavior.sendServiceRequestAction(a.data["yt-redeem-vc"]).then(function(g){if(g&&g.data&&"YPC_RESPONSE_CODE_UNKNOWN"===g.data.ypcResponseCode)b.onLiveChatBuyFlowCallback({success:!0, response:g})},function(g){b.onLiveChatBuyFlowCallback({success:!1, error:g})})}; e.attachLiveChatResponseVeTrackingParams=function(a){a=In(a);var b=On(),c=Ja("liveChatRenderer.trackingParams",this.data);b&&c&&NJ(b,In(c),a)}; e.handleBuyflowMessages=function(a){var b=a.data["yt-iframed-buyflow-launcher"].encryptedPurchaseParams,c=a.data["yt-iframed-buyflow-launcher"].serializedTransactionFlowLoggingParams,d=a.data["yt-iframed-buyflow-launcher"].serializedPaymentsClientParams;TVa(pO.getInstance(),b.replace(/-/g,"+").replace(/_/g,"/"),function(f){a.ports[0].postMessage({success:!0,buyFlowResponse:f})},void 0,function(f){a.ports[0].postMessage({success:!1, error:f&&f.message||"Buyflow rejected without error."})},void 0,void 0,function(){a.ports[0].postMessage({closed:!0})},c,d)}; e.setupPlayerProgressRelay=function(){if(!this.isListeningForPlayerProgress){var a=aN(this);a.getPlayerPromise().then(this.playerApiReady.bind(this));N("kevlar_use_ytd_player")||this.listen(a,"yt-player-released","disconnectFromPlayer");this.isListeningForPlayerProgress=!0}}; e.handleChatFrameReady=function(){this.isFrameReady=!0;this.player&&1===this.player.getAdState()&&this.postToContentWindow({"yt-player-ad-start":""})}; e.playerApiReady=function(a){this.setPlayer(a)}; e.playerProgressHandler=function(){if(this.player){var a=this.player.getProgressState();this.postToContentWindow({"yt-player-video-progress":a.current})}}; e.playerAdStartHandler=function(a){this.postToContentWindow({"yt-player-ad-start":a})}; e.playerAdEndHandler=function(){this.postToContentWindow({"yt-player-ad-end":!0})}; e.playerStateChangeHandler=function(a){this.postToContentWindow({"yt-player-state-change":a})}; e.disconnectFromPlayer=function(){this.setPlayer(null)}; e.setPlayer=function(a){this.player&&this.ytPlayerListenerBehavior.unlistenFromPlayerEvents(this.player,this.playerEvents);a&&(this.player=a,this.ytPlayerListenerBehavior.listenToPlayerEvents(a,this.playerEvents),this.fire("player-api-ready"))}; e.liveChatPageUrl=function(a,b,c){return!c||b?"about:blank":c.liveChatRenderer?(b=hr(this.currentPageUrl).queryData_,noa(b),a=hr(a),b.add("continuation",c.liveChatRenderer.continuations[0].reloadContinuationData.continuation),br(a,b),a.toString()):""}; e.isCollapsed=function(a,b){return null!==b?b:a&&a.conversationBarRenderer&&a.conversationBarRenderer.availabilityMessage?!0:a&&a.liveChatRenderer?"LIVE_CHAT_DISPLAY_STATE_COLLAPSED"===a.liveChatRenderer.initialDisplayState:!1}; e.isHidden=function(a,b){var c=b&&b.conversationBarRenderer&&b.conversationBarRenderer.availabilityMessage,d=b&&b.liveChatRenderer&&b.liveChatRenderer.showHideButton;return!a||c||d?b&&b.liveChatRenderer&&b.liveChatRenderer.initialDisplayState?"LIVE_CHAT_DISPLAY_STATE_HIDDEN"===b.liveChatRenderer.initialDisplayState:!1:!0}; e.setCollapsedState=function(a){a.setLiveChatCollapsedStateAction&&(this.isHiddenByUser=!!a.setLiveChatCollapsedStateAction.collapsed)}; e.forwardReduxActionToIframe=function(a){this.postToContentWindow({"yt-live-chat-forward-redux-action":a})}; e.onDarkModeToggledAction=function(a){this.sendDarkThemePostMessage(a)}; e.onDarkThemeAction=function(){this.sendDarkThemePostMessage(!0)}; e.onLightThemeAction=function(){this.sendDarkThemePostMessage(!1)}; e.onClosePdgBuyFlow=function(){this.postToContentWindow({"yt-live-chat-close-buy-flow":!0})}; e.sendDarkThemePostMessage=function(a){this.postToContentWindow({"yt-live-chat-set-dark-theme":a})}; e.onLiveChatBuyFlowCallback=function(a){this.postToContentWindow({"yt-live-chat-buy-flow-callback":a})}; e.handleKeyboardEvent=function(a){y.containsValue(WUa,a.keyCode)&&this.postToContentWindow({"yt-live-chat-keyboard-event":{eventType:a.type,keyCode:a.keyCode}})}; e.isChatReplay=function(){return!!(this.data&&this.data.liveChatRenderer&&this.data.liveChatRenderer.isReplay)}; e.postToContentWindow=function(a){if(this.isFrameReady){var b=window.location.protocol+"//"+window.location.host;if(this.chatframe.contentWindow)try{this.chatframe.contentWindow.postMessage(a,b)}catch(c){Um(c)}else vm(new Pl("Tried posting a message to an iframe with no content window",a))}}; h.Object.defineProperties(l4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jlb){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ilb){var d=document.createElement("template");d.innerHTML=""; ilb=d}d=ilb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jlb=a}a=jlb;return a}}}); var m4=l4;m4.prototype.onYtToggleButton=m4.prototype.onYtToggleButton;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],m4.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],m4.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],m4.prototype,"ytRendererstamperBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],m4.prototype,"ytComponentBehaviorType",void 0); w([P(cQ),x("design:type",Object)],m4.prototype,"ytPlayerListenerBehavior",void 0);w([P(aP.YtOpenPopupBehavior),x("design:type",Object)],m4.prototype,"ytOpenPopupBehavior",void 0);w([R(),x("design:type",Object)],m4.prototype,"data",void 0);w([R(),x("design:type",String)],m4.prototype,"currentPageUrl",void 0);w([R({computed:"computeBaseUrl(currentPageUrl,data)"}),x("design:type",String)],m4.prototype,"baseUrl",void 0); w([R({computed:"liveChatPageUrl(baseUrl,collapsed,data)",observer:"urlChanged"}),x("design:type",String)],m4.prototype,"url",void 0);w([R(),x("design:type",Object)],m4.prototype,"isHiddenByUser",void 0);w([R({reflectToAttribute:!0,computed:"isHidden(collapsed,data)"}),x("design:type",Object)],m4.prototype,"hidden",void 0);w([R({reflectToAttribute:!0,computed:"isCollapsed(data,isHiddenByUser)"}),x("design:type",Boolean)],m4.prototype,"collapsed",void 0); w([AE("#chatframe"),x("design:type",HTMLIFrameElement)],m4.prototype,"chatframe",void 0);w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m4.prototype,"onYtToggleButton",null);m4=w([U({is:"ytd-live-chat-frame"})],m4);var klb;var llb;var mlb=[W.YtRendererBehavior,{_noAccessors:!0,properties:{loopOn:Boolean,shuffleOn:Boolean},listeners:{"yt-toggle-button":"onYtToggleButton_"},onYtToggleButton_:function(a){a=a.detail;void 0!=a.actions.loop&&(this.loopOn=a.actions.loop);void 0!=a.actions.shuffle&&(this.shuffleOn=a.actions.shuffle)}, setMenuData_:function(a){if(!a||!a.playlistButtons||a.isInfinite)return null;for(var b=a.playlistButtons.menuRenderer.topLevelButtons,c=b.length,d=0;d

"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===klb){var d=document.createElement("template");d.innerHTML=""; klb=d}d=klb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);llb=a}a=llb;return a}}}); var o4=n4;o4.prototype.onRenderStamperFinished_=o4.prototype.onRenderStamperFinished_;o4.prototype.onMouseLeave_=o4.prototype.onMouseLeave_;o4.prototype.onMouseEnter_=o4.prototype.onMouseEnter_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],o4.prototype,"ironResizableBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],o4.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],o4.prototype,"ytRendererstamperBehavior",void 0); w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],o4.prototype,"ytActionHandlerBehavior",void 0);w([P(mlb),x("design:type",Object)],o4.prototype,"ytPlaylistPanelBehavior",void 0);w([P(OO.YtTaskEmitterBehavior),x("design:type",Object)],o4.prototype,"ytTaskEmitterBehavior",void 0);w([P(D7a.YtReorderableBehavior),x("design:type",Object)],o4.prototype,"ytReorderableBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],o4.prototype,"ytComponentBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],o4.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],o4.prototype,"data",void 0);w([R({computed:"setMenuData_(data)"}),x("design:type",Object)],o4.prototype,"menuRendererData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],o4.prototype,"hideHeaderText",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],o4.prototype,"fixie",void 0); w([R({reflectToAttribute:!0,computed:"computeCollapsible_(hideHeaderText)"}),x("design:type",Boolean)],o4.prototype,"collapsible",void 0);w([R({reflectToAttribute:!0,observer:"collapseChanged_"}),x("design:type",Object)],o4.prototype,"collapsed",void 0);w([R({reflectToAttribute:!0,observer:"hiddenChanged_"}),x("design:type",Boolean)],o4.prototype,"hidden",void 0);w([R({reflectToAttribute:!0,computed:"computeHasPlaylistButtons_(data)"}),x("design:type",Boolean)],o4.prototype,"hasPlaylistButtons",void 0); w([R({reflectToAttribute:!0,computed:"computeHasSeparateSaveButton_(data)"}),x("design:type",Boolean)],o4.prototype,"hasSeparateSaveButton",void 0);w([R({reflectToAttribute:!0,computed:"computeHasToolbarButton_(data, menuRendererData)"}),x("design:type",Boolean)],o4.prototype,"hasToolbar_",void 0);w([R({reflectToAttribute:!0,computed:"computePlaylistType_(data)"}),x("design:type",String)],o4.prototype,"playlistType_",void 0);w([R(),x("design:type",Object)],o4.prototype,"isHovered",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],o4.prototype,"jsPanelHeight_",void 0);w([R({value:56}),x("design:type",Number)],o4.prototype,"scrollMargin",void 0);w([R({computed:"computeCanReorder_(data)"}),x("design:type",Boolean)],o4.prototype,"canReorder_",void 0);w([R(),x("design:type",Object)],o4.prototype,"expandLabel_",void 0);w([R({computed:"computeExpandIcon_(collapsed)"}),x("design:type",String)],o4.prototype,"expandIcon_",void 0); w([S("mouseenter"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o4.prototype,"onMouseEnter_",null);w([S("mouseleave"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o4.prototype,"onMouseLeave_",null);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o4.prototype,"onRenderStamperFinished_",null);o4=w([U({is:"ytd-playlist-panel-renderer"})],o4);var nlb;var olb;var p4=function(){return O.apply(this,arguments)||this}; p(p4,O);p4.prototype.configureRendererStamper=function(){return{data:{id:"content",mapping:{playlistPanelVideoRenderer:{component:"ytd-playlist-panel-video-renderer",noInjection:!0}}}}}; h.Object.defineProperties(p4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===olb){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nlb){var d=document.createElement("template");d.innerHTML="";nlb=d}d=nlb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);olb=a}a=olb;return a}}}); var q4=p4;w([P(Y),x("design:type",Object)],q4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],q4.prototype,"data",void 0);q4=w([U({is:"ytd-playlist-panel-supported-items"})],q4);var plb;var qlb;var r4=function(){var a=O.apply(this,arguments)||this;a.largerPlaylistThumbs_=N("kevlar_larger_playlist_thumbnails");a.thumbnailWidth_=N("kevlar_larger_playlist_thumbnails")?128:100;a.watchColorUpdate_=N("kevlar_watch_color_update");return a}; p(r4,O);e=r4.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{buttonTooltipPosition:"left"}}}}}}; e.computeEditableClass_=function(a){return a&&a.menu?"editable":""}; e.computeSelected_=function(a){return a.selected}; e.canReorderChanged_=function(){this.touchPersistentDragHandle=N("kevlar_watch_drag_handles")&&this.canReorder}; e.onYtServiceRequestSent_=function(a,b){b.endpoint&&this.isHideEnclosingAction_(b.endpoint)&&iSa(AM(),this.data.videoId)}; e.isHideEnclosingAction_=function(a){var b=!!this.get("feedbackEndpoint.uiActions.hideEnclosingContainer",a);a="INDIFFERENT"===this.get("likeEndpoint.status",a);return b||a}; e.onHandleMouseenter_=function(){this.handleIsHovered=!0}; e.onHandleMouseleave_=function(){this.handleIsHovered=!1}; h.Object.defineProperties(r4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qlb){var a=document.createElement("template");a.innerHTML=" \n
\n
\n \n \n \n [[getSimpleString(data.indexText)]]\n
\n
\n \n \n
\n
\n \n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n
\n [[getSimpleString(data.shortBylineText)]]\n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===plb){var d=document.createElement("template");d.innerHTML=""; plb=d}d=plb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qlb=a}a=qlb;return a}}}); var s4=r4;s4.prototype.onYtServiceRequestSent_=s4.prototype.onYtServiceRequestSent_;w([P(HQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],s4.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([P(Y),x("design:type",Object)],s4.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],s4.prototype,"ytRendererBehavior",void 0);w([P(GQ.YtdLockupBehavior),x("design:type",Object)],s4.prototype,"ytdLockupBehavior",void 0); w([R(),x("design:type",Object)],s4.prototype,"data",void 0);w([R({computed:"computeSelected_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],s4.prototype,"selected",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],s4.prototype,"largerPlaylistThumbs_",void 0);w([R(),x("design:type",Object)],s4.prototype,"thumbnailWidth_",void 0);w([R({reflectToAttribute:!0,observer:"canReorderChanged_"}),x("design:type",Boolean)],s4.prototype,"canReorder",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],s4.prototype,"touchPersistentDragHandle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],s4.prototype,"handleIsHovered",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],s4.prototype,"watchColorUpdate_",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],s4.prototype,"onYtServiceRequestSent_",null); s4=w([U({is:"ytd-playlist-panel-video-renderer"})],s4);var rlb;var slb;var t4=function(){var a=O.apply(this,arguments)||this;a.storageKey="speedyg";a.activationThreshold=216E5;a.cacheExpiration=2592E3;return a}; p(t4,O);e=t4.prototype;e.activateSpeedygPromo=function(){var a=rK(this.storageKey)||{};a={lastActivation:a.lastActivation,suppressed:a.suppressed};a.lastActivation?Wa()-Number(new Date(a.lastActivation))>this.activationThreshold?this.activate(a.suppressed):this.updateSuppressedCount(a):this.activate(0)}; e.activate=function(){this.$&&(this.updateActivationTime(),this.notification.open())}; e.updateSuppressedCount=function(a){a.suppressed++;this.storeData({lastActivation:a.lastActivation,suppressed:a.suppressed})}; e.updateActivationTime=function(){var a={lastActivation:Wa(),suppressed:0};this.storeData(a)}; e.storeData=function(a){qK(this.storageKey,a,this.cacheExpiration)}; e.closePromo=function(){this.notification.close()}; h.Object.defineProperties(t4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===slb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rlb){var d=document.createElement("template");d.innerHTML="";rlb=d}d=rlb; c.call(b,d.content.cloneNode(!0),a.content.firstChild);slb=a}a=slb;return a}}}); var u4=t4;w([R(),x("design:type",Object)],u4.prototype,"data",void 0);w([R(),x("design:type",Object)],u4.prototype,"storageKey",void 0);w([R(),x("design:type",Object)],u4.prototype,"activationThreshold",void 0);w([R(),x("design:type",Object)],u4.prototype,"cacheExpiration",void 0);w([AE("#notification"),x("design:type",Object)],u4.prototype,"notification",void 0);u4=w([U({is:"ytd-video-quality-promo-renderer"})],u4);var tlb;var ulb;Polymer({is:"yt-notification-action-renderer",_template:function(){if(void 0!==ulb)return ulb;var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tlb){var d=document.createElement("template");d.innerHTML=""; tlb=d}d=tlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ulb=a}, behaviors:[W.YtRendererBehavior,YP.YtEventForwardingBehavior],properties:{data:Object,duration:Number},open:function(){this.$.toast.open()}, close:function(){this.$.toast.close()}, setVerticalOffset:function(a){this.$.toast.verticalOffset=a;this.$.toast.fit()}, computeButtonClass_:function(a){return a?"toast-button":""}, computeText_:function(a){return CL(a)}});var vlb;var wlb;var xlb;var ylb;Polymer({is:"yt-player-error-message-renderer",_template:function(){if(void 0!==ylb)return ylb;var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.reason)]]
\n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xlb){var d=document.createElement("template");d.innerHTML=""; xlb=d}d=xlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ylb=a}, behaviors:[Y,W.YtRendererBehavior],properties:{data:Object,icon_:{type:String,computed:"computeIcon_(data.icon)"},hasIcon_:{type:Boolean,reflectToAttribute:!0,computed:"computeHasIcon_(icon_)"},signInIcon_:{type:Boolean,reflectToAttribute:!0,computed:"isSignInIcon_(icon_)"}},stampDom:{"data.proceedButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}}},computeHasIcon_:function(a){return!!a}, isSignInIcon_:function(a){return"yt-icons:prompted_sign_in"==a}});var zlb;var Alb;Polymer({is:"yt-player-kav-renderer",_template:function(){if(void 0!==Alb)return Alb;var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.reason)]]
\n
[[getSimpleString(data.subreason)]]
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zlb){var d=document.createElement("template");d.innerHTML=""; zlb=d}d=zlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Alb=a}, behaviors:[Y,W.YtRendererBehavior],properties:{data:Object,icon_:{type:String,computed:"computeIcon_(data.icon)"}},stampDom:{"data.proceedButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},computeIcon_:function(a){return a?"yt-icons:"+a.iconType.toLowerCase():"error_outline"}});Polymer({is:"yt-playability-error-supported-renderers",_template:function(){if(void 0!==wlb)return wlb;var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vlb){var d=document.createElement("template");d.innerHTML=""; vlb=d}d=vlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return wlb=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object,status:String},stampDom:{data:{id:"container",mapping:{playerErrorMessageRenderer:"yt-player-error-message-renderer",playerKavRenderer:"yt-player-kav-renderer"}}}});var Blb;var Clb;var v4=function(){return O.apply(this,arguments)||this}; p(v4,O);v4.prototype.ready=function(){var a=this.onColumnScroll_.bind(this);this.$.primary.addEventListener("scroll",a);this.$.secondary.addEventListener("scroll",a)}; v4.prototype.onColumnScroll_=function(){this.ytdWatchBehavior.markDirty()}; h.Object.defineProperties(v4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Clb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n\n\n\n
\n\n
\n\n
\n\n\n\n\n\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Blb){var d=document.createElement("template");d.innerHTML=""; Blb=d}d=Blb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Clb=a}a=Clb;return a}}}); var w4=v4;w([P(f2a.YtdWatchBehavior),x("design:type",Object)],w4.prototype,"ytdWatchBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return!N("kevlar_watch_snap_sizing")}}), x("design:type",Object)],w4.prototype,"flexy_",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_snap_sizing")}}), x("design:type",Object)],w4.prototype,"snap_",void 0);w4=w([U({is:"ytd-watch-flexy"})],w4);Polymer({is:"yt-player-manager",provides:YM,behaviors:[q8a,v8a],factoryImpl:function(){}, ready:function(){Fa("yt.abuse.player.botguardInitialized",DKa,void 0);Fa("yt.abuse.player.invokeBotguard",EKa,void 0);Fa("yt.abuse.dclkstatus.checkDclkStatus",BKa,void 0);Fa("yt.player.exports.navigate",JUa,void 0);Fa("yt.util.activity.init",Ik,void 0);Fa("yt.util.activity.getTimeSinceActive",Mk,void 0);Fa("yt.util.activity.setTimestamp",Jk,void 0)}});var Dlb=Jn(115990),Elb=Jn(115991),Flb=Jn(115992),Glb=function(a,b,c,d){var f=this,g=d.dismissAction,l=d.expandAction,m=d.playlistResizeAction;this.layer=3;this.miniplayerVideoConfig={startPosition:385,draggingClass:"gesture-dragging",startAction:function(){f.startAction()}, resetAction:function(){f.resetAction()}, triggers:{down:{fade:!0,endOpacity:.3,endPosition:485,threshold:50,triggerAction:function(){f.dismissAction()}, moveAction:function(r){f.moveAction(r)}}, up:{endPosition:285,threshold:50,triggerAction:function(){f.expandAction()}}}}; this.miniplayerPlaylistConfig={startPosition:385,draggingClass:"gesture-dragging",startAction:function(){f.startAction()}, resetAction:function(){f.resetAction()}, triggers:{down:{endPosition:485,endOpacity:.3,threshold:50,fade:!0,triggerAction:function(){f.dismissAction()}, moveAction:function(r){f.moveAction(r)}}, up:{endPosition:100,threshold:50,triggerAction:function(){f.gesture.config=f.miniplayerPlaylistExpandedConfig;f.playlistResizeAction()}}}}; this.miniplayerPlaylistExpandedConfig={startPosition:100,draggingClass:"gesture-dragging",triggers:{down:{endPosition:385,threshold:50,triggerAction:function(){f.gesture.config=f.miniplayerPlaylistConfig;f.playlistResizeAction()}}, up:{endPosition:0,threshold:50,triggerAction:function(){f.expandAction()}}}}; if(N("kevlar_touch_gesture_ves")){var n=OL();TL(n,Dlb,this.layer);TL(n,Elb,this.layer);TL(n,Flb,this.layer);this.dismissAction=function(){g();UL(n,{visualElement:Dlb})}; this.expandAction=function(){l();UL(n,{visualElement:Elb})}; this.playlistResizeAction=function(){m();UL(n,{visualElement:Flb})}}else this.dismissAction=g,this.expandAction=l,this.playlistResizeAction=m; this.gesture=new SN(a,b,this.getConfig(c,!1));this.gesture.attach()}; e=Glb.prototype;e.setPlayer=function(a){this.player=a}; e.detach=function(){this.gesture.detach()}; e.update=function(a,b){a=this.getConfig(a,b);this.gesture.config=a}; e.getConfig=function(a,b){return a?b?this.miniplayerPlaylistExpandedConfig:this.miniplayerPlaylistConfig:this.miniplayerVideoConfig}; e.startAction=function(){this.player&&(this.volume=this.player.getVolume())}; e.resetAction=function(){this.player&&this.volume&&this.player.setVolume(this.volume)}; e.moveAction=function(a){this.player&&this.volume&&this.player.setVolume(this.volume*(-.9*a+1))};var Hlb;var Ilb;var x4=function(){var a=O.apply(this,arguments)||this;a.active=!1;a.hasNoData=!1;a.enabled=!1;a.expanded=!1;a.disabledState=!1;a.externalPlaylistData_={};a.hasPlaylistData=!1;a.animateMiniplayer=N("desktop_animate_miniplayer");a.closed=!1;a.expandedClosed=!1;a.watchResponse_=null;a.player_=null;a.expandVe_=null;a.closeVe_=null;a.disabledInitialStateIsPlaying_=!1;a.PLAYER_EVENTS_=new Map;a.miniplayerFetchRequest_=null;a.playerElement_=null;a.gestures_=null;a.screenLayer=3;a.actionMap={"yt-activate-miniplayer-action":"activate_", "yt-cache-miniplayer-page-action":"onCacheMiniplayerPageAction_","yt-shortcut-close-miniplayer":"onShortcutCloseMiniplayer_","yt-close-miniplayer-action":"onCloseMiniplayer_","yt-collapse-miniplayer-action":"onYtCollapseMiniplayerAction_","yt-deactivate-miniplayer-action":"deactivate_","yt-expand-watch-page-action":"handleExpandWatchPageAction_","yt-get-miniplayer-component-action":"getMiniplayerComponent_","yt-miniplayer-active":"isMiniplayerActive_","yt-miniplayer-load-endpoint":"loadEndpoint_", "yt-sync-with-remote-video":"syncWithRemoteVideo_","yt-miniplayer-toast-action":"handleMiniplayerToastAction_","yt-miniplayer-update-header-action":"updateHeader_","yt-show-miniplayer-command":"showMiniplayerCommand_"};return a}; p(x4,O);e=x4.prototype;e.created=function(){this.PLAYER_EVENTS_.set("onPlayVideo",this.onPlayerPlayVideo_);this.PLAYER_EVENTS_.set("onCloseMiniplayer",this.onPlayerCloseMiniplayer_);this.PLAYER_EVENTS_.set("onExpandMiniplayer",this.handleExpandWatchPageAction_)}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.animateMiniplayer&&(this.gestures_=new Glb(this,this.querySelector("#video-container"),this.hasPlaylistData,{dismissAction:function(){return a.onCloseMiniplayer_()}, expandAction:function(){return a.onMetadataTap_()}, playlistResizeAction:function(){return a.playlistExpand_()}}))}; e.detached=function(){this.unlisten(this,"transitionend","resizePlaylist_");this.gestures_&&(this.gestures_.detach(),this.gestures_=null)}; e.hasPlaylistDataChanged_=function(){this.gestures_&&this.gestures_.update(this.hasPlaylistData,this.expanded)}; e.activeChanged_=function(a){void 0!==a&&this.ytActionSenderBehavior.sendAction("yt-miniplayer-active-changed-action",[a])}; e.onCacheMiniplayerPageAction_=function(a){this.backgroundPageData_=a}; e.onYtCollapseMiniplayerAction_=function(){this.backgroundPageData_?this.fire("yt-navigate-cache",{url:this.backgroundPageData_.url,endpoint:this.backgroundPageData_.endpoint,data:this.backgroundPageData_}):this.ytActionSenderBehavior.sendAction("yt-navigate-home-action")}; e.activate_=function(a,b,c){return Ya(this,function f(){var g=this,l,m,n;return ya(f,function(r){if(1==r.nextAddress){g.gestures_&&g.gestures_.update(g.hasPlaylistData,g.expanded);if(LQa())return r.return();c&&(g.hasNoData=!1);g.enabled||(g.enabled=!0);g.active=!0;g.expanded=!1;g.data=b;g.closed=!1;g.closedByPan_=!1;g.pannedClosed=!1;g.expandedClosed=!1;g.expandToWatch=!1;g.watchResponse_=c;g.playerElement_=a;a.preparePlayer(a);YL.getInstance().miniplayerButtonActivation=!1;YL.getInstance().userActivation= !1;YL.getInstance().playlistWatchPageActivation=!1;YL.getInstance().lockupActivation=!1;YL.getInstance().showMiniplayerCommandActivation=!1;g.logMiniplayer_();m=l=g.ytComponentBehavior.getInterface(rN);l.setPlaylistComponent(g.$.playlist);g.listen(m,"yt-navigate","onPlaylistYtNavigate_");g.listen(m,"yt-playlist-data-updated","onYtPlaylistDataUpdated_");g.onYtPlaylistDataUpdated_();a.appendTo(g.$["player-container"]);return q(r,a.getPlayerPromise(),2)}n=r.yieldResult;n.setMinimized(!0);n.setSizeStyle(!1, !0);g.ytPlayerListenerBehavior.listenToPlayerEvents(n,g.PLAYER_EVENTS_);g.player_=n;g.gestures_&&g.gestures_.setPlayer(n);YL.getInstance().playerContainer=g.$["player-container"];g.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed");g.handleMiniplayerPlaybackState_();oa(r)})})}; e.deactivate_=function(){return Ya(this,function b(){var c=this,d,f,g,l,m;return ya(b,function(n){if(1==n.nextAddress){if(!c.active)return n.return();c.expandToWatch||(c.expanded?c.expandedClosed=!0:c.closed=!0);d=c.getPlayerElement();return q(n,d.getPlayerPromise(),2)}if(3!=n.nextAddress)return f=n.yieldResult,f.setMinimized(!1),l=g=c.ytComponentBehavior.getInterface(rN),c.unlisten(l,"yt-navigate","onPlaylistYtNavigate_"),c.unlisten(l,"yt-playlist-data-updated","onYtPlaylistDataUpdated_"),m=c.ytComponentBehavior.getInterface(XM), q(n,m.movePlayerToWatch(d),3);c.active=!1;c.data=void 0;c.watchResponse_=null;c.player_&&c.ytPlayerListenerBehavior.unlistenFromPlayerEvents(c.player_,c.PLAYER_EVENTS_);YL.getInstance().currentEndpoint=null;c.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed");c.playerElement_=null;YL.getInstance().playerContainer=null;c.disabledState=!1;oa(n)})})}; e.getPlayerElement=function(){return this.playerElement_?this.playerElement_:this.$["player-container"].firstElementChild}; e.handleExpandWatchPageAction_=function(){this.onMetadataTap_()}; e.onMetadataTap_=function(){this.watchResponse_&&this.data&&this.data.watchEndpoint?(this.expandVe_&&QJ(On(this.screenLayer),this.expandVe_),this.fire("yt-navigate-cache",{url:this.watchResponse_.url,endpoint:this.data.watchEndpoint,data:this.watchResponse_,miniplayer:!0})):this.data&&this.data.watchEndpoint&&this.fire("yt-navigate",{endpoint:this.data.watchEndpoint});this.expandToWatch=!0}; e.onMetadataKeydown_=function(a){if(13==a.keyCode||32==a.keyCode)this.onMetadataTap_()}; e.onDisabledTap_=function(a){a.target==this.$["blocking-container"]&&(this.disabledInitialStateIsPlaying_&&this.player_.playVideo(),this.onMetadataTap_(),this.disabledState=!1)}; e.onPlaylistExpandTap_=function(a){if(this.hasPlaylistData){a=Polymer.dom(a).path||[];a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;if(b==this)break;if(b.classList&&b.classList.contains("miniplayer-title"))return}this.playlistExpand_();this.gestures_&&this.gestures_.update(this.hasPlaylistData,this.expanded)}}; e.playlistExpand_=function(){this.expanded||(this.listen(this,"transitionend","resizePlaylist_"),this.ytRendererBehavior.markDirty());this.expanded=!this.expanded}; e.resizePlaylist_=function(){var a=this.$.playlist.querySelector("iron-list");a&&a.notifyResize();this.unlisten(this,"transitionend","resizePlaylist_")}; e.getExpandIcon_=function(a){return a?"miniplayer:keyboard-arrow-down":"miniplayer:keyboard-arrow-up"}; e.syncWithRemoteVideo_=function(a,b){return Ya(this,function d(){var f=this,g,l,m,n,r;return ya(d,function(u){if(1==u.nextAddress){g=f.ytComponentBehavior.getInterface(XM);if(!f.active&&g.isOnWatch())return u.return();l={videoId:a};b&&(l.playlistId=b);m={watchEndpoint:l};n=f.ytComponentBehavior.getInterface(UM);f.cancelActiveRequest_();f.miniplayerFetchRequest_=n.requestDataForEndpoint(m,{},void 0,{},!0);sa(u,2);return q(u,f.miniplayerFetchRequest_,4)}if(2!=u.nextAddress)return r=u.yieldResult,f.handleWatchDataResponse_(r), ta(u,0);ua(u);oa(u)})})}; e.handleWatchDataResponse_=function(a){return Ya(this,function c(){var d=this,f,g,l,m,n,r,u,z,C;return ya(c,function(J){switch(J.nextAddress){case 1:if(!a)return J.return();d.hasNoData=!1;a.playerResponse&&!a.player&&d.canWrapPlayerResponseWithSwfConfig_()&&(a.player=bN(a.playerResponse));d.watchResponse_=a;d.logMiniplayer_();if(d.active)return l=d.getPlayerElement(),q(J,l.getPlayerPromise(),6);f=d.ytComponentBehavior.getInterface(XM);f.activateMiniplayer(a);g=d.getPlayerElement();if(!g){d.deactivate_(); ud(Error("getPlayerElement missing"));J.jumpTo(3);break}g.update(a.player);a.response&&(g.watchNextResponse=a.response);return q(J,g.getPlayerPromise(),5);case 5:d.player_=J.yieldResult;J.jumpTo(3);break;case 6:a.response&&(l.watchNextData=a.response),m=y.getValueByKeys.apply(y,[a].concat(fa(sRa))),(n=y.getValueByKeys.apply(y,[a].concat(fa(wRa))))&&m&&(r=d.ytComponentBehavior.getInterface(rN),r.setAutoplayRenderer(m)),m&&(z=(u=!tJ.getInstance().getFlag(140))?2:1,d.player_.setAutonavState(z)),C=PQ(a.response), d.set("data",C);case 3:d.handleMiniplayerPlaybackState_(),oa(J);}})})}; e.onPlayerPlayVideo_=function(a){return Ya(this,function c(){var d,f,g,l=this;return ya(c,function(m){d=a.sessionData&&"playnext"in a.sessionData;a.sessionData&&a.sessionData.itct&&(f=a.sessionData.itct);N("kevlar_player_watch_endpoint_navigation")&&a.watchEndpoint&&d?(g=KSa(a.watchEndpoint,f),N("kevlar_watch_navigation_clear_autoplay_count_session_data")&&a.sessionData&&delete a.sessionData.playnext):g=eM(a.videoId,a.listId,f);N("kevlar_watch_local_autoplay_count")&&d&&(a.sessionData.playnext=jN().count); a.sessionData&&rJ(g.commandMetadata.webCommandMetadata.url,a.sessionData);l.loadEndpoint_(g,!1,d);oa(m)})})}; e.loadEndpoint_=function(a,b,c){return Ya(this,function f(){var g=this,l,m,n,r,u,z,C,J,E,T;return ya(f,function(la){switch(la.nextAddress){case 1:return l=g,YL.getInstance().currentEndpoint=a,g.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed"),m=g.ytComponentBehavior.getInterface(UM),n=g.ytComponentBehavior.getInterface(XM),r={clientParams:{miniplayer:!0,autoSaveToQueue:!b}},u=new JM(g.getPlayerElement.bind(g),n,r,{layer:3,parentLayer:0}),z=!1,C=function(qa){qa.playlistData||( l.expanded=!1);qa.player?z=!0:!z&&qa.playerResponse&&l.canWrapPlayerResponseWithSwfConfig_()&&(qa.player=bN(qa.playerResponse));if(qa.player&&b){var Ia=JSa(qa.player);if(Ia){var yb=l.get("playerConfig.playbackStartConfig",Ia)||{};yb.startPaused=!0;l.set("playerConfig.playbackStartConfig",yb,Ia);l.set("player.args.raw_player_response",Ia,qa);l.set("player.args.player_response",void 0,qa)}}u.processChunk({endpoint:a,data:qa})},J=!1,N("kevlar_op_warm_pages")&&(J=oN(nN.instance,a)),g.cancelActiveRequest_(), J?(E=nN.instance,g.miniplayerFetchRequest_=pN(E,a,{},window.location.href,"watch",function(qa,Ia){C(Ia)},function(qa){return l.isNetworkPromiseStale_(qa)})):g.miniplayerFetchRequest_=m.requestDataForEndpoint(a,{pbj:"miniplayer"},C,{},!0),sa(la,2),q(la,g.miniplayerFetchRequest_,4); case 4:return T=la.yieldResult,q(la,g.handleWatchDataResponse_(T,b),5);case 5:c?jN().count++:jN().count=1;ta(la,0);break;case 2:ua(la),oa(la);}})})}; e.onCloseMiniplayer_=function(){this.getPlayerElement()&&this.getPlayerElement().stop();this.closeVe_&&QJ(On(this.screenLayer),this.closeVe_);this.hasNoData=!0;this.cancelActiveRequest_();this.ytActionSenderBehavior.sendAction("yt-deactivate-miniplayer-action")}; e.triggerCloseMiniplayer_=function(){AM().closeMiniplayer(this)}; e.onPlayerCloseMiniplayer_=function(){this.triggerCloseMiniplayer_()}; e.onShortcutCloseMiniplayer_=function(){this.triggerCloseMiniplayer_()}; e.isMiniplayerActive_=function(){return this.active}; e.getMiniplayerComponent_=function(){return this}; e.getScreenLayer=function(){return this.screenLayer}; e.logMiniplayer_=function(){if(this.watchResponse_){var a=this.get("playerResponse.trackingParams",this.watchResponse_),b=On(this.screenLayer),c=Nn(this.screenLayer);a&&b&&c&&(a=In(a),NJ(b,c,a),this.expandVe_=Jn(35989),this.closeVe_=Jn(34699),KJ(N("use_default_events_client")?void 0:Mm,b,a,[this.expandVe_,this.closeVe_]),PJ(b,[this.expandVe_,this.closeVe_]))}}; e.onPlaylistYtNavigate_=function(a,b){return Ya(this,function d(){var f=this,g,l,m,n,r,u,z,C,J,E,T,la;return ya(d,function(qa){if(1==qa.nextAddress){g=f;if(!b.endpoint.watchEndpoint)return qa.return();YL.getInstance().currentEndpoint=b.endpoint;f.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed");a.stopPropagation();l=f.get("endpoint.commandMetadata.webCommandMetadata.url",b);m=!1;l&&b.tempData&&!y.isEmpty(b.tempData)&&(b.tempData&&b.tempData.playnext&&(m=!0),rJ(l,b.tempData)); n=f.ytComponentBehavior.getInterface(UM);r=f.ytComponentBehavior.getInterface(XM);u={clientParams:{miniplayer:!0,autoSaveToQueue:!1}};z=new JM(f.getPlayerElement.bind(f),r,u,{layer:3});C=!1;J=function(Ia){Ia.player?C=!0:!C&&Ia.playerResponse&&g.canWrapPlayerResponseWithSwfConfig_()&&(Ia.player=bN(Ia.playerResponse));z.processChunk({endpoint:b.endpoint,data:Ia})}; E=!1;N("kevlar_op_warm_pages")&&(E=oN(nN.instance,b.endpoint));f.cancelActiveRequest_();E?(T=nN.instance,f.miniplayerFetchRequest_=pN(T,b.endpoint,{},window.location.href,"watch",function(Ia,yb){J(yb)},function(Ia){return g.isNetworkPromiseStale_(Ia)})):f.miniplayerFetchRequest_=n.requestDataForEndpoint(b.endpoint,{pbj:"miniplayer"},J,{},!0); sa(qa,2);return q(qa,f.miniplayerFetchRequest_,4)}if(2!=qa.nextAddress)return la=qa.yieldResult,f.handleWatchDataResponse_(la),m?jN().count++:jN().count=1,ta(qa,0);ua(qa);oa(qa)})})}; e.cancelActiveRequest_=function(){this.miniplayerFetchRequest_&&(this.miniplayerFetchRequest_.cancel&&this.miniplayerFetchRequest_.cancel("Active request obsolete"),this.miniplayerFetchRequest_=null)}; e.isNetworkPromiseStale_=function(a){return a!=this.miniplayerFetchRequest_}; e.handleMiniplayerPlaybackState_=function(){var a=this.get("playerResponse.playabilityStatus.miniplayer.miniplayerRenderer",this.watchResponse_);a&&"PLAYBACK_MODE_PAUSED_ONLY"==a.playbackMode&&(this.disabledState=!0,a.minimizedEndpoint&&this.ytActionSenderBehavior.sendServiceRequestAction([a.minimizedEndpoint]),this.player_&&(a=this.player_.getPlayerState(),(this.disabledInitialStateIsPlaying_=-1===a||1===a||3===a)&&this.player_.pauseVideo()))}; e.computePlaylistData_=function(a,b){b&&b.contents?(a=QRa(b),this.updateHeader_(a?a.title:void 0,b.isCourse?b.titleText:PRa(CL(b.titleText),b.currentIndex,b.totalVideos),void 0)):this.watchResponse_&&(a=PQ(this.watchResponse_.response,!0),this.updateHeader_(a.miniplayerTitle,a.miniplayerSubtitle,a.watchEndpoint));return b}; e.computeHasPlaylistData_=function(){return!!this.playlistData&&!!this.playlistData.contents}; e.onYtPlaylistDataUpdated_=function(){this.externalPlaylistData_=this.ytComponentBehavior.getInterface(rN).getPlaylistData()||{}}; e.handleMiniplayerToastAction_=function(a,b){this.$.toast.open(a,b)}; e.updateHeader_=function(a,b,c){this.data||(this.data={miniplayerTitle:{simpleText:""},miniplayerSubtitle:{simpleText:""},playlistData:null});a&&this.set("data.miniplayerTitle",a);b&&this.set("data.miniplayerSubtitle",b);c&&this.set("data.watchEndpoint",c)}; e.computeExpandButtonHidden_=function(a,b){return!a||!b}; e.computeExpandButtonLabel_=function(a){return a?mL("MINIPLAYER_COLLAPSE_LABEL"):mL("MINIPLAYER_EXPAND_LABEL")}; e.computeDisabledStateCloseButtonLabel_=function(){return mL("MINIPLAYER_CLOSE",void 0,"Close")}; e.canWrapPlayerResponseWithSwfConfig_=function(){return!N("kevlar_player_response_swfconfig_wrapper_miniplayer_killswitch")&&!y.isEmpty(A("WEB_PLAYER_CONTEXT_CONFIGS",{}))}; e.showMiniplayerCommand_=function(a){var b,c,d;return Ya(this,function g(){var l=this,m,n;return ya(g,function(r){if(1==r.nextAddress){if(null===(c=null===(b=null===a||void 0===a?void 0:a.showMiniplayerCommand)||void 0===b?void 0:b.miniplayerCommand)||void 0===c||!c.watchEndpoint||l.active)return r.return();m=l.ytComponentBehavior.getInterface(XM);n=null!==(d=l.getPlayerElement())&&void 0!==d?d:m.getPlayerFromWatch();YL.getInstance().showMiniplayerCommandActivation=!0;return q(r,l.activate_(n),2)}if(3!= r.nextAddress)return q(r,l.loadEndpoint_(a.showMiniplayerCommand.miniplayerCommand,!0),3);l.set("data.miniplayerSubtitle",{simpleText:mL("CONTINUE_WATCHING",void 0,"Continue watching")});oa(r)})})}; h.Object.defineProperties(x4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ilb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hlb){var d=document.createElement("template");d.innerHTML=""; Hlb=d}d=Hlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ilb=a}a=Ilb;return a}}}); var y4=x4;w([P(cQ),x("design:type",I0a)],y4.prototype,"ytPlayerListenerBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],y4.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],y4.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],y4.prototype,"ytComponentBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],y4.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],y4.prototype,"data",void 0);w([R({reflectToAttribute:!0,observer:"activeChanged_"}),x("design:type",Object)],y4.prototype,"active",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],y4.prototype,"hasNoData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],y4.prototype,"enabled",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],y4.prototype,"expanded",void 0);w([R(),x("design:type",Object)],y4.prototype,"disabledState",void 0); w([R(),x("design:type",Object)],y4.prototype,"externalPlaylistData_",void 0);w([R({computed:"computePlaylistData_(data.playlistData, externalPlaylistData_)"}),x("design:type",Object)],y4.prototype,"playlistData",void 0);w([R({reflectToAttribute:!0,computed:"computeHasPlaylistData_(playlistData)",observer:"hasPlaylistDataChanged_"}),x("design:type",Object)],y4.prototype,"hasPlaylistData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],y4.prototype,"animateMiniplayer",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],y4.prototype,"closed",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],y4.prototype,"expandedClosed",void 0);y4=w([U({is:"ytd-miniplayer"})],y4);var Jlb;var Klb;var z4=function(){var a=O.apply(this,arguments)||this;a.duration=2500;return a}; p(z4,O);e=z4.prototype;e.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}}}}; e.created=function(){Polymer.IronA11yAnnouncer.requestAvailability()}; e.ready=function(){N("kevlar_frontend_video_list_undo")&&this.addEventListener("yt-service-request-sent",this.onServiceRequestSent.bind(this))}; e.open=function(a,b){this.data=a;this.label=b;this.opened=!0;this.closed=!1;this.fire("iron-announce",{text:this.label+" "+this.componentBehavior.getSimpleString(a.title)});this.async(this.close,this.duration)}; e.close=function(){this.closed=!0}; e.onServiceRequestSent=function(a){if(a=a.detail.actions)for(var b=0;b\n
\n
[[label]]
\n
[[getSimpleString(data.title)]]
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jlb){var d=document.createElement("template");d.innerHTML=""; Jlb=d}d=Jlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Klb=a}a=Klb;return a}}}); var A4=z4;w([P(AO.YtComponentBehavior),x("design:type",Object)],A4.prototype,"componentBehavior",void 0);w([P(Y),x("design:type",Object)],A4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],A4.prototype,"data",void 0);w([R(),x("design:type",String)],A4.prototype,"label",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],A4.prototype,"opened",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],A4.prototype,"closed",void 0); w([R(),x("design:type",Object)],A4.prototype,"duration",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],A4.prototype,"button",null);A4=w([U({is:"ytd-miniplayer-toast"})],A4);var Llb;var Mlb;var Nlb;var Olb={};Olb.YtConditionalRendererBehavior=[W.YtRendererBehavior,{_noAccessors:!0,properties:{hidden:{type:Boolean,reflectToAttribute:!0}},observers:["updateHidden_(data, isAttached)"],updateHidden_:function(a,b){this.hidden=!this.shouldShow_(a,b)}, shouldShow_:function(a,b){return b?a&&a.supportedDatas&&a.supportedDatas.rendererVisibilityConditionData&&a.supportedDatas.rendererVisibilityConditionData.showIf?this.isVisibilityConditionSatisfied_(a.supportedDatas.rendererVisibilityConditionData.showIf):a&&a.visibilityCondition&&a.visibilityCondition.showIf?this.isVisibilityConditionSatisfied_(a.visibilityCondition.showIf):a&&a.visibilityConditionType?this.isLegacyVisibilityConditionSatisfied_(a.visibilityConditionType):!0:!1}, isVisibilityConditionSatisfied_:function(a){switch(a){case"VISIBILITY_CONDITION_TYPE_MDX_CONNECTED":return this.isMdxConnected_();case"VISIBILITY_CONDITION_TYPE_MDX_DISCONNECTED":return!this.isMdxConnected_();default:return!1;}}, isLegacyVisibilityConditionSatisfied_:function(a){switch(a){case"MDX_CONNECTED":return this.isMdxConnected_();default:return!1;}}, isMdxConnected_:function(){var a=this.sendAction("yt-get-mdx-status");return 1==a.length&&a[0].connected}}];var B4=function(){return O.apply(this,arguments)||this}; p(B4,O);e=B4.prototype;e.ready=function(){this.listen(this,"tap","onEndpointTapExtra")}; e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","menuitem")}; e.onFocus=function(){this.$$("paper-item").focus()}; e.onEndpointTapExtra=function(a){this.fire("iron-activate");var b=this.data.navigationEndpoint;b&&b.userFeedbackEndpoint&&(a.stopPropagation(),this.ytActionSenderBehavior.sendInnerTubeActions([b],this))}; e.computeIcon=function(a){return a&&a.iconType?zO(a.iconType):""}; e.computeHasSeparator=function(){return!(!this.data||!this.data.hasSeparator)}; e.computeIconHidden=function(){return this.useIcons?!1:!this.icon}; e.forceUpdateStylesOnLegacyBrowsers=function(){N("kevlar_legacy_browsers")&&this.updateStyles()}; h.Object.defineProperties(B4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Nlb){var a=document.createElement("template");a.innerHTML="\n"; var b=a.content,c=b.insertBefore;if(void 0===Mlb){var d=document.createElement("template");d.innerHTML="";Mlb=d}d=Mlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); a.content.insertBefore(pJa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===Llb&&(d=document.createElement("template"),d.innerHTML="", Llb=d);d=Llb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nlb=a}a=Nlb;return a}}}); var C4=B4;C4.prototype.forceUpdateStylesOnLegacyBrowsers=C4.prototype.forceUpdateStylesOnLegacyBrowsers;C4.prototype.onFocus=C4.prototype.onFocus;w([P(V.YtActionSenderBehavior),x("design:type",Object)],C4.prototype,"ytActionSenderBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],C4.prototype,"ytdOpenPopupBehavior",void 0);w([P(Olb.YtConditionalRendererBehavior),x("design:type",Object)],C4.prototype,"ytConditionalRendererBehavior",void 0); w([P(dP.YtEndpointBehavior),x("design:type",Object)],C4.prototype,"ytEndpointBehavior",void 0);w([R(),x("design:type",Object)],C4.prototype,"data",void 0);w([R({computed:"computeIcon(data.icon)",value:""}),x("design:type",String)],C4.prototype,"icon",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],C4.prototype,"useIcons",void 0);w([R({computed:"computeHasSeparator(data.hasSeparator)",reflectToAttribute:!0}),x("design:type",Boolean)],C4.prototype,"hasSeparator",void 0); w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C4.prototype,"onFocus",null);w([yE("useIcons","hasSeparator"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C4.prototype,"forceUpdateStylesOnLegacyBrowsers",null);C4=w([U({is:"ytd-menu-navigation-item-renderer"})],C4);var Plb;var Qlb;var Rlb=zL(mL("DOWNLOAD",{},"Download")),Slb=zL(mL("DELETE_FROM_DOWNLOADS",{},"Delete from downloads")),Tlb=zL(mL("RETRY",{},"Retry")),D4=function(){var a=O.apply(this,arguments)||this;a.text=Rlb;a.iconType="OFFLINE_DOWNLOAD";a.downloadStatus=0;return a}; p(D4,O);D4.prototype.onTap=function(){this.ytActionSenderBehavior.sendOptionalAction("yt-menu-service-item-selected-action",[this.data]);var a=this.data.serviceEndpoint;a&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; D4.prototype.onDownloadStatusChange=function(a){switch(a){case 0:this.text=Rlb;this.iconType="OFFLINE_DOWNLOAD";break;case 4:this.text=Tlb;this.iconType="OFFLINE_DOWNLOAD";break;case 1:this.text=Slb;this.iconType="DELETE";break;case 2:this.text=Slb;this.iconType="DELETE";break;case 3:this.text=Slb;this.iconType="DELETE";break;default:this.text=Rlb,this.iconType="OFFLINE_DOWNLOAD";}}; h.Object.defineProperties(D4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qlb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Plb){var d=document.createElement("template");d.innerHTML=""; Plb=d}d=Plb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qlb=a}a=Qlb;return a}}}); var E4=D4;E4.prototype.onDownloadStatusChange=E4.prototype.onDownloadStatusChange;E4.prototype.onTap=E4.prototype.onTap;w([P(W.YtRendererBehavior),x("design:type",Object)],E4.prototype,"ytRendererBehavior",void 0);w([P(IQ),x("design:type",Object)],E4.prototype,"ytdReduxBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],E4.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],E4.prototype,"data",void 0); w([R(),x("design:type",Object)],E4.prototype,"text",void 0);w([R(),x("design:type",String)],E4.prototype,"iconType",void 0);w([R({selector:nQ,selectorArgs:["data.serviceEndpoint.offlineVideoEndpoint.videoId"]}),x("design:type",Number)],E4.prototype,"downloadStatus",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],E4.prototype,"onTap",null); w([yE("downloadStatus"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],E4.prototype,"onDownloadStatusChange",null);E4=w([U({is:"ytd-menu-service-item-download-renderer"})],E4);var Ulb;var Vlb;var F4=function(){var a=O.apply(this,arguments)||this;a.useIcons=!1;return a}; p(F4,O);e=F4.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","menuitem")}; e.onFocus_=function(){this.$$("paper-item").focus()}; e.onTap_=function(){this.ytActionSenderBehavior.sendOptionalAction("yt-menu-service-item-selected-action",[this.data]);var a=this.data.serviceEndpoint,b=this.data.command;a&&this.ytActionSenderBehavior.sendServiceRequestAction([a]);b&&this.ytActionSenderBehavior.sendInnerTubeActions([b],this)}; e.computeIcon_=function(a){return a&&a.iconType?zO(a.iconType):""}; e.computeIconHidden_=function(){return this.useIcons?!1:!this.icon_}; e.computeHasSeparator_=function(){var a;return!(null===(a=this.data)||void 0===a||!a.hasSeparator)}; e.forceUpdateStylesOnLegacyBrowsers_=function(){N("kevlar_legacy_browsers")&&this.updateStyles()}; e.computeIsSelected_=function(){var a;return!(null===(a=this.data)||void 0===a||!a.isSelected)}; h.Object.defineProperties(F4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vlb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ulb){var d=document.createElement("template");d.innerHTML=""; Ulb=d}d=Ulb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vlb=a}a=Vlb;return a}}}); var G4=F4;G4.prototype.forceUpdateStylesOnLegacyBrowsers_=G4.prototype.forceUpdateStylesOnLegacyBrowsers_;G4.prototype.onTap_=G4.prototype.onTap_;G4.prototype.onFocus_=G4.prototype.onFocus_;w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],G4.prototype,"ytdOpenPopupBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],G4.prototype,"ytActionSenderBehavior",void 0); w([P(Olb.YtConditionalRendererBehavior),x("design:type",Object)],G4.prototype,"ytConditionalRendererBehavior",void 0);w([R(),x("design:type",Object)],G4.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)",value:""}),x("design:type",String)],G4.prototype,"icon_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],G4.prototype,"useIcons",void 0); w([R({computed:"computeHasSeparator_(data.hasSeparator)",reflectToAttribute:!0}),x("design:type",Boolean)],G4.prototype,"hasSeparator_",void 0);w([R({computed:"computeIsSelected_(data.isSelected)",reflectToAttribute:!0}),x("design:type",Boolean)],G4.prototype,"isSelected",void 0);w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G4.prototype,"onFocus_",null); w([S("tap"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],G4.prototype,"onTap_",null);w([yE("useIcons","hasSeparator_"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G4.prototype,"forceUpdateStylesOnLegacyBrowsers_",null);G4=w([U({is:"ytd-menu-service-item-renderer"})],G4);var Wlb;var Xlb;var H4=function(){return O.apply(this,arguments)||this}; p(H4,O);e=H4.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.onDataChanged=function(){var a=this;Polymer.RenderStatus.afterNextRender(this,function(){a.postbox.openDialog();a.focus();a.fire("yt-refit")})}; e.focus=function(){this.postbox.focus()}; e.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; e.onYtCommentboxDismiss=function(){this.closePopup()}; h.Object.defineProperties(H4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xlb){var a=document.createElement("template");a.innerHTML="
\n
\n [[getSimpleString(data.dialogRenderer.backstagePostDialogRenderer.title)]]\n
\n \n \n \n
\n\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wlb){var d=document.createElement("template");d.innerHTML=""; Wlb=d}d=Wlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xlb=a}a=Xlb;return a}}}); var I4=H4;I4.prototype.onYtCommentboxDismiss=I4.prototype.onYtCommentboxDismiss;w([P(W.YtRendererBehavior),x("design:type",Object)],I4.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],I4.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],I4.prototype,"data",void 0);w([R({value:function(){return mL("SBOX_INAPPROPRIATE_CANCEL")}}), x("design:type",String)],I4.prototype,"closeButtonAriaLabel",void 0);w([AE("#postbox"),x("design:type",Object)],I4.prototype,"postbox",void 0);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],I4.prototype,"onYtCommentboxDismiss",null);I4=w([U({is:"ytd-backstage-post-dialog-popup-renderer"})],I4);var Ylb;var Zlb;var $lb=function(){return O.apply(this,arguments)||this}; p($lb,O); h.Object.defineProperties($lb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zlb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.text)]]
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ylb){var d=document.createElement("template");d.innerHTML=""; Ylb=d}d=Ylb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zlb=a}a=Zlb;return a}}}); var J4=$lb;w([P(W.YtRendererBehavior),x("design:type",Object)],J4.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],J4.prototype,"data",void 0);J4=w([U({is:"ytd-sender-id-section-renderer"})],J4);var amb;var bmb;var K4=function(){return O.apply(this,arguments)||this}; p(K4,O);K4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{senderIdSectionRenderer:"ytd-sender-id-section-renderer",thirdPartyNetworkSection:"yt-third-party-network-section-renderer"}}}}; K4.prototype.onDataChanged_=function(){var a=this;this.data&&this.data.contents&&(this.setAttribute("links-only",!0),this.toggleAttribute("can-post",this.hasCommunityPostRenderer_()),Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")}))}; K4.prototype.hasCommunityPostRenderer_=function(){var a,b,c,d;return!(null===(d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.header)||void 0===b?void 0:b.sharePanelHeaderRenderer)||void 0===c?void 0:c.communityPost)||void 0===d||!d.communityPostSectionRenderer)}; K4.prototype.onTapClose_=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-unified-share-panel-renderer"])}; h.Object.defineProperties(K4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bmb){var a=document.createElement("template");a.innerHTML="\n\n \n\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===amb){var d=document.createElement("template");d.innerHTML=""; amb=d}d=amb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bmb=a}a=bmb;return a}}}); var L4=K4;w([P(Y),x("design:type",Object)],L4.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],L4.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],L4.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],L4.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged_"}),x("design:type",Object)],L4.prototype,"data",void 0); w([R({value:mL("SBOX_INAPPROPRIATE_CANCEL")}),x("design:type",String)],L4.prototype,"closeButtonAriaLabel",void 0);L4=w([U({is:"ytd-unified-share-panel-renderer"})],L4);var cmb;var dmb;var M4=function(){return O.apply(this,arguments)||this}; p(M4,O);M4.prototype.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; h.Object.defineProperties(M4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dmb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n \n \n
\n
[[getSimpleString(data.subtitle)]]
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cmb){var d=document.createElement("template");d.innerHTML=""; cmb=d}d=cmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dmb=a}a=dmb;return a}}}); var N4=M4;w([P(W.YtRendererBehavior),x("design:type",Object)],N4.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],N4.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],N4.prototype,"data",void 0);N4=w([uO({is:"yt-community-post-section-renderer",noInjection:!0})],N4);var emb;var fmb;var O4=function(){return O.apply(this,arguments)||this}; p(O4,O);O4.prototype.configureRendererStamper=function(){return{"data.title":{id:"title",mapping:{sharePanelTitleV15Renderer:"yt-share-panel-title-v15-renderer"}},"data.communityPost":{id:"community-post",mapping:{communityPostSectionRenderer:"yt-community-post-section-renderer"}}}}; h.Object.defineProperties(O4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fmb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===emb){var d=document.createElement("template");d.innerHTML="";emb=d}d=emb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);fmb=a}a=fmb;return a}}}); var P4=O4;w([P(V.YtActionSenderBehavior),x("design:type",Object)],P4.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],P4.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],P4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],P4.prototype,"data",void 0);P4=w([uO({is:"yt-share-panel-header-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],P4);var gmb;var hmb;var imb=function(){return O.apply(this,arguments)||this}; p(imb,O); h.Object.defineProperties(imb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hmb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gmb){var d=document.createElement("template");d.innerHTML="";gmb=d}d=gmb; c.call(b,d.content.cloneNode(!0),a.content.firstChild);hmb=a}a=hmb;return a}}}); var Q4=imb;w([P(W.YtRendererBehavior),x("design:type",Object)],Q4.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],Q4.prototype,"data",void 0);Q4=w([uO({is:"yt-share-panel-title-v15-renderer",noInjection:!0})],Q4);var jmb;var kmb;Polymer({is:"yt-start-at-renderer",_template:function(){if(void 0!==kmb)return kmb;var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jmb){var d=document.createElement("template");d.innerHTML=""; jmb=d}d=jmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return kmb=a}, actionMap:{"yt-open-popup-action":"onOpen_"},behaviors:[NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,W.YtRendererBehavior],properties:{data:Object,isStartAtChecked_:{type:Boolean,value:!1,notify:!0},currentTimeSecs_:Number},attached:function(){this.onOpen_()}, updateTimeSecs_:function(a){this.currentTimeSecs_=a;this.$["start-at-timestamp"].value=this.getTimeString_()}, getTimeString_:function(){var a=this.currentTimeSecs_+"",b=Math.floor(a/3600),c=Math.floor(a%3600%60);return(0\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nmb){var d=document.createElement("template");d.innerHTML=""; nmb=d}d=nmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);omb=a}a=omb;return a}}}); var S4=R4;S4.prototype.onTap=S4.prototype.onTap;w([P(W.YtRendererBehavior),x("design:type",Object)],S4.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],S4.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],S4.prototype,"data",void 0);w([zE("data.title"),x("design:type",Object),x("design:paramtypes",[])],S4.prototype,"title",null);w([zE("data.serviceName"),x("design:type",String),x("design:paramtypes",[])],S4.prototype,"icon",null); w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],S4.prototype,"onTap",null);S4=w([uO({is:"yt-share-target-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],S4);var pmb;var qmb=document.head,rmb=qmb.appendChild,smb; if(void 0===pmb){var tmb=document.createElement("template");tmb.innerHTML="";pmb= tmb}smb=pmb;rmb.call(qmb,smb.content);var umb;var vmb;Polymer({is:"yt-third-party-share-target-section-renderer",_template:function(){if(void 0!==vmb)return vmb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n \n\n\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===umb){var d=document.createElement("template");d.innerHTML=""; umb=d}d=umb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return vmb=a}, actionMap:{"yt-share-panel-reset-action":"onReset_"},behaviors:[Y,NO.YtActionHandlerBehavior,W.YtRendererBehavior],listeners:{wheel:"onScrollWheel_"},properties:{data:{type:Object,observer:"onDataChanged_"}},stampDom:{"data.shareTargets":{id:"contents",mapping:{shareTargetRenderer:{component:"yt-share-target-renderer",attributes:{role:"option"}}}}},SHARE_TARGET_WIDTH_:70,SHARE_TARGET_MARGIN_RIGHT_:8,PAGE_SCROLL_SPEED_:9,onDataChanged_:function(){this.data&&this.data.shareTargets&&(this.$["scroll-button-back"].hidden= !0,this.$["scroll-button-forward"].hidden=6>=this.data.shareTargets.length)}, onReset_:function(){this.$.list&&(tD(this.$.list,aBa(this.$.list)),this.updateScrollButtons_())}, onScrollBack_:function(){this.smoothScrollByOnePage_(!1)}, onScrollForward_:function(){this.smoothScrollByOnePage_(!0)}, onScrollWheel_:function(a){a.stopPropagation();a.preventDefault();var b=sD(this.$.list);tD(this.$.list,b+(Math.abs(a.deltaX)>Math.abs(a.deltaY)?a.deltaX:a.deltaY));this.updateScrollButtons_()}, smoothScrollByOnePage_:function(a){var b=this.$.list,c=(Math.floor(b.clientWidth/this.SHARE_TARGET_WIDTH_)*(this.SHARE_TARGET_WIDTH_+this.SHARE_TARGET_MARGIN_RIGHT_)-this.SHARE_TARGET_MARGIN_RIGHT_)/2,d=sD(b),f=c*(a?1:-1),g=this.PAGE_SCROLL_SPEED_,l=this.updateScrollButtons_.bind(this),m=0,n;(function u(){m+=g;n=m/c*2;tD(b,d+f*(1>n?n*n:-n*n+4*n-2));m=a;this.$["scroll-button-forward"].hidden=a>=b}});Polymer({is:"yt-third-party-network-section-renderer",_template:function(){if(void 0!==mmb)return mmb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lmb){var d=document.createElement("template");d.innerHTML=""; lmb=d}d=lmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return mmb=a}, behaviors:[W.YtRendererBehavior,Y],properties:{data:Object},stampDom:{"data.shareTargetContainer":{id:"share-targets",mapping:{thirdPartyShareTargetSectionRenderer:"yt-third-party-share-target-section-renderer"}},"data.copyLinkContainer":{id:"copy-link",mapping:{copyLinkRenderer:"yt-copy-link-renderer"}},"data.startAtContainer":{id:"start-at",mapping:{startAtRenderer:"yt-start-at-renderer"}}}});var wmb;var xmb;var T4=function(){return O.apply(this,arguments)||this}; p(T4,O);T4.prototype.attached=function(){this.setAttribute("modal","true")}; h.Object.defineProperties(T4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xmb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wmb){var d=document.createElement("template");d.innerHTML=""; wmb=d}d=wmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xmb=a}a=xmb;return a}}}); var U4=T4;w([R(),x("design:type",Object)],U4.prototype,"data",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],U4.prototype,"ytRendererBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],U4.prototype,"ytEventForwardingBehavior",void 0);U4=w([U({is:"ytd-modal-with-title-and-button-renderer"})],U4);var ymb;var zmb;var Amb=function(){return O.apply(this,arguments)||this}; p(Amb,O); h.Object.defineProperties(Amb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zmb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ymb){var d=document.createElement("template");d.innerHTML=""; ymb=d}d=ymb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zmb=a}a=zmb;return a}}}); var V4=Amb;w([P(W.YtRendererBehavior),x("design:type",Object)],V4.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],V4.prototype,"data",void 0);w([R({notify:!0}),x("design:type",String)],V4.prototype,"page",void 0);V4=w([U({is:"ytd-account-item-section-header-renderer"})],V4);var Bmb;var Cmb;var W4=function(){return O.apply(this,arguments)||this}; p(W4,O);W4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{accountItem:{component:"ytd-account-item-renderer",properties:{onAccountItemTap:"[[onAccountItemTap]]"}},accountItemRenderer:{component:"ytd-account-item-renderer",properties:{onAccountItemTap:"[[onAccountItemTap]]"}},compactLinkRenderer:"ytd-compact-link-renderer",continuationItemRenderer:{component:"ytd-continuation-item-renderer",params:{showButton:!0}}}}}}; W4.prototype.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents"}}; h.Object.defineProperties(W4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cmb){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bmb){var d=document.createElement("template");d.innerHTML=""; Bmb=d}d=Bmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cmb=a}a=Cmb;return a}}}); var X4=W4;w([P(W.YtRendererBehavior),x("design:type",Object)],X4.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],X4.prototype,"ytRendererstamperBehavior",void 0);w([P(FU),x("design:type",Object)],X4.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],X4.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Function)],X4.prototype,"onAccountItemTap",void 0);X4=w([U({is:"ytd-account-item-section-renderer"})],X4);var Dmb;var Emb;var Y4=function(){return O.apply(this,arguments)||this}; p(Y4,O);Y4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{accountItemSectionRenderer:"ytd-account-item-section-renderer",compactLinkRenderer:"ytd-compact-link-renderer"}}}}; h.Object.defineProperties(Y4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Emb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dmb){var d=document.createElement("template");d.innerHTML="";Dmb=d}d=Dmb;c.call(b, d.content.cloneNode(!0),a.content.firstChild);Emb=a}a=Emb;return a}}}); var Z4=Y4;w([P(W.YtRendererBehavior),x("design:type",Object)],Z4.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],Z4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],Z4.prototype,"data",void 0);w([R({notify:!0}),x("design:type",String)],Z4.prototype,"page",void 0);Z4=w([U({is:"ytd-account-section-list-renderer"})],Z4);var Fmb;var Gmb;var $4=function(){return O.apply(this,arguments)||this}; p($4,O);$4.prototype.dataChanged=function(){if(this.data)this.avatar.onShow()}; h.Object.defineProperties($4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gmb){var a=document.createElement("template");a.innerHTML="\n\n
\n \n \n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fmb){var d=document.createElement("template");d.innerHTML=""; Fmb=d}d=Fmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gmb=a}a=Gmb;return a}}}); var a5=$4;a5.prototype.dataChanged=a5.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],a5.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],a5.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],a5.prototype,"data",void 0);w([AE("#avatar"),x("design:type",Object)],a5.prototype,"avatar",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],a5.prototype,"dataChanged",null);a5=w([U({is:"ytd-active-account-header-renderer"})],a5);var Hmb;var Imb;var b5=function(){var a=O.apply(this,arguments)||this;a.covered=!1;a.hideMenu=!1;a.hasYourDataEntryButton=N("your_data_entrypoint");a.scrolledByTouch=!1;a.scrollbarRework=N("kevlar_scrollbar_rework");a.HIGH_PRIORITY_NOTIFICATION_DISPLAY_TIMEOUT_MS=4E3;return a}; p(b5,O);e=b5.prototype; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{activeAccountHeaderRenderer:"ytd-active-account-header-renderer",flowHeaderRenderer:"yt-flow-header-renderer",simpleMenuHeaderRenderer:"ytd-simple-menu-header-renderer",reportChannelModalHeaderRenderer:"ytd-report-channel-modal-header-renderer"}},"data.sections":{id:"sections",mapping:{additionalContextRenderer:"ytd-report-channel-modal-additional-context-renderer",abuseTypeSelectorRenderer:"ytd-abuse-type-selector-renderer",accountSectionListRenderer:"ytd-account-section-list-renderer", backgroundPromoRenderer:"ytd-background-promo-renderer",commentVideoThumbnailHeaderRenderer:"ytd-comment-video-thumbnail-header-renderer",impersonationScreenRenderer:"ytd-report-channel-modal-impersonation-renderer",itemSectionRenderer:"ytd-comments",messageRenderer:"ytd-message-renderer",multiPageMenuNotificationSectionRenderer:"yt-multi-page-menu-section-renderer",multiPageMenuSectionRenderer:"yt-multi-page-menu-section-renderer",postConfirmationFlowStepRenderer:"yt-post-confirmation-flow-step-renderer", refundConfirmationFlowStepRenderer:"yt-refund-confirmation-flow-step-renderer",selectableVideoListRenderer:"ytd-selectable-video-list-renderer",surveyFlowStepRenderer:"ytd-survey-flow-step-renderer",toggleItemRenderer:"ytd-toggle-item-renderer"},events:!0},"data.footer":{id:"footer",mapping:{multiPageMenuSectionRenderer:"yt-multi-page-menu-section-renderer",reportChannelModalFooterRenderer:"ytd-report-channel-modal-footer-renderer",flowFooterRenderer:"ytd-flow-footer-renderer"}}}}; e.ready=function(){this.$.container.addEventListener("scroll",this.ytRendererBehavior.markDirty.bind(this))}; e.detached=function(){this.unlisten(this,"yt-rendererstamper-finished","focusOnStampFinished_")}; e.focusFirstItem=function(){this.doFocus_();this.listen(this,"yt-rendererstamper-finished","focusOnStampFinished_")}; e.reset=function(){this.closeJobId_&&(Bk.cancelJob(this.closeJobId_),this.closeJobId_=0);this.covered=!1}; e.focusOnStampFinished_=function(a){a.detail.container==this.$.sections&&(this.unlisten(this,"yt-rendererstamper-finished","focusOnStampFinished_"),this.doFocus_())}; e.doFocus_=function(){var a=wI(Polymer.IronFocusablesHelper,this.$.sections);a.length&&a[0].focus()}; e.computeMenuStyle_=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; e.computeHideMenu_=function(a,b){return a||!(!b||!b.showLoadingSpinner)}; e.onPopupClosed_=function(){this.isPopUpOpen=!1;var a=Polymer.dom(this.root).querySelectorAll("yt-multi-page-menu-section-renderer");if(a){a=k(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&(b=Polymer.dom(b.root).querySelectorAll("ytd-notification-renderer"))&&this.setNotificationsSeen_(b)}}; e.onPopupOpened_=function(a,b){this.isPopUpOpen=!0;"ytd-multi-page-menu-renderer"==b.is&&(this.reset(),this.fire("yt-refit"),"MULTI_PAGE_MENU_STYLE_TYPE_REPORT_CHANNEL"===this.data.style&&this.dispatch(ZL({type:"CHANNEL_REPORT_RESET"})))}; e.onYtNavigate_=function(a,b){this.shouldCloseOnNavigateEvent_(b.endpoint)&&this.ytActionSenderBehavior.sendAction("yt-close-all-popups-action")}; e.onServiceRequestSentOrCompleted_=function(a,b){a.detail&&a.detail.endpoint&&a.detail.endpoint.getCommentsFromInboxCommand&&(this.$.spinner.hidden=!1,this.$.header.hidden=!0,this.$.container.hidden=!0,this.$.submenu.hidden=!0);if(b.actions){a=b.actions;b=0;for(var c=a.length;b\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hmb){var d=document.createElement("template");d.innerHTML=""; Hmb=d}d=Hmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Imb=a}a=Imb;return a}}}); var c5=b5;c5.prototype.onRetrieveLocation_=c5.prototype.onRetrieveLocation_;c5.prototype.onSubmenuClosed_=c5.prototype.onSubmenuClosed_;c5.prototype.onMenuBackTap_=c5.prototype.onMenuBackTap_;c5.prototype.onServiceRequestSentOrCompleted_=c5.prototype.onServiceRequestSentOrCompleted_;c5.prototype.onYtNavigate_=c5.prototype.onYtNavigate_;c5.prototype.onPopupOpened_=c5.prototype.onPopupOpened_;c5.prototype.onPopupClosed_=c5.prototype.onPopupClosed_; w([P(W.YtRendererBehavior),x("design:type",Object)],c5.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],c5.prototype,"ytActionSenderBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],c5.prototype,"ytActionHandlerBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],c5.prototype,"ytEventForwardingBehavior",void 0);w([P(Y),x("design:type",Object)],c5.prototype,"ytRendererstamperBehavior",void 0); w([P(JQ.YtdReduxBehavior),x("design:type",Object)],c5.prototype,"ytdReduxBehavior",void 0);w([R({observer:"refitAfterRender_"}),x("design:type",Object)],c5.prototype,"data",void 0);w([R(),x("design:type",Object)],c5.prototype,"covered",void 0);w([R({computed:"computeHideMenu_(covered, data)"}),x("design:type",Object)],c5.prototype,"hideMenu",void 0);w([R({reflectToAttribute:!0,computed:"computeMenuStyle_(data.style)"}),x("design:type",String)],c5.prototype,"menuStyle",void 0); w([R(),x("design:type",Boolean)],c5.prototype,"isPopUpOpen",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],c5.prototype,"hasYourDataEntryButton",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],c5.prototype,"scrolledByTouch",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],c5.prototype,"scrollbarRework",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],c5.prototype,"onPopupClosed_",null); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Element]),x("design:returntype",void 0)],c5.prototype,"onPopupOpened_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],c5.prototype,"onYtNavigate_",null); w([S("yt-service-request-completed"),S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],c5.prototype,"onServiceRequestSentOrCompleted_",null);w([S("yt-menu-back-tapped"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],c5.prototype,"onMenuBackTap_",null); w([S("yt-submenu-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],c5.prototype,"onSubmenuClosed_",null);w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],c5.prototype,"onRetrieveLocation_",null);c5=w([U({is:"ytd-multi-page-menu-renderer"})],c5);var Jmb;var Kmb;var d5=function(){return O.apply(this,arguments)||this}; p(d5,O);d5.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; d5.prototype.onBackTap=function(){this.fire("yt-menu-back-tapped")}; h.Object.defineProperties(d5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kmb){var a=document.createElement("template");a.innerHTML="\n

\n \n

\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jmb){var d=document.createElement("template");d.innerHTML=""; Jmb=d}d=Jmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kmb=a}a=Kmb;return a}}}); var e5=d5;w([P(W.YtRendererBehavior),x("design:type",Object)],e5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],e5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],e5.prototype,"data",void 0);e5=w([U({is:"ytd-simple-menu-header-renderer"})],e5);var Lmb;var Mmb;var Nmb=function(){return O.apply(this,arguments)||this}; p(Nmb,O); h.Object.defineProperties(Nmb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mmb){var a=document.createElement("template");a.innerHTML="\n \n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lmb){var d=document.createElement("template");d.innerHTML=""; Lmb=d}d=Lmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mmb=a}a=Mmb;return a}}}); var f5=Nmb;w([P(W.YtRendererBehavior),x("design:type",Object)],f5.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],f5.prototype,"data",void 0);f5=w([U({is:"ytd-comment-video-thumbnail-header-renderer"})],f5);var Omb;var Pmb;var Qmb=function(){return O.apply(this,arguments)||this}; p(Qmb,O); h.Object.defineProperties(Qmb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Pmb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
[[getSimpleString(data.footer)]]
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Omb){var d=document.createElement("template");d.innerHTML=""; Omb=d}d=Omb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pmb=a}a=Pmb;return a}}}); var g5=Qmb;w([P(W.YtRendererBehavior),x("design:type",Object)],g5.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],g5.prototype,"data",void 0);g5=w([U({is:"ytd-abuse-type-selector-renderer"})],g5);var Rmb;var Smb;Polymer({is:"yt-options-renderer",_template:function(){if(void 0!==Smb)return Smb;var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rmb){var d=document.createElement("template");d.innerHTML=""; Rmb=d}d=Rmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Smb=a}, behaviors:[AO.YtComponentBehavior,W.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},itemSelected_:{type:Number,value:-1},value:{type:Number,computed:"computeItemSelected_(itemSelected_)"},restoreFocusOnClose:{type:Boolean,value:!1},increasedTooltipTarget:{type:Boolean,reflectToAttribute:!0,value:function(){return N("desktop_adjust_touch_target")}}, tooltipTapped:{type:Boolean,reflectToAttribute:!0,value:!1},animationDelay:{type:Number,value:function(){return N("desktop_adjust_touch_target")?0:500}}, preselectedSubreason:{type:Number,value:-1}},listeners:{transitionend:"onPaperRippleTransitionEnd_"},computePreselectedOption:function(a,b){return b===parseInt(this.itemSelected_,10)?a:void 0}, dataChanged_:function(){var a=this;this.preselectedSubreason=this.itemSelected_=-1;this.data.key&&Polymer.RenderStatus.afterNextRender(this,function(){var b=parseInt(a.data.key,10);!Number.isNaN(b)&&(a.itemSelected_=b,b=(b=a.data.items[b])&&b.optionSelectableItemRenderer&&b.optionSelectableItemRenderer.preselectedIndex)&&(a.preselectedSubreason=b)})}, isSubReasonHidden_:function(a,b){return a!=b}, onTopItemSelected_:function(a,b){for(var c=Polymer.dom(this.root).querySelectorAll("paper-listbox"),d=0,f=c.length;d\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tmb){var d=document.createElement("template");d.innerHTML=""; Tmb=d}d=Tmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Umb=a}a=Umb;return a}}}); var i5=h5;w([P(IQ),x("design:type",Object)],i5.prototype,"ytdReduxBehavior",void 0);w([R({observer:"handleAdditionalContextChanged"}),x("design:type",String)],i5.prototype,"additionalContext",void 0);w([R({selector:function(a){return a.reportChannelAbuse.additionalContext}}), x("design:type",String)],i5.prototype,"additionalContextRedux",void 0);w([R(),x("design:type",Object)],i5.prototype,"data",void 0);w([AE("yt-text-input-form-field-renderer"),x("design:type",n0)],i5.prototype,"additionalContextInput",void 0);i5=w([U({is:"ytd-report-channel-modal-additional-context-renderer"})],i5);var Vmb;var Wmb;var j5=function(){var a=O.apply(this,arguments)||this;a.nextButtonDisabled=null;a.submitEndpoint=null;a.navigationEndpoint=null;a.actionMap={"yt-report-form-update":"handleReportFormEndpointUpdateAction","yt-signal-action-submit-form":"handleSignalActionSubmitForm","ytd-report-channel-modal-disable-next-button-action":"handleReportChannelModalDisableNextButtonAction"};return a}; p(j5,O);e=j5.prototype;e.computeNextButtonData=function(a,b,c){var d={};b&&(d.navigationEndpoint=b);c&&(d.serviceEndpoint=c);a&&a.buttonRenderer&&y.extend(d,a.buttonRenderer);return d}; e.handleReportChannelModalDisableNextButtonAction=function(a){this.setNextButtonIsDisabled(a)}; e.handleReportFormEndpointUpdateAction=function(a){this.setNextButtonIsDisabled(!!a.disableSubmitButton);this.resetEndpointData();a.submitEndpoint?this.submitEndpoint=a.submitEndpoint:a.submitNavigationEndpoint&&(this.navigationEndpoint=a.submitNavigationEndpoint)}; e.handleSignalActionSubmitForm=function(){var a,b,c,d,f=Object.keys((null===(a=this.reportChannelAbuseForm)||void 0===a?void 0:a.selectedVideoIds)||{}),g=(null===(b=this.reportChannelAbuseForm)||void 0===b?void 0:b.additionalContext)||"";f={impersonated_channel_url:(null===(c=this.reportChannelAbuseForm)||void 0===c?void 0:c.impersonatedChannelUrl)||"",text:g,video_ids:f};this.ytActionSenderBehavior.sendServiceRequestAction([null===(d=this.data)||void 0===d?void 0:d.submitEndpoint,f]);this.setNextButtonIsDisabled(!0)}; e.onYtServiceRequestCompleted=function(){this.resetEndpointData()}; e.onYtServiceRequestError=function(a){this.setNextButtonIsDisabled(!1);this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.setNextButtonIsDisabled=function(a){this.set("data.nextButton.buttonRenderer.isDisabled",a)}; e.resetEndpointData=function(){this.submitEndpoint=this.navigationEndpoint=null}; h.Object.defineProperties(j5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wmb){var a=document.createElement("template");a.innerHTML="\n\n \n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vmb){var d=document.createElement("template");d.innerHTML=""; Vmb=d}d=Vmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wmb=a}a=Wmb;return a}}}); var k5=j5;k5.prototype.onYtServiceRequestError=k5.prototype.onYtServiceRequestError;k5.prototype.onYtServiceRequestCompleted=k5.prototype.onYtServiceRequestCompleted;w([R(),x("design:type",Object)],k5.prototype,"data",void 0);w([R(),x("design:type",Object)],k5.prototype,"nextButtonDisabled",void 0);w([P(IQ),x("design:type",Object)],k5.prototype,"ytdReduxBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],k5.prototype,"ytActionHandlerBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],k5.prototype,"ytActionSenderBehavior",void 0);w([P(cW),x("design:type",Object)],k5.prototype,"ytOpenToastBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],k5.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],k5.prototype,"submitEndpoint",void 0);w([R(),x("design:type",Object)],k5.prototype,"navigationEndpoint",void 0);w([R({selector:function(a){return a.reportChannelAbuse}}), x("design:type",Object)],k5.prototype,"reportChannelAbuseForm",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],k5.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],k5.prototype,"onYtServiceRequestError",null);k5=w([U({is:"ytd-report-channel-modal-footer-renderer"})],k5);var Xmb;var Ymb;var l5=function(){var a=O.apply(this,arguments)||this;a.boundOnTapDismissButton=function(){a.closePopup()}; return a}; p(l5,O);l5.prototype.configureRendererStamper=function(){return{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapDismissButton]]"}}}}}}; l5.prototype.handleDataChanged=function(){lk(this)}; l5.prototype.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; h.Object.defineProperties(l5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ymb){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.title)]]\n [[getSimpleString(data.subtitle)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xmb){var d=document.createElement("template");d.innerHTML=""; Xmb=d}d=Xmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ymb=a}a=Ymb;return a}}}); var m5=l5;w([R(),x("design:type",Object)],m5.prototype,"boundOnTapDismissButton",void 0);w([R({observer:"handleDataChanged"}),x("design:type",Object)],m5.prototype,"data",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],m5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],m5.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],m5.prototype,"ytActionSenderBehavior",void 0); m5=w([U({is:"ytd-report-channel-modal-header-renderer"})],m5);var Zmb;var $mb;var n5=function(){var a=O.apply(this,arguments)||this;a.autoValidate=!1;a.invalid=!1;a.actionMap={"yt-modify-report-form-command":"handleModifyReportFormCommand"};return a}; p(n5,O);n5.prototype.attached=function(){var a=this;this.impersonatedChannelUrlRedux?(this.impersonatedChannelUrl=this.impersonatedChannelUrlRedux,this.handleImpersonatedChannelUrlChanged(this.impersonatedChannelUrl)):this.impersonatedChannelUrl="";requestAnimationFrame(function(){a.channelUrlInput.focusTextInput()})}; n5.prototype.disableNextButton=function(a){this.ytActionSenderBehavior.sendAction("ytd-report-channel-modal-disable-next-button-action",[a])}; n5.prototype.handleImpersonatedChannelUrlChanged=function(a){var b=this;this.disableNextButton(!0);this.invalid=!1;this.debounce("ytd-report-channel-impersonated-channel-update",function(){var c,d=a.trim();b.ytdReduxBehavior.dispatch(ZL({type:"IMPERSONATED_CHANNEL_URL_UPDATED",payload:d}));(null===(c=b.data)||void 0===c?0:c.submitEndpoint)&&d&&b.ytActionSenderBehavior.sendServiceRequestAction([b.data.submitEndpoint,{impersonated_channel_url:d}])},500)}; n5.prototype.handleModifyReportFormCommand=function(a){this.invalid="REPORT_FORM_ACTION_ENABLE_SUBMIT_BUTTON"!==this.get("modifyReportFormCommand.action",a);this.disableNextButton(this.invalid)}; h.Object.defineProperties(n5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$mb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zmb){var d=document.createElement("template");d.innerHTML=""; Zmb=d}d=Zmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$mb=a}a=$mb;return a}}}); var o5=n5;w([P([V.YtActionSenderBehavior]),x("design:type",Object)],o5.prototype,"ytActionSenderBehavior",void 0);w([P(IQ),x("design:type",Object)],o5.prototype,"ytdReduxBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],o5.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],o5.prototype,"autoValidate",void 0);w([R(),x("design:type",Object)],o5.prototype,"invalid",void 0); w([R({observer:"handleImpersonatedChannelUrlChanged"}),x("design:type",String)],o5.prototype,"impersonatedChannelUrl",void 0);w([R({selector:function(a){return a.reportChannelAbuse.impersonatedChannelUrl}}), x("design:type",String)],o5.prototype,"impersonatedChannelUrlRedux",void 0);w([R(),x("design:type",Object)],o5.prototype,"data",void 0);w([AE("#text-input"),x("design:type",n0)],o5.prototype,"channelUrlInput",void 0);o5=w([U({is:"ytd-report-channel-modal-impersonation-renderer"})],o5);var anb;var bnb;var p5=function(){var a=O.apply(this,arguments)||this;a.monitorScroll=!0;return a}; p(p5,O);p5.prototype.configureRendererStamper=function(){return{"data.selectableVideos":{id:"selectable-videos",mapping:{selectableVideoRenderer:{component:"ytd-selectable-video-renderer"}},events:!0}}}; h.Object.defineProperties(p5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bnb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===anb){var d=document.createElement("template");d.innerHTML=""; anb=d}d=anb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bnb=a}a=bnb;return a}}}); var q5=p5;w([P(W.YtRendererBehavior),x("design:type",Object)],q5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],q5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],q5.prototype,"data",void 0);q5=w([U({is:"ytd-selectable-video-list-renderer"})],q5);var cnb;var dnb;var r5=function(){return O.apply(this,arguments)||this}; p(r5,O);r5.prototype.onCheckboxToggled=function(a){var b,c,d;if(null===(d=null===(c=null===(b=this.data)||void 0===b?void 0:b.video)||void 0===c?void 0:c.videoRenderer)||void 0===d?0:d.videoId){var f=this.data.video.videoRenderer.videoId;this.ytdReduxBehavior.dispatch(a.target.checked?ZL({type:"VIDEO_SELECTED",payload:f}):ZL({type:"VIDEO_UNSELECTED",payload:f}))}}; r5.prototype.configureRendererStamper=function(){return{video:{id:"video",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isPostCompactVideo:!0}}}}}}; h.Object.defineProperties(r5.prototype,{video:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d=null===(a=this.data)||void 0===a?void 0:a.video;if(!d)return{};var f=null===(b=d.videoRenderer)||void 0===b?void 0:b.navigationEndpoint;if(!f)return d;if(null===(c=null===f||void 0===f?void 0:f.commandMetadata)||void 0===c?0:c.webCommandMetadata)f.commandMetadata.webCommandMetadata.ignoreNavigation=!0;return d}}}); h.Object.defineProperties(r5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dnb){var a=document.createElement("template");a.innerHTML="\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cnb){var d=document.createElement("template");d.innerHTML=""; cnb=d}d=cnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dnb=a}a=dnb;return a}}}); var s5=r5;w([R({reflectToAttribute:!0,selector:function(a,b){return b in a.reportChannelAbuse.selectedVideoIds}, selectorArgs:["data.video.videoRenderer.videoId"]}),x("design:type",Boolean)],s5.prototype,"checked",void 0);w([R(),x("design:type",Object)],s5.prototype,"data",void 0);w([zE("data"),x("design:type",Object),x("design:paramtypes",[])],s5.prototype,"video",null);w([P(W.YtRendererBehavior),x("design:type",Object)],s5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],s5.prototype,"ytRendererstamperBehavior",void 0); w([P(IQ),x("design:type",Object)],s5.prototype,"ytdReduxBehavior",void 0);s5=w([U({is:"ytd-selectable-video-renderer"})],s5);var enb;var fnb;iP("multiPageMenuSectionItems","toggleItemRenderer","ytd-toggle-item-renderer");var t5=function(){return O.apply(this,arguments)||this}; p(t5,O);t5.prototype.onChange=function(a){(a=Polymer.dom(a).rootTarget.checked?this.data.toggleOnActions:this.data.toggleOffActions)&&this.ytActionSenderBehavior.sendInnerTubeActions(a,this)}; t5.prototype.isEnabled=function(){return!!this.data.toggleOnActions||!!this.data.toggleOffActions}; h.Object.defineProperties(t5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fnb){var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.label)]]
\n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===enb){var d=document.createElement("template");d.innerHTML=""; enb=d}d=enb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fnb=a}a=fnb;return a}}}); var u5=t5;w([P(W.YtRendererBehavior),x("design:type",Object)],u5.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],u5.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],u5.prototype,"data",void 0);w([R({computed:"isEnabled(data)"}),x("design:type",Boolean)],u5.prototype,"enabled",void 0);u5=w([U({is:"ytd-toggle-item-renderer"})],u5);var gnb;var hnb;var inb=function(){return O.apply(this,arguments)||this}; p(inb,O); h.Object.defineProperties(inb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hnb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gnb){var d=document.createElement("template");d.innerHTML="";gnb=d}d=gnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hnb=a}a=hnb;return a}}}); var v5=inb;w([P(W.YtRendererBehavior),x("design:type",Object)],v5.prototype,"ytRendererBehavior",void 0);w([P(IQ),x("design:type",Object)],v5.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],v5.prototype,"data",void 0);w([R({selector:function(a){return a.ypc.surveyFeedbackData}}), x("design:type",Object)],v5.prototype,"surveyFeedbackData",void 0);v5=w([U({is:"ytd-flow-footer-renderer"})],v5);var jnb;var knb;var w5=function(){var a=O.apply(this,arguments)||this;a.setVisible=!1;a.boundOnSubmitButtonClick=function(){a.onSubmitButtonClick()}; a.actionMap={"yt-survey-flow-step-option-changed":"handleSurveyFlowStepOptionChanged"};return a}; p(w5,O);w5.prototype.configureRendererStamper=function(){return{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnSubmitButtonClick]]"},params:{noink:!0}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0},params:{noink:!0}}}}}}; w5.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; w5.prototype.handleSurveyFlowStepOptionChanged=function(){this.setVisible=!0}; w5.prototype.onSubmitButtonClick=function(){var a;(null===(a=this.data)||void 0===a?0:a.submitEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitEndpoint,{formData:{ypcBrowseFormData:{problemFlowFormData:{surveyFeedbackData:this.surveyFeedbackData}}}}])}; h.Object.defineProperties(w5.prototype,{visibilityHidden:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.hiddenByDefault)&&!this.setVisible}}}); h.Object.defineProperties(w5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===knb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jnb){var d=document.createElement("template");d.innerHTML=""; jnb=d}d=jnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);knb=a}a=knb;return a}}}); var x5=w5;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],x5.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],x5.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],x5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],x5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],x5.prototype,"setVisible",void 0); w([R(),x("design:type",Object)],x5.prototype,"data",void 0);w([R(),x("design:type",Object)],x5.prototype,"surveyFeedbackData",void 0);w([R(),x("design:type",Object)],x5.prototype,"boundOnSubmitButtonClick",void 0);w([R({reflectToAttribute:!0}),zE("data","setVisible"),x("design:type",Object),x("design:paramtypes",[])],x5.prototype,"visibilityHidden",null);x5=w([uO({is:"yt-flow-footer-renderer",noInjection:!0})],x5);var lnb;var mnb;var y5=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-survey-flow-step-option-changed":"handleSurveyFlowStepOptionChanged"};return a}; p(y5,O);y5.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; y5.prototype.handleSurveyFlowStepOptionChanged=function(a){this.ytdReduxBehavior.dispatch(ZL({type:"YPC_UPDATE_SURVEY_FEEDBACK_DATA",payload:a}))}; h.Object.defineProperties(y5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mnb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lnb){var d=document.createElement("template");d.innerHTML="";lnb=d}d=lnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); mnb=a}a=mnb;return a}}}); var z5=y5;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],z5.prototype,"ytActionHandlerBehavior",void 0);w([P(IQ),x("design:type",Object)],z5.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],z5.prototype,"data",void 0);z5=w([U({is:"ytd-survey-flow-step-renderer"})],z5);var nnb;var onb;var A5=function(){return O.apply(this,arguments)||this}; p(A5,O);A5.prototype.selectedItemChanged=function(a){this.ytActionSenderBehavior.sendAction("yt-survey-flow-step-option-changed",[a.feedbackData])}; h.Object.defineProperties(A5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===onb){var a=document.createElement("template");a.innerHTML="\n \n\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nnb){var d=document.createElement("template");d.innerHTML=""; nnb=d}d=nnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);onb=a}a=onb;return a}}}); var B5=A5;B5.prototype.selectedItemChanged=B5.prototype.selectedItemChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],B5.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],B5.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],B5.prototype,"data",void 0);w([R(),x("design:type",Object)],B5.prototype,"selectedItem",void 0); w([yE("selectedItem"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],B5.prototype,"selectedItemChanged",null);B5=w([U({is:"yt-survey-flow-step-renderer"})],B5);var pnb;var qnb;Polymer({is:"yt-multi-page-menu-section-renderer",_template:function(){if(void 0!==qnb)return qnb;var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pnb){var d=document.createElement("template");d.innerHTML=""; pnb=d}d=pnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return qnb=a}, behaviors:[W.YtRendererBehavior,Y,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior],listeners:{"yt-service-request-completed":"onServiceRequestCompleted_"},properties:{data:Object},actionMap:{"yt-broadcast-user-invalidation-action":"updateMenu_","yt-hide-enclosing-action":"handleHideEnclosingAction_"},stampDom:{"data.items":{id:"items",mapping:jP("multiPageMenuSectionItems")}},handleHideEnclosingAction_:function(a){if(this.data&&this.data.items)for(var b=0;b
\n
\n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rnb){var d=document.createElement("template");d.innerHTML=""; rnb=d}d=rnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);snb=a}a=snb;return a}}}); var D5=C5;w([P(W.YtRendererBehavior),x("design:type",Object)],D5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],D5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],D5.prototype,"data",void 0);w([zE("data.progress"),x("design:type",Boolean),x("design:paramtypes",[])],D5.prototype,"showProgressBar",null);w([zE("data.progress"),x("design:type",Number),x("design:paramtypes",[])],D5.prototype,"progress",null); D5=w([uO({is:"yt-flow-header-renderer",noInjection:!0})],D5);var tnb;var unb;var E5=function(){return O.apply(this,arguments)||this}; p(E5,O);E5.prototype.configureRendererStamper=function(){return{"data.text":{id:"text",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}}}; h.Object.defineProperties(E5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===unb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tnb){var d=document.createElement("template");d.innerHTML=""; tnb=d}d=tnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);unb=a}a=unb;return a}}}); var F5=E5;w([P(W.YtRendererBehavior),x("design:type",Object)],F5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],F5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],F5.prototype,"data",void 0);F5=w([uO({is:"yt-post-confirmation-flow-step-renderer",noInjection:!0})],F5);var vnb;var wnb;var G5=function(){return O.apply(this,arguments)||this}; p(G5,O); G5.prototype.configureRendererStamper=function(){return{"data.userInfo":{id:"user-info",mapping:{cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"}}},"data.confirmationText":{id:"confirmation-text",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.confirmationDetailsHeader":{id:"confirmation-details",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.productDetails":{id:"product-details",mapping:{activityItemRenderer:{component:"yt-activity-item-renderer"}}}, "data.billingDetails":{id:"billing-details",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}}}; h.Object.defineProperties(G5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wnb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vnb){var d=document.createElement("template");d.innerHTML=""; vnb=d}d=vnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wnb=a}a=wnb;return a}}}); var H5=G5;w([P(W.YtRendererBehavior),x("design:type",Object)],H5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],H5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],H5.prototype,"data",void 0);H5=w([uO({is:"yt-refund-confirmation-flow-step-renderer",noInjection:!0})],H5);var xnb;var ynb;var I5=function(){return O.apply(this,arguments)||this}; p(I5,O);I5.prototype.created=function(){this.showTooltips=!0}; I5.prototype.computeAccessibility_=function(a){return this.get("accessibility.accessibilityData",a)||null}; I5.prototype.onTap=function(){var a,b,c=this.ytActionSenderBehavior.sendOptionalAction("yt-get-popup-opened-action",["ytd-multi-page-menu-renderer"]);c&&1===c.length&&c[0]?this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]):(null===(a=this.data)||void 0===a?0:a.menuRenderer)?this.ytdOpenPopupBehavior.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:this.data.menuRenderer}}):(null===(b=this.data)||void 0===b?0:b.menuRequest)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.menuRequest])}; h.Object.defineProperties(I5.prototype,{container:{configurable:!0,enumerable:!0,get:function(){return this.$.button}}}); h.Object.defineProperties(I5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ynb){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n"; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xnb){var d=document.createElement("template");d.innerHTML=""; xnb=d}d=xnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ynb=a}a=ynb;return a}}}); var J5=I5;J5.prototype.onTap=J5.prototype.onTap;w([P(W.YtRendererBehavior),x("design:type",Object)],J5.prototype,"ytRendererBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],J5.prototype,"ytdOpenPopupBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],J5.prototype,"ytActionSenderBehavior",void 0);w([P(gP.YtButtonBehavior),x("design:type",Object)],J5.prototype,"ytButtonBehavior",void 0);w([R(),x("design:type",Object)],J5.prototype,"data",void 0); w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],J5.prototype,"onTap",null);J5=w([U({is:"ytd-topbar-menu-button-renderer"})],J5);var znb;var Anb;var K5=function(){return O.apply(this,arguments)||this}; p(K5,O);e=K5.prototype;e.onPopupOpened=function(){this.ytActionSenderBehavior.sendAction("yt-mute-ad-action",["ytd-ad-feedback-renderer",this])}; e.computeConfirmButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.confirmLabel}}; e.computeCancelButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.cancelLabel}}; e.onConfirmTap=function(){var a=this.reasons.selected;void 0!==a&&(a=this.data.reasons[a].endpoint)&&(this.ytActionSenderBehavior.sendServiceRequestAction([a]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action"),this.sendFeedbackSubmitToastAction())}; e.sendFeedbackSubmitToastAction=function(){this.data.completionMessage&&this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:this.data.completionMessage}}}},this])}; e.onCancelTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; h.Object.defineProperties(K5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Anb){var a=document.createElement("template");a.innerHTML="\n\n\n\n \n\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===znb){var d=document.createElement("template");d.innerHTML=""; znb=d}d=znb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Anb=a}a=Anb;return a}}}); var L5=K5;L5.prototype.onPopupOpened=L5.prototype.onPopupOpened;w([P(W.YtRendererBehavior),x("design:type",Object)],L5.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],L5.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],L5.prototype,"data",void 0);w([AE("#reasons"),x("design:type",Object)],L5.prototype,"reasons",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],L5.prototype,"onPopupOpened",null);L5=w([U({is:"ytd-ad-feedback-renderer"})],L5);var Bnb;var Cnb;var M5=function(){return O.apply(this,arguments)||this}; p(M5,O);M5.prototype.computeConfirmButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.confirmLabel}}; M5.prototype.onConfirmTap=function(){this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-ad-info-dialog-renderer"])}; M5.prototype.onPopupClosed=function(){this.data&&this.data.confirmServiceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.confirmServiceEndpoint])}; h.Object.defineProperties(M5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cnb){var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bnb){var d=document.createElement("template");d.innerHTML=""; Bnb=d}d=Bnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cnb=a}a=Cnb;return a}}}); var N5=M5;N5.prototype.onPopupClosed=N5.prototype.onPopupClosed;w([P(W.YtRendererBehavior),x("design:type",Object)],N5.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],N5.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],N5.prototype,"data",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],N5.prototype,"onPopupClosed",null); N5=w([U({is:"ytd-ad-info-dialog-renderer"})],N5);var Dnb;var Enb;var O5=function(){var a=O.apply(this,arguments)||this;a.data=null;a.isError=!1;a.isLoading=!1;return a}; p(O5,O);e=O5.prototype;e.configureRendererStamper=function(){return{"data.createChannelButton":{id:"create-channel-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(){this.set("isLoading",!1);this.set("isError",!1)}; e.onYtServiceRequestSent=function(){this.set("data.createChannelButton.buttonRenderer.isDisabled",!0);this.set("data.cancelButton.buttonRenderer.isDisabled",!0);this.set("isLoading",!0);this.set("isError",!1)}; e.onYtServiceRequestError=function(){this.set("data.createChannelButton.buttonRenderer.isDisabled",!1);this.set("data.cancelButton.buttonRenderer.isDisabled",!1);this.set("isLoading",!1);this.set("isError",!0)}; h.Object.defineProperties(O5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Enb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n \n \n

\n
\n
\n
\n \n \n
\n
\n
[[data.name]]
\n \n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dnb){var d=document.createElement("template");d.innerHTML=""; Dnb=d}d=Dnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Enb=a}a=Enb;return a}}}); var P5=O5;P5.prototype.onYtServiceRequestError=P5.prototype.onYtServiceRequestError;P5.prototype.onYtServiceRequestSent=P5.prototype.onYtServiceRequestSent;w([P(Y),x("design:type",Object)],P5.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],P5.prototype,"data",void 0);w([R(),x("design:type",Object)],P5.prototype,"isError",void 0);w([R(),x("design:type",Object)],P5.prototype,"isLoading",void 0); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],P5.prototype,"onYtServiceRequestSent",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],P5.prototype,"onYtServiceRequestError",null);P5=w([U({is:"ytd-channel-creation-dialog-renderer"})],P5);var Fnb;var Gnb;var Q5=function(){return O.apply(this,arguments)||this}; p(Q5,O);Q5.prototype.configureRendererStamper=function(){return{"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.feedback":{id:"feedback",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties(Q5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gnb){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fnb){var d=document.createElement("template");d.innerHTML=""; Fnb=d}d=Fnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gnb=a}a=Gnb;return a}}}); var R5=Q5;w([P(W.YtRendererBehavior),x("design:type",Object)],R5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],R5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],R5.prototype,"data",void 0);R5=w([U({is:"ytd-channel-switcher-footer-renderer"})],R5);var Hnb;var Inb;var S5=function(){var a=O.apply(this,arguments)||this;a.dontAskAgain=!1;a.boundDontAskAgainChanged=a.dontAskAgainChanged.bind(a);a.boundOnAccountItemTap=a.onAccountItemTap.bind(a);return a}; p(S5,O);e=S5.prototype; e.configureRendererStamper=function(){return{"data.sections":{id:"sections",mapping:{accountItemSectionRenderer:{component:"ytd-account-item-section-renderer",properties:{onAccountItemTap:"[[boundOnAccountItemTap]]"}}}},"data.header":{id:"header",mapping:{simpleMenuHeaderRenderer:"ytd-simple-menu-header-renderer"}},"data.footer":{id:"footer",mapping:{channelSwitcherFooterRenderer:"ytd-channel-switcher-footer-renderer",identityPromptFooterRenderer:{component:"ytd-identity-prompt-footer-renderer",properties:{onDontAskAgainChanged:"[[boundDontAskAgainChanged]]"}}}}}}; e.ready=function(){this.$.container.addEventListener("scroll",this.ytRendererBehavior.markDirty.bind(this))}; e.dontAskAgainChanged=function(a){this.dontAskAgain=a}; e.onAccountItemTap=function(a){if(a){var b={};this.dontAskAgain&&(b={dont_ask_again:this.dontAskAgain});gO(a,b)}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; h.Object.defineProperties(S5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Inb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hnb){var d=document.createElement("template");d.innerHTML=""; Hnb=d}d=Hnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Inb=a}a=Inb;return a}}}); var T5=S5;w([P(W.YtRendererBehavior),x("design:type",Object)],T5.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],T5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],T5.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Boolean)],T5.prototype,"dontAskAgain",void 0);w([R({reflectToAttribute:!1}),x("design:type",Object)],T5.prototype,"boundDontAskAgainChanged",void 0); w([R({reflectToAttribute:!1}),x("design:type",Object)],T5.prototype,"boundOnAccountItemTap",void 0);T5=w([U({is:"ytd-channel-switcher-renderer"})],T5);var Jnb;var Knb;var U5=function(){return O.apply(this,arguments)||this}; p(U5,O);U5.prototype.onIronChange=function(){if(this.checkbox&&this.onDontAskAgainChanged)this.onDontAskAgainChanged(this.checkbox.checked)}; h.Object.defineProperties(U5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Knb){var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jnb){var d=document.createElement("template");d.innerHTML=""; Jnb=d}d=Jnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Knb=a}a=Knb;return a}}}); var V5=U5;V5.prototype.onIronChange=V5.prototype.onIronChange;w([R(),x("design:type",Object)],V5.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Function)],V5.prototype,"onDontAskAgainChanged",void 0);w([AE("#checkbox"),x("design:type",Object)],V5.prototype,"checkbox",void 0);w([S("iron-change"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],V5.prototype,"onIronChange",null);V5=w([U({is:"ytd-identity-prompt-footer-renderer"})],V5);var Lnb;var Mnb;var W5=function(){var a=O.apply(this,arguments)||this;a.data=null;a.isError=!1;a.isLoading=!1;return a}; p(W5,O);e=W5.prototype;e.configureRendererStamper=function(){return{"data.personalAccountTile.selectButton":{id:"personal-account-tile-select-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.brandAccountTile.selectButton":{id:"brand-account-tile-select-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(){this.set("isLoading",!1);this.set("isError",!1)}; e.computeProfileName=function(a){return a?a.givenNameValue+" "+a.familyNameValue:""}; e.onYtServiceRequestSent=function(){this.set("data.personalAccountTile.selectButton.buttonRenderer.isDisabled",!0);this.set("data.brandAccountTile.selectButton.buttonRenderer.isDisabled",!0);this.set("data.cancelButton.buttonRenderer.isDisabled",!0);this.set("isLoading",!0);this.set("isError",!1)}; e.onYtServiceRequestError=function(){this.set("data.personalAccountTile.selectButton.buttonRenderer.isDisabled",!1);this.set("data.brandAccountTile.selectButton.buttonRenderer.isDisabled",!1);this.set("data.cancelButton.buttonRenderer.isDisabled",!1);this.set("isLoading",!1);this.set("isError",!0)}; h.Object.defineProperties(W5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mnb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n \n \n

\n
\n
\n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n \n \n
\n
[[profileName]]
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n
\n \n \n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lnb){var d=document.createElement("template");d.innerHTML=""; Lnb=d}d=Lnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mnb=a}a=Mnb;return a}}}); var X5=W5;X5.prototype.onYtServiceRequestError=X5.prototype.onYtServiceRequestError;X5.prototype.onYtServiceRequestSent=X5.prototype.onYtServiceRequestSent;w([P(Y),x("design:type",Object)],X5.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],X5.prototype,"data",void 0);w([R({computed:"computeProfileName(data.personalAccountTile.contents.createCoreIdentityChannelContentRenderer)"}),x("design:type",String)],X5.prototype,"profileName",void 0); w([R(),x("design:type",Object)],X5.prototype,"isError",void 0);w([R(),x("design:type",Object)],X5.prototype,"isLoading",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],X5.prototype,"onYtServiceRequestSent",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],X5.prototype,"onYtServiceRequestError",null); X5=w([U({is:"ytd-channel-warm-welcome-cont-renderer"})],X5);var Nnb;var Onb;var Y5=function(){var a=O.apply(this,arguments)||this;a.data=null;return a}; p(Y5,O);Y5.prototype.configureRendererStamper=function(){return{"data.nextButton":{id:"next-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; Y5.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("autofocus")||this.setAttribute("autofocus","true")}; h.Object.defineProperties(Y5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Onb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nnb){var d=document.createElement("template");d.innerHTML=""; Nnb=d}d=Nnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Onb=a}a=Onb;return a}}}); var Z5=Y5;w([P(Y),x("design:type",Object)],Z5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],Z5.prototype,"data",void 0);Z5=w([U({is:"ytd-channel-warm-welcome-renderer"})],Z5);var Pnb;var Qnb;var $5=function(){return O.apply(this,arguments)||this}; p($5,O);$5.prototype.configureRendererStamper=function(){return{"data.doneButton":{id:"done-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; h.Object.defineProperties($5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qnb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n \n
\n
\n
\n [[getSimpleString(data.thankYouMessage)]]\n
\n
\n [[getSimpleString(data.additionalInfo)]]\n
\n
\n
\n
\n
\n \n
\n
\n
\n [[getSimpleString(data.creatorMessage.description)]]\n
\n
\n [[getSimpleString(data.creatorMessage.title)]]\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pnb){var d=document.createElement("template");d.innerHTML=""; Pnb=d}d=Pnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qnb=a}a=Qnb;return a}}}); var a6=$5;w([P(Y),x("design:type",Object)],a6.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],a6.prototype,"ytRendererBehavior",void 0);w([R({}),x("design:type",Object)],a6.prototype,"data",void 0);a6=w([U({is:"ytd-donation-post-transaction-renderer"})],a6);var Rnb;var Snb;var b6=function(){return O.apply(this,arguments)||this}; p(b6,O);e=b6.prototype;e.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{checkboxSurveyOptionRenderer:"ytd-checkbox-survey-option-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged_=function(){for(var a=0;a
\n \n \n \n \n
\n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rnb){var d=document.createElement("template");d.innerHTML=""; Rnb=d}d=Rnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Snb=a}a=Snb;return a}}}); var c6=b6;c6.prototype.onOptionChange_=c6.prototype.onOptionChange_;w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],c6.prototype,"ytEventForwardingBehavior",void 0);w([P(Y),x("design:type",Object)],c6.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],c6.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],c6.prototype,"ytRendererBehavior",void 0); w([P(M1a),x("design:type",Object)],c6.prototype,"ytdHatsSurveyBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],c6.prototype,"data",void 0);w([S("ytd-checkbox-survey-option-changed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],c6.prototype,"onOptionChange_",null);c6=w([U({is:"ytd-checkbox-survey-renderer"})],c6);var Tnb;var Unb;var d6=function(){return O.apply(this,arguments)||this}; p(d6,O);e=d6.prototype;e.created=function(){this.selectedFeedbackTokens=new Or}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.configureRendererStamper=function(){return{"data.reasons":{id:"reasons",mapping:{dismissalReasonTextRenderer:"ytd-dismissal-reason-text-renderer",dismissalReasonVideoRenderer:"ytd-dismissal-reason-video-renderer"}}}}; e.dataChanged=function(){this.hasReasonsSelected=!1;this.selectedFeedbackTokens.clear()}; e.onDismissalReasonSelected=function(a,b){this.fire("yt-invalidate-popup-tabbables");this.selectedFeedbackTokens.add(b);this.hasReasonsSelected=!0}; e.onDismissalReasonDeselected=function(a,b){this.fire("yt-invalidate-popup-tabbables");this.selectedFeedbackTokens.remove(b);this.hasReasonsSelected=!this.selectedFeedbackTokens.isEmpty()}; e.onCancelTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; e.onSubmitTap=function(){var a={feedback_tokens:this.selectedFeedbackTokens.getValues()};this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitFeedbackEndpoint,a]);this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; h.Object.defineProperties(d6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Unb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tnb){var d=document.createElement("template");d.innerHTML=""; Tnb=d}d=Tnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Unb=a}a=Unb;return a}}}); var e6=d6;e6.prototype.onDismissalReasonDeselected=e6.prototype.onDismissalReasonDeselected;e6.prototype.onDismissalReasonSelected=e6.prototype.onDismissalReasonSelected;e6.prototype.dataChanged=e6.prototype.dataChanged;w([P(Y),x("design:type",Object)],e6.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],e6.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],e6.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],e6.prototype,"data",void 0);w([R(),x("design:type",Boolean)],e6.prototype,"hasReasonsSelected",void 0);w([R(),x("design:type",Or)],e6.prototype,"selectedFeedbackTokens",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],e6.prototype,"dataChanged",null); w([S("yt-dismissal-reason-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent,String]),x("design:returntype",void 0)],e6.prototype,"onDismissalReasonSelected",null);w([S("yt-dismissal-reason-deselected"),x("design:type",Function),x("design:paramtypes",[CustomEvent,String]),x("design:returntype",void 0)],e6.prototype,"onDismissalReasonDeselected",null);e6=w([U({is:"ytd-dismissal-follow-up-renderer"})],e6);var Vnb;var Wnb;var Xnb=function(){return O.apply(this,arguments)||this}; p(Xnb,O); h.Object.defineProperties(Xnb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wnb){var a=document.createElement("template");a.innerHTML="\n \n\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vnb){var d=document.createElement("template");d.innerHTML="";Vnb=d}d=Vnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); Wnb=a}a=Wnb;return a}}}); var f6=Xnb;w([P(W.YtRendererBehavior),x("design:type",Object)],f6.prototype,"ytRendererBehavior",void 0);w([P(T0a),x("design:type",Object)],f6.prototype,"ytdDismissalReasonBehavior",void 0);w([R(),x("design:type",Object)],f6.prototype,"data",void 0);f6=w([U({is:"ytd-dismissal-reason-text-renderer"})],f6);var Ynb;var Znb;var $nb=function(){return O.apply(this,arguments)||this}; p($nb,O); h.Object.defineProperties($nb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Znb){var a=document.createElement("template");a.innerHTML="\n \n \n\n
\n \n
\n \n \n \n \n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ynb){var d=document.createElement("template");d.innerHTML=""; Ynb=d}d=Ynb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Znb=a}a=Znb;return a}}}); var g6=$nb;w([P(W.YtRendererBehavior),x("design:type",Object)],g6.prototype,"ytRendererBehavior",void 0);w([P(T0a),x("design:type",Object)],g6.prototype,"ytdDismissalReasonBehavior",void 0);w([R(),x("design:type",Object)],g6.prototype,"data",void 0);g6=w([U({is:"ytd-dismissal-reason-video-renderer"})],g6);var aob;var bob;var h6=function(){return O.apply(this,arguments)||this}; p(h6,O);h6.prototype.onCheckedChange=function(){this.multiselect||this.fire("yt-feedback-single-select-changed");this.$.freeform.focus();this.fire("yt-refit")}; h6.prototype.showTextBox=function(a,b){return a&&b}; h6.prototype.dataChanged=function(a){a&&(void 0===a.resultText&&this.set("data.resultText",""),void 0===a.checked&&this.set("data.checked",!1),void 0===a.allowFreeTextInput&&this.set("data.allowFreeTextInput",!1))}; h.Object.defineProperties(h6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bob){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===aob){var d=document.createElement("template");d.innerHTML=""; aob=d}d=aob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bob=a}a=bob;return a}}}); var i6=h6;w([P(W.YtRendererBehavior),x("design:type",Object)],i6.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],i6.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],i6.prototype,"multiselect",void 0);i6=w([U({is:"ytd-feedback-option-renderer"})],i6);var cob;var dob;var j6=function(){return O.apply(this,arguments)||this}; p(j6,O);j6.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{feedbackOptionRenderer:{component:"ytd-feedback-option-renderer",properties:{multiselect:"[[data.multiSelect]]"}}}}}}; j6.prototype.onSingleSelectCheckedChanged=function(a){a=Polymer.dom(a).rootTarget;for(var b=0;b
\n [[getSimpleString(data.question)]]\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cob){var d=document.createElement("template");d.innerHTML=""; cob=d}d=cob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dob=a}a=dob;return a}}}); var k6=j6;k6.prototype.onSingleSelectCheckedChanged=k6.prototype.onSingleSelectCheckedChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],k6.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],k6.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],k6.prototype,"data",void 0); w([S("yt-feedback-single-select-changed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],k6.prototype,"onSingleSelectCheckedChanged",null);k6=w([U({is:"ytd-feedback-question-renderer"})],k6);var eob;var fob;var l6=function(){return O.apply(this,arguments)||this}; p(l6,O);l6.prototype.configureRendererStamper=function(){return{"data.questions":{id:"questions",mapping:{feedbackQuestionRenderer:"ytd-feedback-question-renderer"}}}}; l6.prototype.getSelectedFeedbackResults=function(){for(var a={},b=0;b
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===eob){var d=document.createElement("template");d.innerHTML=""; eob=d}d=eob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fob=a}a=fob;return a}}}); var m6=l6;w([P(V.YtActionSenderBehavior),x("design:type",Object)],m6.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],m6.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],m6.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],m6.prototype,"data",void 0);m6=w([U({is:"ytd-feedback-survey-renderer"})],m6);var gob;var hob;var n6=function(){return O.apply(this,arguments)||this}; p(n6,O);n6.prototype.computeAlt=function(a){return CL(a)}; n6.prototype.submitResponse=function(){this.data&&this.data.submissionEndpoint&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submissionEndpoint]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-single-option-survey-renderer"]))}; n6.prototype.onTap=function(){this.vertical&&this.submitResponse()}; h.Object.defineProperties(n6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hob){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gob){var d=document.createElement("template");d.innerHTML=""; gob=d}d=gob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hob=a}a=hob;return a}}}); var o6=n6;o6.prototype.onTap=o6.prototype.onTap;w([P(W.YtRendererBehavior),x("design:type",Object)],o6.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],o6.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],o6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],o6.prototype,"vertical",void 0); w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o6.prototype,"onTap",null);o6=w([U({is:"ytd-single-option-survey-option-renderer"})],o6);var iob;var job;var p6=function(){return O.apply(this,arguments)||this}; p(p6,O);e=p6.prototype;e.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{singleOptionSurveyOptionRenderer:{component:"ytd-single-option-survey-option-renderer",properties:{vertical:"[[vertical]]"}}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(a){this.vertical="VERTICAL"===(a&&a.surveyOrientation&&a.surveyOrientation.type||"HORIZONTAL")}; e.computeAlt=function(a){return CL(a)}; e.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action");this.ytActionSenderBehavior.sendServiceRequestAction([this.data.dismissalEndpoint])}; h.Object.defineProperties(p6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===job){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===iob){var d=document.createElement("template");d.innerHTML=""; iob=d}d=iob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);job=a}a=job;return a}}}); var q6=p6;w([P(V.YtActionSenderBehavior),x("design:type",Object)],q6.prototype,"ytActionSenderBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],q6.prototype,"eventForwardingBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],q6.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],q6.prototype,"ytRendererstamperBehavior",void 0);w([P(M1a),x("design:type",Object)],q6.prototype,"ytdHatsSurveyBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],q6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],q6.prototype,"vertical",void 0);q6=w([U({is:"ytd-single-option-survey-renderer"})],q6);var kob;var lob;var r6=function(){return O.apply(this,arguments)||this}; p(r6,O);r6.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; r6.prototype.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; r6.prototype.onNavigate=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; h.Object.defineProperties(r6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lob){var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kob){var d=document.createElement("template");d.innerHTML=""; kob=d}d=kob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lob=a}a=lob;return a}}}); var s6=r6;s6.prototype.onNavigate=s6.prototype.onNavigate;w([P(W.YtRendererBehavior),x("design:type",Object)],s6.prototype,"ytRendererBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],s6.prototype,"ytEventForwardingBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],s6.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],s6.prototype,"data",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],s6.prototype,"onNavigate",null);s6=w([U({is:"ytd-survey-follow-up-renderer"})],s6);var mob;var nob;var t6=function(){return O.apply(this,arguments)||this}; p(t6,O);e=t6.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.$.scroller.dialogElement=this.parentNode}; e.dataChanged_=function(){var a=this;this.$.description.value="";this.seconds_=this.minutes_=this.$["full-name"].value="";this.toggleSubmitButton_(!1);this.showTimestamp_&&aN(this).getPlayerPromise().then(function(b){b=b.getCurrentTime();a.minutes_=Math.floor(b/60).toString();a.seconds_=(Math.floor(b)%60).toString()})}; e.onTapSubmit_=function(a){a.stopPropagation();this.serviceEndpoint_&&(a={flag_description:this.descriptionText_.trim(),flag_issue_type:this.issueType_,flag_affiliation:this.affiliation_},this.fullNameText_&&(a.flag_full_name=this.fullNameText_.trim()),this.showTimestamp_&&(a.minutes=this.minutes_,a.seconds=this.seconds_),this.ytActionSenderBehavior.sendServiceRequestAction([this.serviceEndpoint_,a]))}; e.onYtServiceRequestSent_=function(){this.toggleSubmitButton_(!1)}; e.onYtServiceRequestCompleted_=function(a,b){var c;b=b.actions;if(Array.isArray(b))for(var d=0,f=b.length;d

[[getSimpleString(data.title)]]

\n\n \n
\n \n \n \n \n \n
\n \n \n \n \n \n \n
[[getSimpleString(data.nameSubtext)]]
\n
[[getSimpleString(data.footerText)]]
\n
\n
\n
[[getSimpleString(data.requiredLabel)]]
\n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mob){var d=document.createElement("template");d.innerHTML=""; mob=d}d=mob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nob=a}a=nob;return a}}}); var u6=t6;u6.prototype.handleInput_=u6.prototype.handleInput_;u6.prototype.onYtServiceRequestError_=u6.prototype.onYtServiceRequestError_;u6.prototype.onYtServiceRequestCompleted_=u6.prototype.onYtServiceRequestCompleted_;u6.prototype.onYtServiceRequestSent_=u6.prototype.onYtServiceRequestSent_;w([P(aP.YtOpenPopupBehavior),x("design:type",Object)],u6.prototype,"ytOpenPopupBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],u6.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],u6.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],u6.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],u6.prototype,"data",void 0);w([R({computed:"computeShowTimestamp_(data.timestampLabel)"}),x("design:type",Boolean)],u6.prototype,"showTimestamp_",void 0); w([R({readOnly:!0,computed:"computeServiceEndpoint_(data)"}),x("design:type",Object)],u6.prototype,"serviceEndpoint_",void 0);w([R({computed:"computeSubmitButton_(data)"}),x("design:type",Object)],u6.prototype,"submitButton_",void 0);w([R(),x("design:type",String)],u6.prototype,"descriptionText_",void 0);w([R(),x("design:type",Number)],u6.prototype,"issueType_",void 0);w([R(),x("design:type",Number)],u6.prototype,"affiliation_",void 0); w([R(),x("design:type",String)],u6.prototype,"fullNameText_",void 0);w([R(),x("design:type",String)],u6.prototype,"minutes_",void 0);w([R(),x("design:type",String)],u6.prototype,"seconds_",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],u6.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],u6.prototype,"onYtServiceRequestCompleted_",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],u6.prototype,"onYtServiceRequestError_",null); w([yE("descriptionText_","issueType_","affiliation_","fullNameText_","minutes_","seconds_"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u6.prototype,"handleInput_",null);u6=w([U({is:"ytd-legal-report-details-form-renderer"})],u6);var oob;var pob;var v6=function(){var a=O.apply(this,arguments)||this;a.polymer2="Element"in Polymer;return a}; p(v6,O);v6.prototype.ready=function(){this.secondsEl.addEventListener("blur",this.formatSeconds.bind(this))}; v6.prototype.secondsChanged=function(){this.secondsEl.focused||this.formatSeconds()}; v6.prototype.formatSeconds=function(){1===this.seconds.length&&(this.seconds="0"+this.seconds)}; h.Object.defineProperties(v6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pob){var a=document.createElement("template");a.innerHTML="\n\n : \n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===oob){var d=document.createElement("template");d.innerHTML=""; oob=d}d=oob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);pob=a}a=pob;return a}}}); var w6=v6;w6.prototype.secondsChanged=w6.prototype.secondsChanged;w([R({notify:!0}),x("design:type",String)],w6.prototype,"minutes",void 0);w([R({notify:!0}),x("design:type",String)],w6.prototype,"seconds",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],w6.prototype,"polymer2",void 0);w([AE("#seconds"),x("design:type",Object)],w6.prototype,"secondsEl",void 0); w([yE("seconds"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],w6.prototype,"secondsChanged",null);w6=w([uO({is:"yt-timestamp-input",noInjection:!0,notifyObserversOnUndefined:!1})],w6);var qob;var rob;var x6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm","yt-signal-action-submit-popup-form-fields":"handleSignalActionSubmitPopupFormFields"};return a}; p(x6,O);e=x6.prototype;e.configureRendererStamper=function(){return{"data.form":{id:"form",mapping:{formRenderer:"yt-form-renderer"}},"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.handleSignalActionSubmitForm=function(){if(this.formRenderer){var a=this.formRenderer.getForm();a&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitEndpoint,a]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action"))}}; e.handleSignalActionSubmitPopupFormFields=function(){this.formRenderer&&(this.formRenderer.submitFormFields(),this.ytActionSenderBehavior.sendAction("yt-close-popup-action"))}; e.onPopupClosed=function(){this.formRenderer&&this.formRenderer.reset()}; e.onPopupOpened=function(){this.fire("yt-invalidate-popup-tabbables")}; e.onYtServiceRequestCompleted=function(a,b){b.data&&b.data.success&&(this.set("data.buttons.1.buttonRenderer.isDisabled",!1),this.fire("yt-invalidate-popup-tabbables"))}; h.Object.defineProperties(x6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rob){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qob){var d=document.createElement("template");d.innerHTML=""; qob=d}d=qob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rob=a}a=rob;return a}}}); var y6=x6;y6.prototype.onYtServiceRequestCompleted=y6.prototype.onYtServiceRequestCompleted;y6.prototype.onPopupOpened=y6.prototype.onPopupOpened;y6.prototype.onPopupClosed=y6.prototype.onPopupClosed;w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],y6.prototype,"ytEventForwardingBehavior",void 0);w([P(Y),x("design:type",Object)],y6.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],y6.prototype,"ytActionSenderBehavior",void 0); w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],y6.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],y6.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],y6.prototype,"data",void 0);w([AE("yt-form-renderer"),x("design:type",k_)],y6.prototype,"formRenderer",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y6.prototype,"onPopupClosed",null); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y6.prototype,"onPopupOpened",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],y6.prototype,"onYtServiceRequestCompleted",null);y6=w([U({is:"ytd-form-popup-renderer"})],y6);var sob;var tob;var z6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-share-panel-reset-action":"onReset"};return a}; p(z6,O);z6.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; z6.prototype.configureRendererStamper=function(){return{"data.contacts":{id:"contents",mapping:{enrolledContactRenderer:{component:"yt-enrolled-contact-renderer",attributes:{role:"checkbox"}},suggestedContactRenderer:{component:"yt-suggested-contact-renderer",attributes:{role:"checkbox"}}}}}}; z6.prototype.onDataChanged=function(){this.data&&this.data.selectMessageRenderer&&this.data.selectMessageRenderer.contactSelectMessageRenderer&&this.ytActionSenderBehavior.sendAction("yt-share-panel-set-select-message-renderer-action",[this.data.selectMessageRenderer.contactSelectMessageRenderer])}; z6.prototype.onReset=function(){for(var a=this.$.contents.getElementsByClassName("selected"),b=a.length-1;0<=b;b--)a[b].classList.toggle("selected")}; h.Object.defineProperties(z6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tob){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===sob){var d=document.createElement("template");d.innerHTML=""; sob=d}d=sob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tob=a}a=tob;return a}}}); var A6=z6;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],A6.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],A6.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],A6.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],A6.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],A6.prototype,"data",void 0); A6=w([uO({is:"yt-contact-section-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],A6);var uob;var vob;var B6=function(){return O.apply(this,arguments)||this}; p(B6,O);B6.prototype.onDataChanged=function(){if(this.thumbnail)this.thumbnail.onShow()}; B6.prototype.onFocus=function(){"none"===this.getComputedStyleValue("pointer-events")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}; B6.prototype.onTap=function(a){if(this.classList.contains("selected")||this.ytActionSenderBehavior.sendSingletonAction("yt-share-panel-can-select-contact-action"))a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur(),(a=this.classList.toggle("selected"))?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),a={name:this.componentTitle,id:this.data.contactId,isGroup:!1,isSuggested:!1,serialization:a?this.data.serializedContactInvitee:null,undoFn:this.onTap.bind(this)}, this.ytActionSenderBehavior.sendAction("yt-share-panel-select-contact-action",[a])}; h.Object.defineProperties(B6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vob){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===uob){var d=document.createElement("template");d.innerHTML=""; uob=d}d=uob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vob=a}a=vob;return a}}}); var C6=B6;w([P(V.YtActionSenderBehavior),x("design:type",Object)],C6.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],C6.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],C6.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"getSimpleString(data.name)"}),x("design:type",String)],C6.prototype,"componentTitle",void 0);w([AE("#thumbnail"),x("design:type",Object)],C6.prototype,"thumbnail",void 0); C6=w([uO({is:"yt-enrolled-contact-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],C6);var wob;var xob;var D6=function(){return O.apply(this,arguments)||this}; p(D6,O);D6.prototype.onDataChanged=function(){if(this.thumbnail)this.thumbnail.onShow()}; D6.prototype.onFocus=function(){"none"===this.getComputedStyleValue("pointer-events")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}; D6.prototype.onTap=function(a){if(this.classList.contains("selected")||this.ytActionSenderBehavior.sendSingletonAction("yt-share-panel-can-select-contact-action"))a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur(),(a=this.classList.toggle("selected"))?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),a={name:this.componentTitle,id:this.data.contactId,isGroup:!1,isSuggested:!0,serialization:a?this.data.serializedSuggestedContact:null,undoFn:this.onTap.bind(this)}, this.ytActionSenderBehavior.sendAction("yt-share-panel-select-contact-action",[a])}; h.Object.defineProperties(D6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xob){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wob){var d=document.createElement("template");d.innerHTML=""; wob=d}d=wob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xob=a}a=xob;return a}}}); var E6=D6;w([P(V.YtActionSenderBehavior),x("design:type",Object)],E6.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],E6.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],E6.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"getSimpleString(data.name)"}),x("design:type",String)],E6.prototype,"componentTitle",void 0);w([AE("#thumbnail"),x("design:type",Object)],E6.prototype,"thumbnail",void 0); E6=w([uO({is:"yt-suggested-contact-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],E6);var yob;var zob;var F6=function(){var a=O.apply(this,arguments)||this;a.isLoading=!1;return a}; p(F6,O);e=F6.prototype;e.configureRendererStamper=function(){return{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.linkButton":{id:"link-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable&&(this.scrollable.dialogElement=this.parentNode);uLa(this)}; e.onYtServiceRequestSent=function(){this.isLoading=!0}; e.onYtServiceRequestCompleted=function(){this.closeDialog()}; e.onYtServiceRequestError=function(a){this.closeDialog();this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.onDomChange=function(){this.ytRendererBehavior.markDirty()}; e.closeDialog=function(){this.isLoading=!1;this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-connect-gpg-dialog-renderer"])}; h.Object.defineProperties(F6.prototype,{hasDescription:{configurable:!0,enumerable:!0,get:function(){return!(!this.data||!this.data.description)}}}); h.Object.defineProperties(F6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zob){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yob){var d=document.createElement("template");d.innerHTML=""; yob=d}d=yob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zob=a}a=zob;return a}}}); var G6=F6;G6.prototype.onDomChange=G6.prototype.onDomChange;G6.prototype.onYtServiceRequestError=G6.prototype.onYtServiceRequestError;G6.prototype.onYtServiceRequestCompleted=G6.prototype.onYtServiceRequestCompleted;G6.prototype.onYtServiceRequestSent=G6.prototype.onYtServiceRequestSent;w([P(Y),x("design:type",Object)],G6.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],G6.prototype,"ytRendererBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],G6.prototype,"ytActionSenderBehavior",void 0);w([P(cW),x("design:type",Object)],G6.prototype,"ytOpenToastBehavior",void 0);w([R(),x("design:type",Object)],G6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],G6.prototype,"isLoading",void 0);w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],G6.prototype,"hasDescription",null); w([AE("paper-dialog-scrollable"),x("design:type",Object)],G6.prototype,"scrollable",void 0);w([AE("#header"),x("design:type",HTMLElement)],G6.prototype,"header",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],G6.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],G6.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],G6.prototype,"onYtServiceRequestError",null);w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],G6.prototype,"onDomChange",null); G6=w([U({is:"ytd-connect-gpg-dialog-renderer"})],G6);var Aob;var Bob;var H6=function(){var a=O.apply(this,arguments)||this;a.isLoading=!1;return a}; p(H6,O);e=H6.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");uLa(this)}; e.onYtServiceRequestSent=function(){this.isLoading=!0}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-gaming-account-link-confirm-dialog-renderer"])}; e.fireOnCloseActions=function(){this.isLoading=!1;this.data&&this.data.onClosedActions&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onClosedActions,this)}; e.closePopupHandler=function(){this.fireOnCloseActions()}; e.onHeaderImageChanged=function(){if(this.data){this.data.headerImage?this.setAttribute("dialog-with-header-image",""):this.removeAttribute("dialog-with-header-image");var a=this.get("data.headerImage.thumbnails");a&&(a=MO(a,this.clientWidth),this.$.header.style.backgroundImage="url("+a+")")}}; e.onYtNavigate=function(a){(a=Polymer.dom(a).rootTarget)&&a.parentElement===this.$["confirm-button"]&&this.parentElement&&this.parentElement.close()}; h.Object.defineProperties(H6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Bob){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n
\n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Aob){var d=document.createElement("template");d.innerHTML=""; Aob=d}d=Aob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bob=a}a=Bob;return a}}}); var I6=H6;I6.prototype.onYtNavigate=I6.prototype.onYtNavigate;I6.prototype.onHeaderImageChanged=I6.prototype.onHeaderImageChanged;I6.prototype.closePopupHandler=I6.prototype.closePopupHandler;I6.prototype.onYtServiceRequestCompleted=I6.prototype.onYtServiceRequestCompleted;I6.prototype.onYtServiceRequestSent=I6.prototype.onYtServiceRequestSent;w([P(V.YtActionSenderBehavior),x("design:type",Object)],I6.prototype,"ytActionSenderBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],I6.prototype,"ytRendererBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],I6.prototype,"ytEventForwardingBehavior",void 0);w([R(),x("design:type",Object)],I6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],I6.prototype,"isLoading",void 0); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],I6.prototype,"onYtServiceRequestSent",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],I6.prototype,"onYtServiceRequestCompleted",null); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],I6.prototype,"closePopupHandler",null);w([yE("data.headerImage"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],I6.prototype,"onHeaderImageChanged",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],I6.prototype,"onYtNavigate",null); I6=w([U({is:"ytd-gaming-account-link-confirm-dialog-renderer"})],I6);var Cob;var Dob;var J6=function(){var a=O.apply(this,arguments)||this;a.isLoading=!1;return a}; p(J6,O);e=J6.prototype;e.configureRendererStamper=function(){return{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.linkButton":{id:"link-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable&&(this.scrollable.dialogElement=this.parentNode);uLa(this)}; e.onYtServiceRequestSent=function(){this.isLoading=!0}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-gaming-account-link-setting-renderer"])}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.onDomChange=function(){this.ytRendererBehavior.markDirty()}; e.onDataChanged=function(){this.isLoading=!1;var a=this.get("data.headerImage.thumbnails");a&&(a=MO(a,this.clientWidth),this.header.style.backgroundImage="url("+a+")");a=On();var b=Nn(),c=this.get("data.trackingParams");c&&b&&a&&NJ(a,b,In(c))}; h.Object.defineProperties(J6.prototype,{hasDescription:{configurable:!0,enumerable:!0,get:function(){return!(!this.data||!this.data.descriptions)}}}); h.Object.defineProperties(J6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Dob){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n
\n
\n
\n
\n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Cob){var d=document.createElement("template");d.innerHTML=""; Cob=d}d=Cob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Dob=a}a=Dob;return a}}}); var K6=J6;K6.prototype.onDataChanged=K6.prototype.onDataChanged;K6.prototype.onDomChange=K6.prototype.onDomChange;K6.prototype.onYtServiceRequestError=K6.prototype.onYtServiceRequestError;K6.prototype.onYtServiceRequestCompleted=K6.prototype.onYtServiceRequestCompleted;K6.prototype.onYtServiceRequestSent=K6.prototype.onYtServiceRequestSent;w([P(Y),x("design:type",Object)],K6.prototype,"ytRendererstamperBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],K6.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],K6.prototype,"ytActionSenderBehavior",void 0);w([P(cW),x("design:type",Object)],K6.prototype,"ytOpenToastBehavior",void 0);w([R(),x("design:type",Object)],K6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],K6.prototype,"isLoading",void 0); w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],K6.prototype,"hasDescription",null);w([AE("paper-dialog-scrollable"),x("design:type",Object)],K6.prototype,"scrollable",void 0);w([AE("#header"),x("design:type",HTMLElement)],K6.prototype,"header",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onYtServiceRequestError",null);w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onDomChange",null); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],K6.prototype,"onDataChanged",null);K6=w([U({is:"ytd-gaming-account-link-setting-renderer"})],K6);var Eob;var Fob;var L6=function(){return O.apply(this,arguments)||this}; p(L6,O);e=L6.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("role")||this.setAttribute("role","dialog");this.hasAttribute("aria-modal")||this.setAttribute("aria-modal","true")}; e.ready=function(){var a=On(),b=Nn(),c=this.data.trackingParams;c&&b&&a&&NJ(a,b,In(c))}; e.getParentElement=function(a){var b=this.ytRendererBehavior.parentComponent;return b&&b.querySelector(a)}; e.openPopupHandler=function(a){var b=this;a.currentTarget===this&&(Ci(function(){b.focus()}),(a=this.getParentElement("#content"))&&a.setAttribute("aria-hidden","true"))}; e.closeDialog=function(){this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-queue-to-play-dialog-renderer"])}; e.onPopupClosed=function(a){a.currentTarget===this&&(a=this.getParentElement("#content"),this.getParentElement("ytd-queue-to-play-state-renderer"),a&&(a.setAttribute("aria-hidden","false"),this.actionSenderBehavior.sendAction("yt-focus-queue-to-play-state-renderer")))}; h.Object.defineProperties(L6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Fob){var a=document.createElement("template");a.innerHTML="

[[getSimpleString(data.title)]]

\n
\n \n
\n
    \n \n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Eob){var d=document.createElement("template");d.innerHTML=""; Eob=d}d=Eob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fob=a}a=Fob;return a}}}); var M6=L6;M6.prototype.onPopupClosed=M6.prototype.onPopupClosed;M6.prototype.openPopupHandler=M6.prototype.openPopupHandler;w([P(W.YtRendererBehavior),x("design:type",Object)],M6.prototype,"ytRendererBehavior",void 0);w([P([V.YtActionSenderBehavior]),x("design:type",Object)],M6.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],M6.prototype,"data",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],M6.prototype,"openPopupHandler",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],M6.prototype,"onPopupClosed",null);M6=w([U({is:"ytd-queue-to-play-dialog-renderer"})],M6);var Gob;var Hob;Polymer({is:"yt-confirm-dialog-renderer",_template:function(){if(void 0!==Hob)return Hob;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gob){var d=document.createElement("template");d.innerHTML=""; Gob=d}d=Gob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Hob=a}, hostAttributes:{dialog:!0},properties:{data:Object,primaryIsCancel:{type:Object,computed:"computePrimaryIsCancel_(data.primaryIsCancel)",reflectToAttribute:!0,readOnly:!0},isCancelButtonHidden:{type:Object,computed:"computeIsCancelButtonHidden_(data)",readOnly:!0},useOverlayForSpinner_:{type:Boolean,value:!1,computed:"computeUseOverlayForSpinner_(data.showLoadingSpinnerOnAction, isActionInProgress_)",reflectToAttribute:!0},showSpinner_:{type:Boolean,value:!1,computed:"computeShowSpinner_(useOverlayForSpinner_, data.showLoadingSpinner)"}, isActionInProgress_:{type:Boolean,value:!1}},observers:["onHeaderImageChanged_(data.headerImage)","onThumbnailChanged_(data.thumbnail)"],behaviors:[W.YtRendererBehavior,YP.YtEventForwardingBehavior],listeners:{"yt-img-shadow-loaded":"onThumbnailLoaded_","yt-navigate":"onYtNavigate_","yt-popup-opened":"openPopupHandler_","yt-popup-closed":"closePopupHandler_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_"},attached:function(){var a= this;this.$.scroller.dialogElement=this.parentNode;window.requestAnimationFrame(function(){a.$.thumbnail.onShow()})}, computeUseOverlayForSpinner_:function(a,b){return!!a&&b}, computeShowSpinner_:function(a,b){return a||!!b}, fireOnCloseActions_:function(){this.data.onClosedActions&&this.sendInnerTubeActions(this.data.onClosedActions,this)}, fireOnOpenCommands_:function(a){this.data.onOpenCommands&&(a.stopImmediatePropagation(),this.sendInnerTubeActions(this.data.onOpenCommands,this))}, fireOnDismissCommands_:function(a){this.data.onDismissCommands&&(a.stopImmediatePropagation(),this.sendInnerTubeActions(this.data.onDismissCommands,this))}, openPopupHandler_:function(a){a.detail==this&&this.fireOnOpenCommands_(a)}, closePopupHandler_:function(a,b){this.sendOptionalAction("yt-confirm-dialog-close-action",[b]);this.fireOnCloseActions_();(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.fireOnDismissCommands_(a)}, onHeaderImageChanged_:function(a){a?this.setAttribute("dialog-with-header-image",""):this.removeAttribute("dialog-with-header-image")}, onThumbnailChanged_:function(a){a?(this.setAttribute("dialog-with-thumbnail",""),this.$.scroller.scrollTarget.style.maxHeight="139px"):(this.removeAttribute("dialog-with-thumbnail"),this.$.scroller.scrollTarget.style.maxHeight="none")}, onYtNavigate_:function(a){a=Polymer.dom(a).rootTarget;Polymer.dom(this.$["confirm-button"]).deepContains(a)&&this.parentElement.close()}, computePrimaryIsCancel_:function(a){return a}, computeIsCancelButtonHidden_:function(a){return a.skipCancelButton||!a.cancelButton}, onThumbnailLoaded_:function(){this.parentElement&&this.parentElement.fit()}, onYtServiceRequestSent_:function(){this.isActionInProgress_=!0}, onYtServiceRequestCompleted_:function(){this.data.showLoadingSpinnerOnAction&&this.parentElement&&this.parentElement.close&&this.parentElement.opened&&this.parentElement.close();this.isActionInProgress_=!1}});var Iob;var Job;var N6=function(){var a=O.apply(this,arguments)||this;a.userToggled_=!1;return a}; p(N6,O);e=N6.prototype;e.getItemsPath=function(){return"data.expandableItems"}; e.configureRendererStamper=function(){return{shownItems:{id:"expandable-items",mapping:{guideEntryRenderer:{component:"ytd-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"},noInjection:!0}}}}}; e.onExpanderItemTapped_=function(a){this._setExpanded(!0);this.userToggled_=!0;this.ytLazyListBehavior.fillRemainingListItems();a.preventDefault()}; e.onCollapserItemTapped_=function(a){this._setExpanded(!1);this.userToggled_=!0;a.preventDefault()}; e.observeActiveEndpoint_=function(){for(var a=this.activeEndpoint,b=this.data,c=this.$["expandable-items"].children,d=0,f=c.length;d\n\n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Iob){var d=document.createElement("template");d.innerHTML=""; Iob=d}d=Iob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Job=a}a=Job;return a}}}); var O6=N6;O6.prototype.observeActiveEndpoint_=O6.prototype.observeActiveEndpoint_;w([P(W.YtRendererBehavior),x("design:type",Object)],O6.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],O6.prototype,"ytRendererstamperBehavior",void 0);w([P(MQ),x("design:type",Object)],O6.prototype,"ytLazyListBehavior",void 0);w([R(),x("design:type",Object)],O6.prototype,"data",void 0);w([R({readOnly:!0,reflectToAttribute:!0}),x("design:type",Boolean)],O6.prototype,"expanded",void 0); w([R({value:0}),x("design:type",Number)],O6.prototype,"initialCount",void 0);w([R(),x("design:type",Object)],O6.prototype,"activeEndpoint",void 0);w([yE("data","activeEndpoint","canShowMore"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],O6.prototype,"observeActiveEndpoint_",null);O6=w([U({is:"ytd-guide-collapsible-entry-renderer"})],O6);var Kob;var Lob;var P6=function(){return O.apply(this,arguments)||this}; p(P6,O);e=P6.prototype;e.prepareSubsHintActions=function(){if(N("kevlar_mysubs_edu")&&this.active&&this.guideOpened){var a=this.componentBehavior.getInterfaceForTs("ytd-page-manager");a&&(a=a.getCurrentPage())&&"filteredsubscriptions"===a.pageSubtype&&this.set("data.targetId","subs-filtered-by-channel")}}; e.triggerHintActions=function(){var a=this;this.data&&this.data.hintActions&&yk(this.taskEmitterBehavior.getTaskManager(),function(){var b=a.actionSenderBehavior.sendOptionalAction("yt-get-opened-popups-action");!(b&&1===b.length?b[0]:[]).some(function(c){c=c.openPopupAction.popupType;return"SURVEY"===c||"MEALBAR"===c||"HINT"===c})&&a.data.hintActions&&a.guideOpened&&(a.actionSenderBehavior.sendInnerTubeActions(a.data.hintActions,a),a.data.hintActions=void 0)})}; e.prepareHintActions=function(){if(!N("kevlar_nitrate_driven_tooltips")&&this.data.targetId){var a=this.data.targetId;a&&(a=NM(a))&&this.set("data.hintActions",a)}}; e.getIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; e.getBadgeIconType=function(a){return a&&a.liveBroadcasting?"live":null}; e.onTap=function(a){this.data.serviceEndpoint?(this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),a.preventDefault()):this.data.navigationEndpoint&&!RR(Polymer.dom(a).path||[],this,["A".toString()])&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})}; e.computeActive=function(a,b){var c,d,f,g;if(!a||!b)return!1;if(a.browseEndpoint&&b.browseEndpoint)return a=a.browseEndpoint.browseId,b=b.browseEndpoint.browseId,void 0!==a&&void 0!==b&&(a===b||"VLWL"===a&&"FEwatch_later"===b||"FEwatch_later"===a&&"VLWL"===b);a=null===(d=null===(c=a.commandMetadata)||void 0===c?void 0:c.webCommandMetadata)||void 0===d?void 0:d.url;b=null===(g=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===g?void 0:g.url;return!(!a||!b||a!==b&&a!== Ad(b))}; e.computeIsPrimary=function(a){return!!a}; h.Object.defineProperties(P6.prototype,{active:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.computeActive(this.data.navigationEndpoint,this.activeEndpoint)}}, isPrimary:{configurable:!0,enumerable:!0,get:function(){return this.computeIsPrimary(this.data.isPrimary)}}, lineEndStyle:{configurable:!0,enumerable:!0,get:function(){return this.data?this.data.badges&&this.getBadgeIconType(this.data.badges)?"badge":"GUIDE_ENTRY_PRESENTATION_STYLE_NEW_CONTENT"===this.data.presentationStyle?"dot":this.data.count?"count":"none":"none"}}, ariaLabel:{configurable:!0,enumerable:!0,get:function(){var a=this.get("data.accessibility.accessibilityData.label");if("none"!==this.lineEndStyle&&a)return a}}, ariaSelected:{configurable:!0,enumerable:!0,get:function(){return this.active.toString()}}}); h.Object.defineProperties(P6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Lob){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n [[data.count]]\n \n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Kob){var d=document.createElement("template");d.innerHTML=""; Kob=d}d=Kob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lob=a}a=Lob;return a}}}); var Q6=P6;Q6.prototype.onTap=Q6.prototype.onTap;Q6.prototype.prepareHintActions=Q6.prototype.prepareHintActions;Q6.prototype.triggerHintActions=Q6.prototype.triggerHintActions;Q6.prototype.prepareSubsHintActions=Q6.prototype.prepareSubsHintActions;w([P(AO.YtComponentBehavior),x("design:type",Object)],Q6.prototype,"componentBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],Q6.prototype,"rendererBehavior",void 0); w([P(OO.YtTaskEmitterBehavior),x("design:type",Object)],Q6.prototype,"taskEmitterBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],Q6.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],Q6.prototype,"activeEndpoint",void 0);w([R(),x("design:type",Object)],Q6.prototype,"data",void 0);w([R(),x("design:type",Boolean)],Q6.prototype,"guideOpened",void 0);w([R(),x("design:type",String)],Q6.prototype,"type",void 0); w([R({reflectToAttribute:!0}),zE("data","activeEndpoint"),x("design:type",Boolean),x("design:paramtypes",[])],Q6.prototype,"active",null);w([R({reflectToAttribute:!0}),zE("data"),x("design:type",Boolean),x("design:paramtypes",[])],Q6.prototype,"isPrimary",null);w([R({reflectToAttribute:!0}),zE("data.count","data.presentationStyle","data.badges.*"),x("design:type",String),x("design:paramtypes",[])],Q6.prototype,"lineEndStyle",null); w([zE("lineEndStyle"),x("design:type",Object),x("design:paramtypes",[])],Q6.prototype,"ariaLabel",null);w([zE("active"),x("design:type",Object),x("design:paramtypes",[])],Q6.prototype,"ariaSelected",null);w([yE("active","guideOpened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Q6.prototype,"prepareSubsHintActions",null); w([yE("data.hintActions","guideOpened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Q6.prototype,"triggerHintActions",null);w([yE("data.targetId"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Q6.prototype,"prepareHintActions",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],Q6.prototype,"onTap",null); Q6=w([uO({is:"ytd-guide-entry-renderer",notifyObserversOnUndefined:!0,noInjection:!0})],Q6);var Mob;var Nob;var R6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-add-to-guide-section-action":"handleAddToGuideSectionAction","yt-remove-from-guide-section-action":"handleRemoveFromGuideSectionAction"};return a}; p(R6,O);e=R6.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.configureRendererStamper=function(){return{"data.sectionItems":{id:"section-items",mapping:{guideCollapsibleEntryRenderer:{component:"ytd-guide-collapsible-entry-renderer",noInjection:!0,properties:{activeEndpoint:"[[activeEndpoint]]"}},guideEntryRenderer:{component:"ytd-guide-entry-renderer",noInjection:!0,properties:{activeEndpoint:"[[activeEndpoint]]"}}}}}}; e.activeEndpointChanged=function(){if(this.activeEndpoint){this.headerEntry.activeEndpoint=this.activeEndpoint;for(var a=this.sectionItems.children,b=0,c=a.length;b
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mob){var d=document.createElement("template");d.innerHTML=""; Mob=d}d=Mob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nob=a}a=Nob;return a}}}); var S6=R6;S6.prototype.activeEndpointChanged=S6.prototype.activeEndpointChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],S6.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],S6.prototype,"actionHandlerBehavior",void 0);w([P(Y),x("design:type",Object)],S6.prototype,"ytRendererstamperBehavior",void 0);w([AE("#section-items"),x("design:type",HTMLDivElement)],S6.prototype,"sectionItems",void 0); w([AE("#header-entry"),x("design:type",Q6)],S6.prototype,"headerEntry",void 0);w([R(),x("design:type",Object)],S6.prototype,"data",void 0);w([R(),x("design:type",Object)],S6.prototype,"activeEndpoint",void 0);w([yE("activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S6.prototype,"activeEndpointChanged",null);S6=w([U({is:"ytd-guide-collapsible-section-entry-renderer"})],S6);var Oob;var Pob;var T6=function(){var a=O.apply(this,arguments)||this;a.showFooter_=!1;return a}; p(T6,O);T6.prototype.configureRendererStamper=function(){return{shownItems:{id:"sections",mapping:{guideSectionRenderer:{component:"ytd-guide-section-renderer",noInjection:!0},guideSigninPromoRenderer:{component:"ytd-guide-signin-promo-renderer",noInjection:!0},guideSubscriptionsSectionRenderer:{component:"ytd-guide-section-renderer",params:{type:"subscriptions"},noInjection:!0}}}}}; T6.prototype.attached=function(){return Ya(this,function b(){var c=this,d;return ya(b,function(f){if(1==f.nextAddress)return(d=c.ytComponentBehavior.getInterfaceForTs("yt-guide-manager"))?q(f,d.setGuideData(c),3):f.jumpTo(0);c.ytLazyListBehavior.initialCount=2;return f.return()})})}; T6.prototype.dataChanged_=function(){this.data&&(this.showFooter_=!0)}; h.Object.defineProperties(T6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Pob){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Oob){var d=document.createElement("template");d.innerHTML=""; Oob=d}d=Oob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pob=a}a=Pob;return a}}}); var U6=T6;w([P(W.YtRendererBehavior),x("design:type",Object)],U6.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],U6.prototype,"ytComponentBehavior",void 0);w([P(MQ),x("design:type",Object)],U6.prototype,"ytLazyListBehavior",void 0);w([P(Y),x("design:type",Object)],U6.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],U6.prototype,"data",void 0); w([R(),x("design:type",Object)],U6.prototype,"showFooter_",void 0);w([R({value:!0}),x("design:type",Boolean)],U6.prototype,"autoFill",void 0);U6=w([U({is:"ytd-guide-renderer"})],U6);var Qob;var Rob;var V6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-add-to-guide-section-action":"handleAddToGuideSectionAction_","yt-remove-from-guide-section-action":"handleRemoveFromGuideSectionAction_","yt-reset-channel-unread-count-command":"handleResetChannelUnreadCountCommand_"};return a}; p(V6,O);e=V6.prototype; e.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{guideEntryRenderer:{component:"ytd-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]",guideOpened:"[[guideOpened]]",type:"[[type]]"},noInjection:!0},guideCollapsibleEntryRenderer:{component:"ytd-guide-collapsible-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"},noInjection:!0},guideCollapsibleSectionEntryRenderer:{component:"ytd-guide-collapsible-section-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"}, noInjection:!0}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.observeForEdu_=function(){if(N("kevlar_mysubs_edu")&&"subscriptions"==this.type&&this.data){var a=this.ytComponentBehavior.getInterfaceForTs("ytd-page-manager");a&&(a=(a=a.getCurrentPage())?a.pageSubtype:null,N("kevlar_mysubs_single_guide_section")&&"home"==a&&this.setEduTarget_(0,"subs-guide-item"))}}; e.setEduTarget_=function(a,b){this.data.items&&this.data.items.length>a&&this.data.items[a].guideEntryRenderer&&this.set("data.items."+a+".guideEntryRenderer.targetId",b)}; e.persistentGuideChanged_=function(){if(!this.ytdGuideStateAwareBehavior.guidePersistentAndVisible){var a=this.ytActionSenderBehavior.sendOptionalAction("yt-get-popup-opened-action",["yt-bubble-hint-renderer"]);a&&1==a.length&&a[0]&&this.ytActionSenderBehavior.sendOptionalAction("yt-close-popup-action",["yt-bubble-hint-renderer"])}}; e.handleResetChannelUnreadCountCommand_=function(a){a.resetChannelUnreadCountCommand&&a.resetChannelUnreadCountCommand.channelId&&this.data&&this.data.items&&(a=this.getPathToEntryMatchingId_(a.resetChannelUnreadCountCommand.channelId))&&(this.set(a+".guideEntryRenderer.count",0),this.set(a+".guideEntryRenderer.presentationStyle","GUIDE_ENTRY_PRESENTATION_STYLE_NONE"))}; e.getPathToEntryMatchingId_=function(a){if(this.data&&this.data.items){var b=this.getEntryIndexMatchingId_(a,this.data.items);if(-1\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qob){var d=document.createElement("template");d.innerHTML=""; Qob=d}d=Qob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rob=a}a=Rob;return a}}}); var W6=V6;W6.prototype.guideOpenedChanged_=W6.prototype.guideOpenedChanged_;W6.prototype.activeEndpointChanged_=W6.prototype.activeEndpointChanged_;W6.prototype.persistentGuideChanged_=W6.prototype.persistentGuideChanged_;W6.prototype.observeForEdu_=W6.prototype.observeForEdu_;w([P(W.YtRendererBehavior),x("design:type",Object)],W6.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],W6.prototype,"ytRendererstamperBehavior",void 0); w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],W6.prototype,"ytActionHandlerBehavior",void 0);w([P(MQ),x("design:type",Object)],W6.prototype,"ytLazyListBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],W6.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],W6.prototype,"ytActionSenderBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],W6.prototype,"ytComponentBehavior",void 0); w([R(),x("design:type",Object)],W6.prototype,"data",void 0);w([R(),x("design:type",String)],W6.prototype,"type",void 0);w([R({value:20}),x("design:type",Number)],W6.prototype,"initialCount",void 0);w([R({value:10}),x("design:type",Number)],W6.prototype,"targetFramerate",void 0);w([R({value:!0}),x("design:type",Boolean)],W6.prototype,"autoFill",void 0);w([R({value:50}),x("design:type",Number)],W6.prototype,"renderDelay",void 0); w([yE("data","activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W6.prototype,"observeForEdu_",null);w([yE("guidePersistentAndVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W6.prototype,"persistentGuideChanged_",null);w([yE("activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W6.prototype,"activeEndpointChanged_",null); w([yE("guideOpened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W6.prototype,"guideOpenedChanged_",null);W6=w([U({is:"ytd-guide-section-renderer"})],W6);var Sob;var Tob;var X6=function(){return O.apply(this,arguments)||this}; p(X6,O);X6.prototype.onSignInTap=function(){var a=this.ytComponentBehavior.getInterface({});a&&a.signIn()}; h.Object.defineProperties(X6.prototype,{alignByText:{configurable:!0,enumerable:!0,get:function(){return"STYLE_BLUE_TEXT"===this.get("data.signInButton.buttonRenderer.style")}}}); h.Object.defineProperties(X6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tob){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Sob){var d=document.createElement("template");d.innerHTML=""; Sob=d}d=Sob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tob=a}a=Tob;return a}}}); var Y6=X6;w([P(W.YtRendererBehavior),x("design:type",Object)],Y6.prototype,"rendererBehaviors",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],Y6.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],Y6.prototype,"data",void 0);w([R(),zE("data.signInButton.buttonRenderer.style"),x("design:type",Object),x("design:paramtypes",[])],Y6.prototype,"alignByText",null);Y6=w([U({is:"ytd-guide-signin-promo-renderer"})],Y6);var Uob;var Vob;var Z6=function(){return O.apply(this,arguments)||this}; p(Z6,O);e=Z6.prototype;e.attached=function(){this.setAttribute("role","tab");this.setAttribute("tabindex","0")}; e.dataChanged=function(){this.setAttribute("aria-selected",""+this.active);this.setAttribute("aria-label",""+this.ytRendererBehavior.getSimpleString(this.data.formattedTitle))}; e.onActiveStateChange=function(){this.setAttribute("aria-selected",""+this.active)}; e.onTap=function(a){var b;(null===(b=this.data)||void 0===b?0:b.navigationEndpoint)&&!RR(Polymer.dom(a).path||[],this,["A".toString()])&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})}; e.computeActive=function(a,b){var c,d,f,g;if(!a||!b)return!1;if(a.browseEndpoint&&b.browseEndpoint)return a.browseEndpoint.browseId===b.browseEndpoint.browseId&&a.browseEndpoint.params===b.browseEndpoint.params;a=null===(d=null===(c=a.commandMetadata)||void 0===c?void 0:c.webCommandMetadata)||void 0===d?void 0:d.url;b=null===(g=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===g?void 0:g.url;return!(!a||!b||a!==b&&a!==Ad(b))}; e.computeTitle=function(a,b){return b?"":this.ytRendererBehavior.getSimpleString(a)}; h.Object.defineProperties(Z6.prototype,{ariaSelected:{configurable:!0,enumerable:!0,get:function(){if(void 0!==this.active)return this.active.toString()}}}); h.Object.defineProperties(Z6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vob){var a=document.createElement("template");a.innerHTML="\n \n \n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Uob){var d=document.createElement("template");d.innerHTML=""; Uob=d}d=Uob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vob=a}a=Vob;return a}}}); var $6=Z6;$6.prototype.onTap=$6.prototype.onTap;$6.prototype.onActiveStateChange=$6.prototype.onActiveStateChange;$6.prototype.dataChanged=$6.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],$6.prototype,"ytRendererBehavior",void 0);w([P(sI),x("design:type",Object)],$6.prototype,"ironButtonState",void 0);w([R(),x("design:type",Object)],$6.prototype,"data",void 0);w([R(),x("design:type",Object)],$6.prototype,"activeEndpoint",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],$6.prototype,"noLabels",void 0);w([R({reflectToAttribute:!0,computed:"computeActive(data.navigationEndpoint,activeEndpoint)"}),x("design:type",Boolean)],$6.prototype,"active",void 0);w([zE("active"),x("design:type",Object),x("design:paramtypes",[])],$6.prototype,"ariaSelected",null);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$6.prototype,"dataChanged",null); w([yE("active"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$6.prototype,"onActiveStateChange",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],$6.prototype,"onTap",null);$6=w([U({is:"ytd-mini-guide-entry-renderer"})],$6);var Wob;var Xob;var a7=function(){var a=O.apply(this,arguments)||this;a.noLabels_=N("kevlar_mini_guide_no_labels");return a}; p(a7,O);e=a7.prototype;e.configureRendererStamper=function(){return{miniGuideItems_:{id:"items",mapping:{guideEntryRenderer:{component:"ytd-mini-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]",noLabels:"[[noLabels_]]"},noInjection:!0}}}}}; e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","navigation")}; e.visibleChanged_=function(a){a&&!this.data&&(a=this.ytComponentBehavior.getInterfaceForTs("yt-guide-manager"))&&a.setGuideData(this)}; e.dataChanged=function(){var a,b=[];null!==(a=this.data)&&void 0!==a&&a.items&&this.data.items.forEach(function(c){var d,f;null===(f=null===(d=c.guideSectionRenderer)||void 0===d?void 0:d.items)||void 0===f?void 0:f.forEach(function(g){var l,m;g.guideEntryRenderer?(g=g.guideEntryRenderer,g.isPrimary&&b.push({guideEntryRenderer:g})):g.guideCollapsibleSectionEntryRenderer&&((null===(m=null===(l=g.guideCollapsibleSectionEntryRenderer.headerEntry)||void 0===l?void 0:l.guideEntryRenderer)||void 0===m? 0:m.isPrimary)&&b.push({guideEntryRenderer:g.guideCollapsibleSectionEntryRenderer.headerEntry.guideEntryRenderer}),(g=g.guideCollapsibleSectionEntryRenderer.sectionItems)&&g.forEach(function(n){var r;(null===(r=n.guideEntryRenderer)||void 0===r?0:r.isPrimary)&&b.push({guideEntryRenderer:n.guideEntryRenderer})}))})}); this.miniGuideItems_=b}; e.activeEndpointChanged_=function(){for(var a=this.$.items.children,b=0;b
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wob){var d=document.createElement("template");d.innerHTML=""; Wob=d}d=Wob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xob=a}a=Xob;return a}}}); var b7=a7;b7.prototype.activeEndpointChanged_=b7.prototype.activeEndpointChanged_;w([P(W.YtRendererBehavior),x("design:type",Object)],b7.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],b7.prototype,"ytRendererstamperBehavior",void 0);w([P(DQ.YtdGuideStateAwareBehavior),x("design:type",Object)],b7.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],b7.prototype,"ytComponentBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],b7.prototype,"data",void 0);w([R({observer:"visibleChanged_"}),x("design:type",Boolean)],b7.prototype,"visible",void 0);w([R(),x("design:type",Object)],b7.prototype,"miniGuideItems_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],b7.prototype,"noLabels_",void 0);w([yE("activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b7.prototype,"activeEndpointChanged_",null); b7=w([U({is:"ytd-mini-guide-renderer"})],b7);var Yob;var Zob;var c7=function(){return O.apply(this,arguments)||this}; p(c7,O);c7.prototype.configureRendererStamper=function(){return{"data.sections":{id:"sections",mapping:{hotkeyDialogSectionRenderer:"ytd-hotkey-dialog-section-renderer"}}}}; c7.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable.dialogElement=this.parentElement}; c7.prototype.onCloseTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; h.Object.defineProperties(c7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zob){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n\n
\n
\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Yob){var d=document.createElement("template");d.innerHTML=""; Yob=d}d=Yob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zob=a}a=Zob;return a}}}); var d7=c7;w([P(V.YtActionSenderBehavior),x("design:type",Object)],d7.prototype,"ytActionSenderBehavior",void 0);w([P(Y),x("design:type",Object)],d7.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],d7.prototype,"ytRendererBehavior",void 0);w([AE("#scrollable"),x("design:type",Object)],d7.prototype,"scrollable",void 0);w([R(),x("design:type",Object)],d7.prototype,"data",void 0);d7=w([U({is:"ytd-hotkey-dialog-renderer"})],d7);var $ob;var apb;var bpb=function(){return O.apply(this,arguments)||this}; p(bpb,O); h.Object.defineProperties(bpb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===apb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.label)]]
\n
[[data.hotkey]]
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$ob){var d=document.createElement("template");d.innerHTML=""; $ob=d}d=$ob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);apb=a}a=apb;return a}}}); var e7=bpb;w([P(W.YtRendererBehavior),x("design:type",Object)],e7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],e7.prototype,"data",void 0);e7=w([U({is:"ytd-hotkey-dialog-section-option-renderer"})],e7);var cpb;var dpb;var f7=function(){return O.apply(this,arguments)||this}; p(f7,O);f7.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{hotkeyDialogSectionOptionRenderer:"ytd-hotkey-dialog-section-option-renderer"}}}}; h.Object.defineProperties(f7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dpb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cpb){var d=document.createElement("template");d.innerHTML=""; cpb=d}d=cpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dpb=a}a=dpb;return a}}}); var g7=f7;w([P(Y),x("design:type",Object)],g7.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],g7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],g7.prototype,"data",void 0);g7=w([U({is:"ytd-hotkey-dialog-section-renderer"})],g7);var epb;var fpb;var h7=function(){return O.apply(this,arguments)||this}; p(h7,O);e=h7.prototype; e.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{menuNavigationItemRenderer:{component:"ytd-menu-navigation-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuServiceItemRenderer:{component:"ytd-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuConditionalNavigationItemRenderer:{component:"ytd-menu-navigation-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuConditionalServiceItemRenderer:{component:"ytd-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]"}}, toggleMenuServiceItemRenderer:{component:"ytd-toggle-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuCustomIconItemRenderer:{component:"ytd-menu-custom-icon-item-renderer"},menuServiceItemDownloadRenderer:{component:"ytd-menu-service-item-download-renderer"}}},"data.footer":{id:"footer",mapping:{menuPopupTipRenderer:"ytd-menu-popup-tip-renderer"}}}}; e.computeAriaLabel_=function(a){return a}; e.onPopupOpened_=function(){var a=this;this.$.items.selected=null;Polymer.dom(this.$.items).children.forEach(function(c){c.popupPositionTarget=a.positionTarget}); var b=this.$$("ytd-menu-popup-tip-renderer");b&&"ytd-menu-popup-tip-renderer"==b.is&&(b.setTip(this.source),this.source=void 0);this.veData&&(b=On())&&PJ(b,[this.veData])}; e.onPopupClosed_=function(){var a=this.$$("ytd-menu-popup-tip-renderer");a&&"ytd-menu-popup-tip-renderer"==a.is&&a.clearTip()}; e.onIronActivate_=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]);if(this.veData){var a=On();a&&QJ(a,this.veData)}}; e.computeUseIcons_=function(){return this.data&&this.data.items?this.data.items.some(function(a){var b=Object.keys(a)[0];return!!a[b].icon}):!1}; h.Object.defineProperties(h7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fpb){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===epb){var d=document.createElement("template");d.innerHTML=""; epb=d}d=epb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fpb=a}a=fpb;return a}}}); var i7=h7;i7.prototype.onPopupClosed_=i7.prototype.onPopupClosed_;i7.prototype.onPopupOpened_=i7.prototype.onPopupOpened_;w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],i7.prototype,"ytEventForwardingBehavior",void 0);w([P(Y),x("design:type",Object)],i7.prototype,"ytRendererstamperBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],i7.prototype,"ytActionSenderBehavior",void 0); w([P(W.YtRendererBehavior),x("design:type",Object)],i7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],i7.prototype,"data",void 0);w([R(),x("design:type",Object)],i7.prototype,"veData",void 0);w([R({reflectToAttribute:!0,readOnly:!0,computed:"computeAriaLabel_(data.menuPopupAccessibility.label)"}),x("design:type",String)],i7.prototype,"ariaLabel",void 0);w([R({computed:"computeUseIcons_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],i7.prototype,"useIcons_",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],i7.prototype,"onPopupOpened_",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],i7.prototype,"onPopupClosed_",null);i7=w([U({is:"ytd-menu-popup-renderer"})],i7);var gpb;var hpb;var j7=function(){return O.apply(this,arguments)||this}; p(j7,O);j7.prototype.setTip=function(a){var b=this;this.data&&(this.tip=xSa(vSa.getInstance(),a,this.data),Polymer.RenderStatus.afterNextRender(this,function(){b.fire("yt-refit")}))}; j7.prototype.clearTip=function(){this.tip=void 0}; j7.prototype.computeHidden=function(a){return!a}; h.Object.defineProperties(j7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hpb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gpb){var d=document.createElement("template");d.innerHTML=""; gpb=d}d=gpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hpb=a}a=hpb;return a}}}); var k7=j7;w([P(W.YtRendererBehavior),x("design:type",Object)],k7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],k7.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHidden(tip)",value:!0}),x("design:type",Boolean)],k7.prototype,"hidden",void 0);w([R(),x("design:type",Object)],k7.prototype,"tip",void 0);k7=w([U({is:"ytd-menu-popup-tip-renderer"})],k7);var ipb;var jpb;var l7=function(){var a=O.apply(this,arguments)||this;a.useIcons=!1;return a}; p(l7,O);e=l7.prototype;e.onFocus=function(){this.$$("paper-item").focus()}; e.computeText=function(a,b,c){return this.componentBehavior.getSimpleString(a?c:b)}; e.onTap=function(){var a=this.data.isToggled?this.data.toggledServiceEndpoint:this.data.defaultServiceEndpoint;a&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; e.onYtServiceRequestCompleted=function(){this.set("data.isToggled",!this.data.isToggled)}; e.computeIcon=function(a,b,c){return(a=a?c:b)&&a.iconType?zO(a.iconType):""}; e.computeIconHidden=function(){return this.useIcons?!1:!this.icon}; h.Object.defineProperties(l7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jpb){var a=document.createElement("template");a.innerHTML="\n \n [[computeText(data.isToggled, data.defaultText, data.toggledText)]]\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ipb){var d=document.createElement("template");d.innerHTML=""; ipb=d}d=ipb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jpb=a}a=jpb;return a}}}); var m7=l7;m7.prototype.onYtServiceRequestCompleted=m7.prototype.onYtServiceRequestCompleted;m7.prototype.onTap=m7.prototype.onTap;m7.prototype.onFocus=m7.prototype.onFocus;w([P(W.YtRendererBehavior),x("design:type",Object)],m7.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],m7.prototype,"ytActionSenderBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],m7.prototype,"componentBehavior",void 0); w([R(),x("design:type",Object)],m7.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],m7.prototype,"useIcons",void 0);w([R({computed:"computeIcon(data.isToggled,data.defaultIcon,data.toggledIcon)",value:""}),x("design:type",String)],m7.prototype,"icon",void 0);w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m7.prototype,"onFocus",null); w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],m7.prototype,"onTap",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m7.prototype,"onYtServiceRequestCompleted",null);m7=w([U({is:"ytd-toggle-menu-service-item-renderer"})],m7);var kpb;var lpb;var n7=function(){return O.apply(this,arguments)||this}; p(n7,O);n7.prototype.onFocus=function(){this.$$("paper-item").focus()}; h.Object.defineProperties(n7.prototype,{imageSource:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.iconUrl)return $b(this.data.iconUrl)}}}); h.Object.defineProperties(n7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lpb){var a=document.createElement("template");a.innerHTML="\n \n \"icon\"\n
\n [[getSimpleString(data.actionText)]]\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kpb){var d=document.createElement("template");d.innerHTML=""; kpb=d}d=kpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lpb=a}a=lpb;return a}}}); var o7=n7;o7.prototype.onFocus=o7.prototype.onFocus;w([P(W.YtRendererBehavior),x("design:type",Object)],o7.prototype,"rendererBehavior",void 0);w([P(dP.YtEndpointBehavior),x("design:type",Object)],o7.prototype,"ytEndpointBehavior",void 0);w([R(),x("design:type",Object)],o7.prototype,"data",void 0);w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o7.prototype,"onFocus",null); w([zE("data.iconUrl"),x("design:type",Object),x("design:paramtypes",[])],o7.prototype,"imageSource",null);o7=w([U({is:"ytd-menu-custom-icon-item-renderer"})],o7);var mpb;var npb;var opb=ek("high_priority_flyout_frequency",1),p7=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-broadcast-user-invalidation-action":"updateCount_","yt-update-notifications-unseen-count-action":"handleUpdateNotificationsUnseenCountAction_","yt-handle-high-priority-notification-open-action":"handleHighPriorityNotificationOpenAction_"};return a}; p(p7,O);e=p7.prototype;e.created=function(){this.showTooltips=!0}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.data&&this.data.updateUnseenCountEndpoint&&this.sendUnseenCountRequest_(this.data.updateUnseenCountEndpoint);navigator&&navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",function(b){return a.onServiceWorkerMessage_(b)})}; e.computeShowNotificationCount=function(a,b){return b?!1:a}; e.onDataChanged_=function(a,b){this.isAttached&&!b&&a&&a.updateUnseenCountEndpoint&&this.sendUnseenCountRequest_(a.updateUnseenCountEndpoint)}; e.onServiceWorkerMessage_=function(a){"update_unseen_notifications_count_signal"===a.data.type&&this.data&&this.data.updateUnseenCountEndpoint&&this.hasUnseenNotificationCountEndpoint_()&&this.sendUnseenCountRequest_(this.data.updateUnseenCountEndpoint)}; e.hasUnseenNotificationCountEndpoint_=function(){return!!this.data&&!!this.data.updateUnseenCountEndpoint&&!!this.data.updateUnseenCountEndpoint.signalServiceEndpoint&&"GET_UNSEEN_NOTIFICATION_COUNT"===this.data.updateUnseenCountEndpoint.signalServiceEndpoint.signal}; e.updateCount_=function(a){if(a&&"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"===this.data.style){var b=this.ytActionSenderBehavior.sendOptionalAction("yt-opened-conversation-id-action");b&&1===b.length&&null!=b[0]&&b[0]===a.conversationId||(b=this.ytActionSenderBehavior.sendOptionalAction("yt-check-conversation-inbox-open-action"))&&b.some(function(c){return c})||a.newCount&&this.updateCountUI_(a.newCount)}}; e.computeAccessibility_=function(a){return this.get("accessibility.accessibilityData",a)||null}; e.handleUpdateNotificationsUnseenCountAction_=function(a){var b=this;!a.updateNotificationsUnseenCountAction||!this.data||"NOTIFICATION_ACTION_UPDATE_UNSEEN_COUNT"!==a.updateNotificationsUnseenCountAction.handlerData&&"NOTIFICATION_BUTTON_STYLE_TYPE_DEFAULT"===this.data.style||"NOTIFICATION_ACTION_UPDATE_CONVERSATION_UNSEEN_COUNT"!==a.updateNotificationsUnseenCountAction.handlerData&&"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"===this.data.style||(a.updateNotificationsUnseenCountAction.highPriorityNotificationIcon&& this.set("showHighPriorityNotificationIcon_",!0),this.maybeFetchHighPriorityNotification(a.updateNotificationsUnseenCountAction.highPriorityNotificationTimestamp||0).then(function(){b.updateCountUI_(a.updateNotificationsUnseenCountAction.unseenCount);0d)b.showHighPriorityNotification(),YN("HighPriorityNotificationShowCount",1).then(function(){YN("HighPriorityNotificationTimestamp",a).then(function(){return Promise.resolve(!0)})}).catch(function(){return!1});else return a===d?ZN("HighPriorityNotificationShowCount").then(function(f){return fa?a:"9+")}; e.handleHighPriorityNotificationOpenAction_=function(){"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"===this.data.style&&1===this.unseenCount_&&this.set("unseenCount_",0)}; h.Object.defineProperties(p7.prototype,{container:{configurable:!0,enumerable:!0,get:function(){return this.$.button}}}); h.Object.defineProperties(p7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===npb){var a=document.createElement("template");a.innerHTML="
\n \n
\n\n\n"; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mpb){var d=document.createElement("template");d.innerHTML=""; mpb=d}d=mpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);npb=a}a=npb;return a}}}); var q7=p7;q7.prototype.onServiceRequestCompleted_=q7.prototype.onServiceRequestCompleted_;q7.prototype.onTap_=q7.prototype.onTap_;q7.prototype.handleUpdateNotificationsUnseenCountAction_=q7.prototype.handleUpdateNotificationsUnseenCountAction_;w([P(W.YtRendererBehavior),x("design:type",Object)],q7.prototype,"ytRendererBehavior",void 0);w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],q7.prototype,"ytdOpenPopupBehavior",void 0); w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],q7.prototype,"ytActionHandlerBehavior",void 0);w([P(gP.YtButtonBehavior),x("design:type",Object)],q7.prototype,"ytButtonBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],q7.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"onDataChanged_"}),x("design:type",Object)],q7.prototype,"data",void 0);w([R(),x("design:type",Object)],q7.prototype,"cachedAction_",void 0); w([R({value:0}),x("design:type",Object)],q7.prototype,"unseenCount_",void 0);w([R({value:!1}),x("design:type",Object)],q7.prototype,"showHighPriorityNotificationIcon_",void 0);w([R({computed:"computeShowNotificationCount(unseenCount_, showHighPriorityNotificationIcon_)"}),x("design:type",Object)],q7.prototype,"showNotificationCount_",void 0); w([S("yt-update-notifications-unseen-count-action"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],q7.prototype,"handleUpdateNotificationsUnseenCountAction_",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],q7.prototype,"onTap_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],q7.prototype,"onServiceRequestCompleted_",null);q7=w([U({is:"ytd-notification-topbar-button-renderer"})],q7);var ppb;var qpb;var r7=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggled"};return a}; p(r7,O);r7.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.dark=document.documentElement.hasAttribute("dark")}; r7.prototype.dataChanged=function(){var a;if(null===(a=this.data)||void 0===a?0:a.backgroundBanner){var b=MO(this.data.backgroundBanner.thumbnails,this.clientWidth);this.style.backgroundImage="url("+b+")"}}; r7.prototype.onDarkModeToggled=function(a){this.dark=a}; h.Object.defineProperties(r7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qpb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ppb){var d=document.createElement("template");d.innerHTML=""; ppb=d}d=ppb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qpb=a}a=qpb;return a}}}); var s7=r7;s7.prototype.dataChanged=s7.prototype.dataChanged;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],s7.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],s7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],s7.prototype,"data",void 0);w([R({value:!0,reflectToAttribute:!0}),x("design:type",Boolean)],s7.prototype,"dark",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],s7.prototype,"dataChanged",null);s7=w([U({is:"yt-pdg-buy-flow-header-renderer"})],s7);var rpb;var spb;var t7=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm"};return a}; p(t7,O);e=t7.prototype; e.configureRendererStamper=function(){return{"data.buyButton":{id:"buy-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{id:"buy-button-renderer"}}}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.commentPreview":{id:"comment-preview",mapping:{pdgCommentPreviewRenderer:"ytd-pdg-comment-preview-renderer"}},"data.selectableItemButtons":{id:"selectable-items",mapping:{buttonRenderer:{component:"ytd-button-renderer"},superVodSelectableItemButtonRenderer:{component:"ytd-pdg-super-vod-selectable-item-button-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.listen(this.$["cancel-button"],"tap","closeBuyFlow")}; e.detached=function(){this.unlisten(this.$["cancel-button"],"tap","closeBuyFlow")}; e.handleSignalActionSubmitForm=function(){this.fire("yt-pdg-buy-flow-selection-submitted");JL(this,[this.data.submitEndpoint])}; e.dataChanged=function(){if(this.data){this.updatePriceSelectorStatus();var a=[];this.data.preloadImage?a=[this.data.preloadImage]:this.data.preloadImages&&(a=this.data.preloadImages);a.map(function(b){return MO(b.thumbnails,1920)}).forEach(function(b){b&&Ti(JYa(b),function(){vm(Error("Failed to load PDG Viewer applause animation."))})})}}; e.updatePriceSelectorStatus=function(){var a,b=!(null===(a=this.data)||void 0===a||!a.selectableItemButtons),c=Polymer.dom(this);b?(c.removeAttribute("single-price"),c.setAttribute("multi-price",!0)):(c.removeAttribute("multi-price"),c.setAttribute("single-price",!0))}; e.closeBuyFlow=function(){GL(this,"yt-close-popup-action",["ytd-pdg-buy-flow-renderer"])}; h.Object.defineProperties(t7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===spb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rpb){var d=document.createElement("template");d.innerHTML=""; rpb=d}d=rpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);spb=a}a=spb;return a}}}); var u7=t7;u7.prototype.closeBuyFlow=u7.prototype.closeBuyFlow;u7.prototype.dataChanged=u7.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],u7.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],u7.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],u7.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],u7.prototype,"data",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u7.prototype,"dataChanged",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u7.prototype,"closeBuyFlow",null);u7=w([U({is:"yt-super-vod-buy-flow-content-renderer"})],u7);var tpb;var upb;var v7=function(){var a=O.apply(this,arguments)||this;a.isAnimationDisabled=!1;a.textCycleOptions=[];a.currentTextOptionIndex=0;a.animationEndHandler=function(){}; return a}; p(v7,O);v7.prototype.attached=function(){this.animationEndHandler=this.handleAnimationEnd.bind(this);this.contentEl.addEventListener("animationend",this.animationEndHandler)}; v7.prototype.detached=function(){this.contentEl.removeEventListener("animationend",this.animationEndHandler)}; v7.prototype.setupCyclingAnimation=function(){this.data&&this.data.contentTextOptions&&(this.textCycleOptions=this.data.contentTextOptions.map(this.rendererBehavior.getSimpleString),this.currentTextOptionIndex=0,this.contentEl.textContent=this.textCycleOptions[this.currentTextOptionIndex],this.isAnimationDisabled||this.contentEl.classList.add("fadein"))}; v7.prototype.handleAnimationEnd=function(a){var b=this;"fadein"===a.animationName?setTimeout(function(){b.contentEl.classList.remove("fadein");b.contentEl.classList.add("fadeout")},1E3):"fadeout"===a.animationName&&(this.currentTextOptionIndex=(this.currentTextOptionIndex+1)%this.textCycleOptions.length,this.contentEl.textContent=this.textCycleOptions[this.currentTextOptionIndex],this.contentEl.classList.remove("fadeout"),this.contentEl.classList.add("fadein"))}; h.Object.defineProperties(v7.prototype,{title:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.title)}}, channelName:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.authorText)}}, publishedTime:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.publishedTimeText)}}, content:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.contentText)}}}); h.Object.defineProperties(v7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===upb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n [[title]]\n

\n
\n\n
\n \n \n
\n
\n [[channelName]] \u2022 [[publishedTime]]\n
\n
\n [[content]]\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tpb){var d=document.createElement("template");d.innerHTML=""; tpb=d}d=tpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);upb=a}a=upb;return a}}}); var w7=v7;w7.prototype.setupCyclingAnimation=w7.prototype.setupCyclingAnimation;w([P(W.YtRendererBehavior),x("design:type",Object)],w7.prototype,"rendererBehavior",void 0);w([AE("#content"),x("design:type",HTMLElement)],w7.prototype,"contentEl",void 0);w([R(),x("design:type",Object)],w7.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],w7.prototype,"isAnimationDisabled",void 0); w([yE("data.contentTextOptions"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],w7.prototype,"setupCyclingAnimation",null);w([zE("data.title"),x("design:type",Object),x("design:paramtypes",[])],w7.prototype,"title",null);w([zE("data.authorText"),x("design:type",Object),x("design:paramtypes",[])],w7.prototype,"channelName",null);w([zE("data.publishedTimeText"),x("design:type",Object),x("design:paramtypes",[])],w7.prototype,"publishedTime",null); w([zE("data.contentText"),x("design:type",Object),x("design:paramtypes",[])],w7.prototype,"content",null);w7=w([U({is:"ytd-pdg-comment-preview-renderer"})],w7);var vpb;var wpb;var x7=function(){return O.apply(this,arguments)||this}; p(x7,O);e=x7.prototype;e.beforeRegister=function(){this.ironA11yKeysBehavior.keyBindings={"enter:keydown":"onClick","space:keydown":"onClick"}}; e.attached=function(){this.setAttribute("tabindex","0");this.hasAttribute("role")||this.setAttribute("role","button")}; e.dataChanged=function(){this.data&&(this.data.chipColorArgb&&this.data.chipFontColorArgb&&this.updateStyles({"--yt-pdg-super-vod-selectable-item-button-chip-background-color":eO(this.data.chipColorArgb),"--yt-pdg-super-vod-selectable-item-button-chip-font-color":eO(this.data.chipFontColorArgb)}),this.basePriceText=this.data.basePriceText,this.purchaseCommand=this.data.purchaseCommand)}; e.onClick=function(){this.purchaseCommand&&JL(this,[this.purchaseCommand]);N("pdg_disable_web_super_vod_explicit_click_logging")||this.logClick()}; e.logClick=function(){this.data&&this.ytRendererBehavior.logExplicitClick(this.data)}; h.Object.defineProperties(x7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wpb){var a=document.createElement("template");a.innerHTML="\n\n[[getSimpleString(data.basePriceText)]]\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vpb){var d=document.createElement("template");d.innerHTML=""; vpb=d}d=vpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wpb=a}a=wpb;return a}}}); var y7=x7;y7.prototype.onClick=y7.prototype.onClick;y7.prototype.dataChanged=y7.prototype.dataChanged;w([P(AO.YtComponentBehavior),x("design:type",Object)],y7.prototype,"componentBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],y7.prototype,"ytRendererBehavior",void 0);w([P(Polymer.IronA11yKeysBehavior),x("design:type",Object)],y7.prototype,"ironA11yKeysBehavior",void 0);w([R(),x("design:type",Object)],y7.prototype,"data",void 0); w([R(),x("design:type",Object)],y7.prototype,"shownThumbnail",void 0);w([R(),x("design:type",Object)],y7.prototype,"basePriceText",void 0);w([R(),x("design:type",Object)],y7.prototype,"purchaseCommand",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y7.prototype,"dataChanged",null);w([S("click"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y7.prototype,"onClick",null); y7=w([U({is:"ytd-pdg-super-vod-selectable-item-button-renderer"})],y7);var xpb;var ypb;var z7=function(){return O.apply(this,arguments)||this}; p(z7,O);e=z7.prototype;e.created=function(){Polymer.IronA11yAnnouncer.requestAvailability();this.listen(this,"iron-overlay-opened","onPopupIronOverlayOpened")}; e.onPopupIronOverlayOpened=function(){this.data&&this.data.accessibility&&this.data.accessibility.accessibilityData&&this.data.accessibility.accessibilityData.label&&this.fire("iron-announce",{text:this.data.accessibility.accessibilityData.label})}; e.detached=function(){Bk.cancelJob(this.autoCloseJobId);this.unlisten(this,"iron-overlay-opened","onPopupIronOverlayOpened")}; e.dataChanged=function(){var a=this;this.data&&this.data.autoCloseDelay&&(GL(this,"yt-close-popup-action",["ytd-pdg-buy-flow-renderer"]),this.autoCloseJobId=Ck(function(){a.closePopup()},1E3*(Number(this.data.autoCloseDelay.seconds)||0)))}; e.openPopup=function(){this.ironOverlayBehavior.open()}; e.closePopup=function(){this.ironOverlayBehavior.close();this.data&&(GL(this,"yt-close-popup-action",["ytd-desktop-image-overlay-renderer"]),this.data.onCloseCommand&&IL(this,[this.data.onCloseCommand],this),this.data.onCloseSurveyCommand&&JL(this,[this.data.onCloseSurveyCommand]),Bk.cancelJob(this.autoCloseJobId))}; h.Object.defineProperties(z7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ypb){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xpb){var d=document.createElement("template");d.innerHTML=""; xpb=d}d=xpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ypb=a}a=ypb;return a}}}); var A7=z7;A7.prototype.dataChanged=A7.prototype.dataChanged;w([P(W.YtRendererBehavior),x("design:type",Object)],A7.prototype,"rendererBehavior",void 0);w([P(Polymer.IronOverlayBehavior),x("design:type",Object)],A7.prototype,"ironOverlayBehavior",void 0);w([R(),x("design:type",Object)],A7.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A7.prototype,"dataChanged",null);A7=w([U({is:"ytd-desktop-image-overlay-renderer"})],A7);var zpb;var Apb;var B7=function(){return O.apply(this,arguments)||this}; p(B7,O);e=B7.prototype;e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{pdgBuyFlowHeaderRenderer:{component:"yt-pdg-buy-flow-header-renderer"}}},"data.content":{id:"content",mapping:{superVodBuyFlowContentRenderer:{component:"yt-super-vod-buy-flow-content-renderer"}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("tabIndex")||this.setAttribute("tabIndex","0");this.listen(this,"yt-popup-closed","closePopup_")}; e.detached=function(){this.unlisten(this,"yt-popup-closed","closePopup_")}; e.dataChanged_=function(){HL(this,"yt-close-popup-action",["yt-loading-renderer"])}; e.handleBuyflowSelectionSubmitted_=function(){this.unlisten(this,"yt-popup-closed","closePopup_")}; e.closePopup_=function(){this.data&&this.data.onCloseCommand&&JL(this,[this.data.onCloseCommand])}; h.Object.defineProperties(B7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Apb){var a=document.createElement("template");a.innerHTML="
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zpb){var d=document.createElement("template");d.innerHTML=""; zpb=d}d=zpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Apb=a}a=Apb;return a}}}); var C7=B7;C7.prototype.handleBuyflowSelectionSubmitted_=C7.prototype.handleBuyflowSelectionSubmitted_;C7.prototype.dataChanged_=C7.prototype.dataChanged_;w([P(W.YtRendererBehavior),x("design:type",Object)],C7.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],C7.prototype,"ytRendererstamperBehavior",void 0);w([P(cW),x("design:type",Object)],C7.prototype,"ytOpenToastBehavior",void 0);w([R(),x("design:type",Object)],C7.prototype,"data",void 0); w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C7.prototype,"dataChanged_",null);w([S("yt-pdg-buy-flow-selection-submitted"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C7.prototype,"handleBuyflowSelectionSubmitted_",null);C7=w([U({is:"ytd-pdg-buy-flow-renderer"})],C7);var Bpb;var Cpb;var D7=function(){var a=O.apply(this,arguments)||this;a.isOpen=!1;a.isPlaylistCreated=!1;return a}; p(D7,O);e=D7.prototype;e.reset=function(){this.isPlaylistCreated=this.isOpen=!1;this.nameInput.reset();this.privacyInput.reset()}; e.onOpenTap=function(){this.isOpen=!0;this.isPlaylistCreated=!1;this.nameInput.focusTextInput();this.fire("yt-refit")}; e.onCreateTap=function(){!this.isPlaylistCreated&&this.nameInput.validate()&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint,{create_playlist_title:this.nameInput.value,create_playlist_privacy_status:this.privacyInput.value}]),this.isPlaylistCreated=!0)}; e.onKeydown=function(a){if(13===a.keyCode)this.onCreateTap()}; e.onServiceRequestCompleted=function(a){a.stopPropagation();this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-add-to-playlist-renderer"])}; e.computePrivacyBadge=function(a){return a?[{metadataBadgeRenderer:a}]:[]}; h.Object.defineProperties(D7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cpb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bpb){var d=document.createElement("template");d.innerHTML=""; Bpb=d}d=Bpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cpb=a}a=Cpb;return a}}}); var E7=D7;E7.prototype.onServiceRequestCompleted=E7.prototype.onServiceRequestCompleted;E7.prototype.onKeydown=E7.prototype.onKeydown;w([P(V.YtActionSenderBehavior),x("design:type",Object)],E7.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],E7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],E7.prototype,"data",void 0);w([R(),x("design:type",Object)],E7.prototype,"isOpen",void 0); w([R(),x("design:type",Object)],E7.prototype,"isPlaylistCreated",void 0);w([R({value:{REQUIRED_LABEL:mL("REQUIRED_LABEL",void 0,"Required"),NO_ANGLE_BRACKET_LABEL:mL("NO_ANGLE_BRACKET_LABEL",void 0,"Cannot contain < or >")}}),x("design:type",Object)],E7.prototype,"addToStrings",void 0);w([R({computed:"computePrivacyBadge(data.privacyInput.metadataBadgeRenderer)"}),x("design:type",Array)],E7.prototype,"privacyBadge",void 0);w([AE("#privacy-input"),x("design:type",a_)],E7.prototype,"privacyInput",void 0); w([AE("#name-input"),x("design:type",Object)],E7.prototype,"nameInput",void 0);w([S("keydown"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],E7.prototype,"onKeydown",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],E7.prototype,"onServiceRequestCompleted",null);E7=w([U({is:"ytd-add-to-playlist-create-renderer"})],E7);var Dpb;var Epb;var F7=function(){var a=O.apply(this,arguments)||this;a.addToStrings={ADD_TO_DROPDOWN_LABEL:mL("ADD_TO_DROPDOWN_LABEL",void 0,"Save to...")};a.closeButtonAriaLabel=mL("SBOX_INAPPROPRIATE_CANCEL");a.dialog=N("desktop_add_to_playlist_renderer_dialog_popup");a.increasedTapTarget=N("desktop_adjust_touch_target");return a}; p(F7,O);F7.prototype.configureRendererStamper=function(){return{"data.playlists":{id:"playlists",mapping:{playlistAddToOptionRenderer:"ytd-playlist-add-to-option-renderer"}},"data.actions":{id:"actions",mapping:{addToPlaylistCreateRenderer:"ytd-add-to-playlist-create-renderer"}}}}; F7.prototype.onPopupOpened=function(){this.toggleClass("scrollable",!0,this.playlists);this.createRenderer&&this.createRenderer.reset()}; F7.prototype.onPopupClosed=function(){this.toggleClass("scrollable",!1,this.playlists)}; F7.prototype.onTapClose=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-add-to-playlist-renderer"])}; h.Object.defineProperties(F7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Epb){var a=document.createElement("template");a.innerHTML="
\n
[[addToStrings.ADD_TO_DROPDOWN_LABEL]]
\n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dpb){var d=document.createElement("template");d.innerHTML=""; Dpb=d}d=Dpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Epb=a}a=Epb;return a}}}); var G7=F7;G7.prototype.onPopupClosed=G7.prototype.onPopupClosed;G7.prototype.onPopupOpened=G7.prototype.onPopupOpened;w([P(W.YtRendererBehavior),x("design:type",Object)],G7.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],G7.prototype,"ytActionSenderBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],G7.prototype,"ytEventForwardingBehavior",void 0);w([P(Y),x("design:type",Object)],G7.prototype,"ytRendererStamperBehavior",void 0); w([R(),x("design:type",Object)],G7.prototype,"data",void 0);w([R(),x("design:type",Object)],G7.prototype,"addToStrings",void 0);w([R(),x("design:type",String)],G7.prototype,"closeButtonAriaLabel",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],G7.prototype,"dialog",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],G7.prototype,"increasedTapTarget",void 0);w([AE("#playlists"),x("design:type",HTMLElement)],G7.prototype,"playlists",void 0); w([AE("ytd-add-to-playlist-create-renderer"),x("design:type",Object)],G7.prototype,"createRenderer",void 0);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G7.prototype,"onPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G7.prototype,"onPopupClosed",null);G7=w([U({is:"ytd-add-to-playlist-renderer"})],G7);var Fpb;var Gpb;var H7=function(){return O.apply(this,arguments)||this}; p(H7,O);H7.prototype.dataChanged=function(){this.data&&(this.$.checkbox.checked="ALL"===this.data.containsSelectedVideos)}; H7.prototype.onCheckboxChange=function(a){var b=this;this.data&&this.debounce("yt-playlist-checkbox-changed",function(){var c=Polymer.dom(a).rootTarget.checked?b.data.addToPlaylistServiceEndpoint:b.data.removeFromPlaylistServiceEndpoint;b.ytRendererBehavior.sendServiceRequestAction([c])},100)}; H7.prototype.computeIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; h.Object.defineProperties(H7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gpb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n \n
\n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fpb){var d=document.createElement("template");d.innerHTML=""; Fpb=d}d=Fpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gpb=a}a=Gpb;return a}}}); var I7=H7;I7.prototype.dataChanged=I7.prototype.dataChanged;w([P(V.YtActionSenderBehavior),x("design:type",Object)],I7.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],I7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],I7.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],I7.prototype,"dataChanged",null);I7=w([U({is:"ytd-playlist-add-to-option-renderer"})],I7);var Hpb;var Ipb;var J7=function(){return O.apply(this,arguments)||this}; p(J7,O);e=J7.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-mealbar-promo-renderer"])}; e.computeIcon=function(a){return a?"BACKSTAGE_ARTWORK"===a?"backstage:artwork":a:null}; e.computeHasFullHeightImage=function(a){return!!(a&&a.thumbnails&&0\n\n
\n

\n [[getSimpleString(data.messageTitle)]]\n

\n \n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hpb){var d=document.createElement("template");d.innerHTML=""; Hpb=d}d=Hpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ipb=a}a=Ipb;return a}}}); var K7=J7;K7.prototype.onThumbnailLoaded=K7.prototype.onThumbnailLoaded;w([P(W.YtRendererBehavior),x("design:type",Object)],K7.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],K7.prototype,"ytActionSenderBehavior",void 0);w([R({}),x("design:type",Object)],K7.prototype,"data",void 0);w([R({computed:"computeIcon(data.alternateIcon.iconType)"}),x("design:type",Object)],K7.prototype,"icon",void 0); w([R({reflectToAttribute:!0,computed:"computeHasFullHeightImage(data.icon)"}),x("design:type",Boolean)],K7.prototype,"hasFullHeightImage",void 0);w([S("yt-img-shadow-loaded"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],K7.prototype,"onThumbnailLoaded",null);K7=w([U({is:"ytd-mealbar-promo-renderer"})],K7);var Jpb;var Kpb;iP("itemSectionRenderer","redCancelSurveyRenderer","ytd-red-cancel-survey-renderer");var L7=function(){return O.apply(this,arguments)||this}; p(L7,O);e=L7.prototype;e.configureRendererStamper=function(){return{"data.nextButton":{id:"next-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-confirm":!0}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",classListBinding:"[[buttonClass_]]",attributes:{"dialog-dismiss":!0}}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged_=function(){switch(this.get("data.singleOptions.preselectMode")){case"SINGLE_OPTION_PRESELECT_MODE_LAST":this.selectedResponseIndex_=this.get("data.singleOptions.styles").length-1;break;default:this.selectedResponseIndex_=void 0;}var a=this.get("data.nextButton.buttonRenderer.navigationEndpoint");a&&(this.nextNavigationEndpoint_=a,this.set("data.nextButton.buttonRenderer.navigationEndpoint",void 0))}; e.onSelectedResponseIndexChange_=function(){if(null!=this.get("data.nextButton.buttonRenderer")){switch(this.get("data.submissionMode")){case"SURVEY_SUBMISSION_MODE_ONE_SELECTED_OPTION":this.set("data.nextButton.buttonRenderer.isDisabled",void 0===this.selectedResponseIndex_);break;default:this.set("data.nextButton.buttonRenderer.isDisabled",!1);}if(null!=this.selectedResponseIndex_){var a={feedbackTokens:[this.get(["data.singleOptions.styles",this.selectedResponseIndex_]).radioButtonSurveyOptionRenderer.submissionEndpoint.feedbackEndpoint.feedbackToken]}; this.set("nextNavigationEndpoint_.confirmDialogEndpoint.content.confirmDialogRenderer.confirmButton.buttonRenderer.serviceEndpoint.ypcCancelRecurrenceEndpoint.feedbackData",a)}}}; e.onPopupOpened_=function(a){a.detail==this&&N("enable_premium_voluntary_pause")&&this.ytdOpenPopupBehavior.sendAction("yt-close-popup-action",["yt-confirm-dialog-renderer"])}; e.onNextButtonTap_=function(){var a=this.nextNavigationEndpoint_&&this.ytdOpenPopupBehavior.getNavigationEndpointPopupAction(this.nextNavigationEndpoint_);a&&this.ytdOpenPopupBehavior.openPopup(a)}; h.Object.defineProperties(L7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kpb){var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.question)]]
\n \n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jpb){var d=document.createElement("template");d.innerHTML=""; Jpb=d}d=Jpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kpb=a}a=Kpb;return a}}}); var M7=L7;M7.prototype.onPopupOpened_=M7.prototype.onPopupOpened_;w([P(FP.YtdOpenPopupBehavior),x("design:type",Object)],M7.prototype,"ytdOpenPopupBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],M7.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],M7.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],M7.prototype,"data",void 0); w([R({observer:"onSelectedResponseIndexChange_"}),x("design:type",Object)],M7.prototype,"selectedResponseIndex_",void 0);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],M7.prototype,"onPopupOpened_",null);M7=w([U({is:"ytd-red-cancel-survey-renderer"})],M7);var Lpb;var Mpb;var N7=function(){var a=O.apply(this,arguments)||this;a.submitButtonDisabled=!0;return a}; p(N7,O);N7.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; N7.prototype.configureRendererStamper=function(){return{"data.sections":{id:"sections",mapping:{itemSectionRenderer:{component:"ytd-item-section-renderer",noInjection:!0}}}}}; N7.prototype.onDataChanged=function(){var a,b,c,d,f,g;void 0!==(null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.confirmButton)||void 0===b?void 0:b.buttonRenderer)||void 0===c?void 0:c.isDisabled)&&(this.submitButtonDisabled=null===(g=null===(f=null===(d=this.data)||void 0===d?void 0:d.confirmButton)||void 0===f?void 0:f.buttonRenderer)||void 0===g?void 0:g.isDisabled)}; N7.prototype.checkboxChanged=function(){this.submitButtonDisabled=!this.submitButtonDisabled}; h.Object.defineProperties(N7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mpb){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lpb){var d=document.createElement("template");d.innerHTML=""; Lpb=d}d=Lpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mpb=a}a=Mpb;return a}}}); var O7=N7;w([P(Y),x("design:type",Object)],O7.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],O7.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],O7.prototype,"data",void 0);w([R(),x("design:type",Object)],O7.prototype,"submitButtonDisabled",void 0);O7=w([U({is:"ytd-transfer-channel-confirm-dialog-renderer"})],O7);var Npb;var Opb;var P7=function(){return O.apply(this,arguments)||this}; p(P7,O);P7.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; P7.prototype.configureRendererStamper=function(){return{"data.okayButton":{id:"okay-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; P7.prototype.onDataChanged=function(){var a=this.get("data.headerImage.thumbnails");a&&(a=MO(a,this.clientWidth),this.$.header.style.backgroundImage="url("+a+")");a=On();var b=Nn(),c=this.get("data.trackingParams");c&&b&&a&&NJ(a,b,In(c));this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()})}; P7.prototype.onPopupClosed=function(a){"ytd-membership-post-cancel-renderer"===Polymer.dom(a).rootTarget.localName&&this.ytActionSenderBehavior.sendAction("ytd-refresh-channel-tab-action",["TAB_ID_SPONSORSHIPS"])}; h.Object.defineProperties(P7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Opb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n \n
\n
\n\n\n\n
\n \n
\n\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Npb){var d=document.createElement("template");d.innerHTML=""; Npb=d}d=Npb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Opb=a}a=Opb;return a}}}); var Q7=P7;Q7.prototype.onPopupClosed=Q7.prototype.onPopupClosed;w([P(V.YtActionSenderBehavior),x("design:type",Object)],Q7.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],Q7.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],Q7.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],Q7.prototype,"data",void 0); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],Q7.prototype,"onPopupClosed",null);Q7=w([U({is:"ytd-membership-post-cancel-renderer"})],Q7);var Ppb;var Qpb;var R7=function(){return O.apply(this,arguments)||this}; p(R7,O);e=R7.prototype;e.configureRendererStamper=function(){return{"data.confirmButton":{id:"confirm-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[onConfirmTap]]"}}}},"data.feedbackSurvey":{id:"feedback-survey",mapping:{feedbackSurveyRenderer:"ytd-feedback-survey-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable.dialogElement=this.parentNode;this.onDataChanged()}; e.onYtPopupOpened=function(a,b){b===this&&this.data&&this.data.onOpenCommands&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onOpenCommands,this);this.ytActionSenderBehavior.sendAction("yt-close-popups-action",[["ytd-manage-membership-renderer","ytd-membership-offer-renderer"]])}; e.onYtPopupClosed=function(a,b){(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.data&&this.data.onDismissCommands&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onDismissCommands,this)}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-sponsorship-confirm-cancel-renderer"])}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.maybeSubmitFeedback=function(){var a=this.$$("ytd-feedback-survey-renderer");a&&a.submitSurvey()}; e.onDataChanged=function(){if(this.isAttached){var a=this.get("data.header.sponsorshipDialogHeaderRenderer.headerImage.thumbnails");a&&(a=MO(a,this.clientWidth),this.$.header.style.backgroundImage="url(\""+a+"\")")}}; e.onConfirmTap=function(){this.fire("yt-request-feedback-submission")}; h.Object.defineProperties(R7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qpb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n \n \n \n \n \n
\n
\n\n\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ppb){var d=document.createElement("template");d.innerHTML=""; Ppb=d}d=Ppb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qpb=a}a=Qpb;return a}}}); var S7=R7;S7.prototype.maybeSubmitFeedback=S7.prototype.maybeSubmitFeedback;S7.prototype.onYtServiceRequestError=S7.prototype.onYtServiceRequestError;S7.prototype.onYtServiceRequestCompleted=S7.prototype.onYtServiceRequestCompleted;S7.prototype.onYtPopupClosed=S7.prototype.onYtPopupClosed;S7.prototype.onYtPopupOpened=S7.prototype.onYtPopupOpened;w([P(W.YtRendererBehavior),x("design:type",Object)],S7.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],S7.prototype,"ytRendererstamperBehavior",void 0);w([P(cW),x("design:type",Object)],S7.prototype,"ytOpenToastBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],S7.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],S7.prototype,"data",void 0);w([R({value:function(){return mL("SBOX_INAPPROPRIATE_CANCEL")}}), x("design:type",String)],S7.prototype,"closeButtonAriaLabel",void 0);w([AE("#scrollable"),x("design:type",Object)],S7.prototype,"scrollable",void 0);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],S7.prototype,"onYtPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],S7.prototype,"onYtPopupClosed",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],S7.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],S7.prototype,"onYtServiceRequestError",null); w([S("yt-request-feedback-submission"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S7.prototype,"maybeSubmitFeedback",null);S7=w([U({is:"ytd-sponsorship-confirm-cancel-renderer"})],S7);var Rpb;var Spb;var Tpb=ca(["https://www.googletagmanager.com/gtag/js?id=AW-758154851"]),Upb=ca(["\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', 'AW-758154851');\n "]),Vpb=ca(["\n gtag('event', 'conversion', {'send_to': 'AW-758154851/gA4iCK3u5ZYBEOOMwukC', 'transaction_id': ''});\n "]),T7=function(){var a=O.apply(this,arguments)||this;a.scriptsAppended=!1;return a}; p(T7,O);e=T7.prototype; e.configureRendererStamper=function(){return{"data.header.sponsorshipsHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.contents":{id:"content", mapping:{sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.onDataChanged=function(){var a=this.get("data.header.sponsorshipsHeaderRenderer.backgroundColor");this.header.style.setProperty("background-color",eO(a));if(a=this.get("data.header.sponsorshipsHeaderRenderer.backgroundImage.thumbnails"))a=MO(a,this.getBoundingClientRect().width),this.header.style.setProperty("background-image","url("+a+")");a=On(4);var b=Nn(4),c=this.get("data.trackingParams");c&&b&&a&&NJ(a,b,In(c));this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()}); this.setupConversionTracking()}; e.setupConversionTracking=function(){if(!this.scriptsAppended){var a=document.createElement("script");a.async=!0;var b=sCa(Tpb);b=b instanceof ih?jea(b):Jb(b);a.src=b;CE(a);document.body.appendChild(a);a=document.createElement("script");b=pCa(Upb);a.textContent=qCa(b);CE(a);document.body.appendChild(a);a=document.createElement("script");b=pCa(Vpb);a.textContent=qCa(b);CE(a);document.body.appendChild(a);this.scriptsAppended=!0}}; e.onPopupClosed=function(a){"ytd-sponsorships-celebration-renderer"===Polymer.dom(a).rootTarget.localName&&this.ytActionSenderBehavior.sendAction("ytd-refresh-channel-tab-action",["TAB_ID_SPONSORSHIPS"])}; h.Object.defineProperties(T7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Spb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rpb){var d=document.createElement("template");d.innerHTML=""; Rpb=d}d=Rpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Spb=a}a=Spb;return a}}}); var U7=T7;U7.prototype.onPopupClosed=U7.prototype.onPopupClosed;w([P(V.YtActionSenderBehavior),x("design:type",Object)],U7.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],U7.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],U7.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],U7.prototype,"data",void 0);w([AE("#header"),x("design:type",HTMLElement)],U7.prototype,"header",void 0); w([R(),x("design:type",Object)],U7.prototype,"scriptsAppended",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],U7.prototype,"onPopupClosed",null);U7=w([U({is:"ytd-sponsorships-celebration-renderer"})],U7);var Wpb;var Xpb;var V7=function(){return O.apply(this,arguments)||this}; p(V7,O);e=V7.prototype;e.configureRendererStamper=function(){return{"data.header.sponsorshipsHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.header.sponsorshipsHeaderRenderer.menuButton":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.alert":{id:"alert-renderer",mapping:{sponsorshipsAlertRenderer:{component:"ytd-sponsorships-alert-renderer"}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.detached=function(){this.playerElement.stop()}; e.onYtServiceRequestCompleted=function(){this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-sponsorships-offer-renderer"])}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.onYtPopupOpened=function(){this.scrollable&&(this.scrollable.scrollTarget.scrollTop=0)}; e.onYtPopupClosed=function(){this.playerElement.stop();this.backgroundPlayerElement&&this.isBackgroundPlayerAlreadyPlaying&&!this.tierRenderer.purchaseButtonClicked&&this.backgroundPlayerElement.play();this.set("selectedTier",0)}; e.getTier=function(a,b){return!a||!a.tiers||0>b?null:a.tiers[b].sponsorshipsTierRenderer}; e.moreThanOne=function(a){return!!(a&&1
\n
\n \n \n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n
\n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wpb){var d=document.createElement("template");d.innerHTML=""; Wpb=d}d=Wpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xpb=a}a=Xpb;return a}}}); var W7=V7;W7.prototype.onYtPopupClosed=W7.prototype.onYtPopupClosed;W7.prototype.onYtPopupOpened=W7.prototype.onYtPopupOpened;W7.prototype.onYtServiceRequestError=W7.prototype.onYtServiceRequestError;W7.prototype.onYtServiceRequestCompleted=W7.prototype.onYtServiceRequestCompleted;w([P(W.YtRendererBehavior),x("design:type",Object)],W7.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],W7.prototype,"ytRendererstamperBehavior",void 0); w([P(cW),x("design:type",Object)],W7.prototype,"ytOpenToastBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],W7.prototype,"actionSenderBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],W7.prototype,"data",void 0);w([R({notify:!0,value:0}),x("design:type",Number)],W7.prototype,"selectedTier",void 0);w([R({value:""}),x("design:type",String)],W7.prototype,"offerVideo",void 0); w([R({value:!1}),x("design:type",Boolean)],W7.prototype,"isBackgroundPlayerAlreadyPlaying",void 0);w([R({value:function(){return"ytd-sponsorships-offer-with-video-renderer-"+Ra(this)}}), x("design:type",String)],W7.prototype,"playerId",void 0);w([AE("paper-dialog-scrollable"),x("design:type",Object)],W7.prototype,"scrollable",void 0);w([AE("ytd-sponsorships-tier-renderer"),x("design:type",E2)],W7.prototype,"tierRenderer",void 0);w([AE("#player"),x("design:type",Object)],W7.prototype,"playerElement",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],W7.prototype,"onYtServiceRequestCompleted",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],W7.prototype,"onYtServiceRequestError",null);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W7.prototype,"onYtPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W7.prototype,"onYtPopupClosed",null); W7=w([U({is:"ytd-sponsorships-offer-renderer"})],W7);var Ypb;var Zpb;var X7=function(){return O.apply(this,arguments)||this}; p(X7,O);X7.prototype.configureRendererStamper=function(){return{"data.content.sponsorshipsPromotionChannelRenderer.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.header.sponsorshipsPromotionHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; X7.prototype.backgroundColorChanged=function(){var a,b,c,d,f=null===(d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.content)||void 0===b?void 0:b.sponsorshipsPromotionChannelRenderer)||void 0===c?void 0:c.backgroundColor)||void 0===d?void 0:d.backgroundColor;f&&(f=dO(f),this.$.banner.style.backgroundColor=f,this.$["abstract-art"].style.backgroundColor=f)}; X7.prototype.attached=function(){this.scroller&&(this.scroller.dialogElement=this.parentNode,this.scroller.attached&&"function"===typeof this.scroller.attached&&this.scroller.attached());this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; h.Object.defineProperties(X7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zpb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ypb){var d=document.createElement("template");d.innerHTML=""; Ypb=d}d=Ypb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zpb=a}a=Zpb;return a}}}); var Y7=X7;Y7.prototype.backgroundColorChanged=Y7.prototype.backgroundColorChanged;w([R(),x("design:type",Object)],Y7.prototype,"data",void 0);w([P(Y),x("design:type",Object)],Y7.prototype,"ytRendererstamperBehavior",void 0);w([AE("#scroller"),x("design:type",Object)],Y7.prototype,"scroller",void 0);w([yE("data.content.sponsorshipsPromotionChannelRenderer.backgroundColor"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Y7.prototype,"backgroundColorChanged",null); Y7=w([U({is:"ytd-sponsorships-promotion-celebration-renderer"})],Y7);var $pb;var aqb;var Z7=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-notification-options-form":"handleSignalActionSubmitNotificationOptionsForm"};return a}; p(Z7,O);Z7.prototype.configureRendererStamper=function(){return{"data.secondaryOptions":{id:"secondary-options",mapping:{subscriptionToggleOptionRenderer:"ytd-subscription-toggle-option-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.confirmButton":{id:"confirm-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; Z7.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.ytActionHandlerBehavior.actionMap=this.actionMap}; Z7.prototype.handleSignalActionSubmitNotificationOptionsForm=function(){var a=this.data.options[this.$.options.selected].subscriptionRadioOptionRenderer.serviceEndpoint,b=this.$$("ytd-subscription-toggle-option-renderer");b&&a&&a.modifyChannelNotificationPreferenceEndpoint&&(b=b.getValue())&&(a.modifyChannelNotificationPreferenceEndpoint.secondaryParams=[b]);this.actionSenderBehavior.sendServiceRequestAction([a]);this.actionSenderBehavior.sendAction("yt-close-popup-action")}; h.Object.defineProperties(Z7.prototype,{initialIndex:{configurable:!0,enumerable:!0,get:function(){if(!this.data||!this.data.options)return null;for(var a=this.data.options,b=0;b
[[getSimpleString(data.title)]]
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$pb){var d=document.createElement("template");d.innerHTML=""; $pb=d}d=$pb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);aqb=a}a=aqb;return a}}}); var $7=Z7;w([P(Y),x("design:type",Object)],$7.prototype,"ytRendererstamperBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],$7.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],$7.prototype,"actionSenderBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],$7.prototype,"eventForwardingBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],$7.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],$7.prototype,"data",void 0);w([zE("data.options"),x("design:type",Object),x("design:paramtypes",[])],$7.prototype,"initialIndex",null);$7=w([U({is:"ytd-subscription-notification-options-renderer"})],$7);var bqb;var cqb;var a8=function(){return O.apply(this,arguments)||this}; p(a8,O);a8.prototype.getValue=function(){return this.checkbox.checked?this.data.params:void 0}; a8.prototype.computeIsInitiallyChecked=function(a){return 1===a}; h.Object.defineProperties(a8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===cqb){var a=document.createElement("template");a.innerHTML="\n [[getSimpleString(data.label)]]\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bqb){var d=document.createElement("template");d.innerHTML=""; bqb=d}d=bqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);cqb=a}a=cqb;return a}}}); var b8=a8;w([P(W.YtRendererBehavior),x("design:type",Object)],b8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],b8.prototype,"data",void 0);w([AE("#checkbox"),x("design:type",Object)],b8.prototype,"checkbox",void 0);b8=w([U({is:"ytd-subscription-toggle-option-renderer"})],b8);var dqb;var eqb;var c8=function(){var a=O.apply(this,arguments)||this;a.mandatoryConsentBump=N("mandatory_consent_bump");return a}; p(c8,O);c8.prototype.getDialog=function(){return this.$.dialog}; c8.prototype.getIframe=function(){return this.$.iframe}; c8.prototype.onIronOverlayClosed_=function(){var a=ZM(this);a&&a.play()}; h.Object.defineProperties(c8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===eqb){var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dqb){var d=document.createElement("template");d.innerHTML=""; dqb=d}d=dqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);eqb=a}a=eqb;return a}}}); var d8=c8;d8.prototype.onIronOverlayClosed_=d8.prototype.onIronOverlayClosed_;w([P(W.YtRendererBehavior),x("design:type",Object)],d8.prototype,"ytRendererBehavior",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],d8.prototype,"mandatoryConsentBump",void 0);w([S("iron-overlay-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],d8.prototype,"onIronOverlayClosed_",null);d8=w([U({is:"ytd-consent-bump-lightbox"})],d8);var fqb;var gqb;var e8=function(){var a=O.apply(this,arguments)||this;a.lightbox_=null;a.acceptVe_=null;a.expressVe_=null;a.signinPromptClosed_=!N("kevlar_sign_in_prompt_before_mandatory_consent");a.disableConsentBump_=!Sha();a.actionMap={"yt-close-popup-action":"handlePopupClose_"};return a}; p(e8,O);e=e8.prototype;e.handlePopupClose_=function(a){this.signinPromptClosed_||"yt-upsell-dialog-renderer"!==a||(this.signinPromptClosed_=!0,this.maybeForceConsent_(this.data))}; e.ready=function(){var a=this;this.disableConsentBump_||N("kevlar_sign_in_prompt_before_mandatory_consent")&&yk(Bk,function(){a.forceShowIfNoBlockingSigninPrompt()},5E3)}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.disableConsentBump_?this.hideConsentBump_():(this.listen(window,"message","onReceivedMessage_"),this.lightbox_&&this.fire("yt-add-element-to-app",this.lightbox_))}; e.detached=function(){this.disableConsentBump_||this.unlisten(window,"message","onReceivedMessage_")}; e.maybeForceConsent_=function(a){var b=this;this.disableConsentBump_||(a&&this.async(function(){b.fire("yt-consent-bump-display-changed")}),this.initializeVE_(),a&&a.forceConsent?(this.hideConsentBump_(),this.signinPromptClosed_&&(this.async(this.pausePlayer_.bind(this),1E3),this.openLightbox_())):"true"==vl("HideTicker","false")&&this.hideConsentBump_())}; e.initializeVE_=function(){var a=OL();PL(a,106531,void 0,{layer:4,parentLayer:0});this.acceptVe_=SL(a,{veType:104841},void 0,4);this.expressVe_=SL(a,{veType:105964},void 0,4)}; e.createLightbox_=function(){var a=document.createElement("ytd-consent-bump-lightbox");a.id="consent-bump";document.body.appendChild(a);this.data&&this.data.forceConsent?a.getDialog().modal=!0:a.getDialog().withBackdrop=!0;this.fire("yt-add-element-to-app",a);return a}; e.getConsentBumpIcon_=function(a){return a.toLowerCase()}; e.onReceivedMessage_=function(a){if(!this.lightbox_){var b=this.getLightbox_();if(b)this.lightbox_=b;else return}b=zd(a.origin);if(bLa[b]&&bLa.hasOwnProperty(b)||fk("consent_url_override"))switch((b=On(this.ytRendererBehavior.getScreenLayer()))&&("cb-ui-done-early"===a.data&&this.acceptVe_?QJ(b,this.acceptVe_):"cb-express-done"===a.data&&this.expressVe_&&QJ(b,this.expressVe_)),a.data){case"cb-ui-done-early":case"cb-ui-done":case"cb-express-done":case"cb-already-consented":this.hideConsentBump_(); this.closeLightbox_();this.resumePlayer_();break;case"cb-user-closed":this.closeLightbox_();this.resumePlayer_();break;case"verify-origin":a.source.parent===window&&a.source.postMessage("verify-origin-reply",a.origin);}}; e.onRemindMeLaterTap_=function(){ul("HideTicker","true",86400);this.hideConsentBump_()}; e.onReviewTap_=function(){this.pausePlayer_();this.openLightbox_()}; e.openLightbox_=function(){var a=On(this.ytRendererBehavior.getScreenLayer());a&&(this.acceptVe_&&PJ(a,[this.acceptVe_]),this.expressVe_&&N("mandatory_consent_bump")&&PJ(a,[this.expressVe_]));(a=this.getLightbox_())||(a=this.createLightbox_());a.getIframe().src=this.data.iframeUrl;this.lightbox_=a;a.getDialog().open()}; e.closeLightbox_=function(){this.lightbox_.getDialog().close()}; e.pausePlayer_=function(){var a=ZM(this);a&&a.pause()}; e.hideConsentBump_=function(){this.hidden=!0;this.fire("yt-consent-bump-display-changed")}; e.resumePlayer_=function(){var a=ZM(this);a&&a.play()}; e.getLightbox_=function(){var a=document.querySelector("ytd-app")||document.querySelector("ytg-app");return a?a.querySelector("#consent-bump"):null}; e.forceShowIfNoBlockingSigninPrompt=function(){var a=this.ytActionSenderBehavior.sendAction("yt-get-popup-opened-action",["yt-upsell-dialog-renderer"]);0!==a.length&&a[0]||this.handlePopupClose_("yt-upsell-dialog-renderer")}; h.Object.defineProperties(e8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gqb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fqb){var d=document.createElement("template");d.innerHTML=""; fqb=d}d=fqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);gqb=a}a=gqb;return a}}}); var f8=e8;w([P(W.YtRendererBehavior),x("design:type",Object)],f8.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],f8.prototype,"ytActionSenderBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],f8.prototype,"ytActionHandlerBehavior",void 0);w([R({observer:"maybeForceConsent_"}),x("design:type",Object)],f8.prototype,"data",void 0);f8=w([U({is:"ytd-consent-bump-renderer"})],f8);var hqb;var iqb;var jqb=function(){return O.apply(this,arguments)||this}; p(jqb,O); h.Object.defineProperties(jqb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===iqb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hqb){var d=document.createElement("template");d.innerHTML=""; hqb=d}d=hqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);iqb=a}a=iqb;return a}}}); var g8=jqb;w([P(W.YtRendererBehavior),x("design:type",Object)],g8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],g8.prototype,"data",void 0);g8=w([U({is:"ytd-tvfilm-offer-groups-renderer"})],g8);var kqb;var lqb;var h8=function(){return O.apply(this,arguments)||this}; p(h8,O);h8.prototype.dataChanged=function(){this.userInput=this.data.couponCode?this.data.couponCode:"";this.validate()}; h8.prototype.onSubmit=function(){var a=this.data.serviceEndpoint;a&&a.ypcGetOffersEndpoint&&(a.ypcGetOffersEndpoint.couponCode=this.userInput,this.ytRendererBehavior.sendServiceRequestAction([a]))}; h8.prototype.validate=function(){var a=!(!this.data||!this.data.couponCode||this.data.couponCode!==this.userInput);this.showTick=a&&!this.data.errorMessage;this.showErrorMessage=a&&!!this.data.errorMessage;this.hideApplyButton=!this.userInput||this.showTick||this.showErrorMessage;this.disableApplyButton=null==this.userInput.match(/^[\d\w]{12}$/)}; h.Object.defineProperties(h8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lqb){var a=document.createElement("template");a.innerHTML=" \n \n \n [[data.errorMessage]]\n \n \n\n \n\n \n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kqb){var d=document.createElement("template");d.innerHTML=""; kqb=d}d=kqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lqb=a}a=lqb;return a}}}); var i8=h8;w([P(W.YtRendererBehavior),x("design:type",Object)],i8.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],i8.prototype,"data",void 0);w([R(),x("design:type",String)],i8.prototype,"userInput",void 0);w([R(),x("design:type",Boolean)],i8.prototype,"disableApplyButton",void 0);w([R(),x("design:type",Boolean)],i8.prototype,"hideApplyButton",void 0);w([R(),x("design:type",Boolean)],i8.prototype,"hideErrorMessage",void 0); w([R(),x("design:type",Boolean)],i8.prototype,"showTick",void 0);w([R(),x("design:type",Boolean)],i8.prototype,"showErrorMessage",void 0);i8=w([U({is:"ytd-ypc-coupon-renderer"})],i8);var mqb;var nqb;var j8=function(){return O.apply(this,arguments)||this}; p(j8,O);e=j8.prototype;e.configureRendererStamper=function(){return{"data.offers":{id:"offers",mapping:{tvfilmOffersRenderer:{component:"ytd-tvfilm-offer-groups-renderer"}}},"data.coupon":{id:"coupon",mapping:{ypcCouponRenderer:"ytd-ypc-coupon-renderer"}},"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("aria-label")||this.setAttribute("aria-label","Offers")}; e.computeThumbnailClass=function(a){return a.thumbnailOverlays?a.isShow?"thumbnail-show":"thumbnail-movie":a.isShow?"thumbnail-no-overlay-show":"thumbnail-no-overlay-movie"}; e.computeCommerceSectionClass=function(a){return a.offers&&a.offers.tvfilmOffersRenderer?"commerce-section-groups":"commerce-section-tabs"}; e.computeTitleClass=function(a){return a.offers&&a.offers.tvfilmOffersRenderer?"title-with-offer-groups":""}; e.onDataChanged=function(){this.querySelectorAll("yt-img-shadow").forEach(function(a){a.onShow()})}; h.Object.defineProperties(j8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nqb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mqb){var d=document.createElement("template");d.innerHTML=""; mqb=d}d=mqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nqb=a}a=nqb;return a}}}); var k8=j8;k8.prototype.onDataChanged=k8.prototype.onDataChanged;w([P(Y),x("design:type",Object)],k8.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],k8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],k8.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],k8.prototype,"onDataChanged",null);k8=w([U({is:"ytd-ypc-offers-overlay-renderer"})],k8);var oqb;var pqb;var l8=function(){var a=O.apply(this,arguments)||this;a.isSafari=void 0;a.microphoneSpinnerActive=!1;a.noAnimations=!1;a.boundExitClick=function(){a.onExitButtonClick()}; a.speechOverlayClassName="";a.isLevelAnimating=!1;a.actionMap={"yt-speech-query-complete-action":"handleSpeechQueryCompleteAction"};return a}; p(l8,O);e=l8.prototype;e.configureRendererStamper=function(){return{"data.exitButton":{id:"exit-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundExitClick]]"}}}}}}; e.attached=function(){this.setAttribute("dialog","true");this.ytActionHandlerBehavior.actionMap=this.actionMap;this.manager=sdb()}; e.dataChanged=function(){this.logDialog()}; e.onPopupClosed=function(){this.manager&&(this.manager.reset(),this.manager.stop())}; e.handleSpeechQueryCompleteAction=function(a){var b=a.navigationAction;b&&(a.trackingParams&&RL(OL(),a.trackingParams,this.dialogVe,5),this.fire("yt-navigate",{endpoint:b,tempData:this.getNavigationParams(),createScreenConfig:{parentLayer:5}}),this.closeDialog())}; e.onExitButtonClick=function(){this.closeDialog()}; e.onMicrophoneTap=function(){var a,b;"listening"===this.state||"transcribing"===this.state?null===(a=this.manager)||void 0===a?void 0:(a.setState("microphone-off"),a.stop()):null===(b=this.manager)||void 0===b?void 0:b.start()}; e.transcriptionChanged=function(){this.setState("transcribing",this.transcription)}; e.stateChanged=function(){this.setState(this.state,this.transcription)}; e.logDialog=function(){var a;if(null!==(a=this.data)&&void 0!==a&&a.trackingParams){var b=OL();PL(b,22678,void 0,{layer:5,parentLayer:0});this.dialogVe=RL(b,this.data.trackingParams,void 0,5)}}; e.getNavigationParams=function(){var a=window.ytvoicesearchloggingparams,b={};a&&(a=a())&&(b.oq=a.oq,b.gs_l=a.gs_l);return b}; e.closeDialog=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-voice-search-dialog-renderer"])}; e.setState=function(a,b){if(this.data){var c=this.data,d={};switch(a){case"listening":d={headerText:c.placeholderHeader,microphoneState:"listening"};break;case"timeout":d={headerText:c.promptHeader,microphoneState:"try-again",microphoneLabel:c.promptMicrophoneLabel};break;case"microphone-off":d={headerText:c.microphoneOffPromptHeader,microphoneState:"try-again",microphoneLabel:c.promptMicrophoneLabel};break;case"transcribing":d=b?{transcriptionLow:null===b||void 0===b?void 0:b.low,transcriptionHigh:null=== b||void 0===b?void 0:b.high,microphoneState:"speaking"}:{headerText:c.placeholderHeader,microphoneState:"speaking"};break;case"processing":d={headerText:c.loadingHeader,microphoneState:"processing"};break;case"offline":d={headerText:c.connectionErrorHeader,microphoneState:"try-again",microphoneLabel:c.connectionErrorMicrophoneLabel};break;case"permission":d={headerText:c.permissionsHeader,bodyLine1:c.permissionsSubtext,microphoneState:"try-again"};break;case"permission-denied":d={headerText:c.disabledHeader, bodyLine1:c.disabledSubtext,microphoneState:"try-again"};}d.className=a;this.speechOverlayState=d;this.setClass(this.speechOverlayState.className);this.setMicrophoneState(this.speechOverlayState.microphoneState)}}; e.setMicrophoneState=function(a){var b=this.isLevelAnimating;this.isLevelAnimating="speaking"===a;!b&&this.isLevelAnimating&&this.runLevelAnimation();this.microphoneSpinnerActive="processing"===a&&!this.noAnimations}; e.setClass=function(a){this.speechOverlayClassName&&this.toggleClass(this.speechOverlayClassName,!1);a&&(this.speechOverlayClassName=a,this.toggleClass(a,!0))}; e.runLevelAnimation=function(){var a=this;if(!this.noAnimations&&this.level)if(this.isLevelAnimating){var b=1+.75*Math.random(),c=Math.round(110+10*Math.random());this.level.style.setProperty("transition","transform "+c/1E3+"s ease-in-out");this.level.style.setProperty("transform","scale("+b+")");Bk.addJob(function(){a.runLevelAnimation()},3,c)}else this.level.style.removeProperty("opacity"),this.level.style.removeProperty("transition"),this.level.style.removeProperty("transform")}; h.Object.defineProperties(l8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pqb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
[[speechOverlayState.transcriptionHigh]]
\n
[[speechOverlayState.transcriptionLow]]
\n
\n
\n
\n
\n
[[getSimpleString(speechOverlayState.bodyLine1)]]
\n
[[getSimpleString(speechOverlayState.bodyLine2)]]
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
[[getSimpleString(speechOverlayState.microphoneLabel)]]
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===oqb){var d=document.createElement("template");d.innerHTML=""; oqb=d}d=oqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);pqb=a}a=pqb;return a}}}); var m8=l8;m8.prototype.stateChanged=m8.prototype.stateChanged;m8.prototype.transcriptionChanged=m8.prototype.transcriptionChanged;m8.prototype.onPopupClosed=m8.prototype.onPopupClosed;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],m8.prototype,"ytActionHandlerBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],m8.prototype,"ytActionSenderBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],m8.prototype,"ytRendererBehavior",void 0); w([P(Y),x("design:type",Object)],m8.prototype,"rendererStamperBehavior",void 0);w([P(IQ),x("design:type",Object)],m8.prototype,"ytdReduxBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],m8.prototype,"eventForwardingBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],m8.prototype,"data",void 0);w([R(),x("design:type",Object)],m8.prototype,"speechOverlayState",void 0);w([R(),x("design:type",Object)],m8.prototype,"microphoneSpinnerActive",void 0); w([R({type:Boolean,reflectToAttribute:!0}),x("design:type",Object)],m8.prototype,"noAnimations",void 0);w([R({selector:function(a){var b;return null===(b=a.voiceSearch)||void 0===b?void 0:b.transcription}}), x("design:type",Object)],m8.prototype,"transcription",void 0);w([R({selector:function(a){var b;return null===(b=a.voiceSearch)||void 0===b?void 0:b.overlay}}), x("design:type",String)],m8.prototype,"state",void 0);w([R(),x("design:type",Object)],m8.prototype,"boundExitClick",void 0);w([AE("#microphone-levels"),x("design:type",HTMLElement)],m8.prototype,"level",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m8.prototype,"onPopupClosed",null);w([yE("transcription"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m8.prototype,"transcriptionChanged",null); w([yE("state"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m8.prototype,"stateChanged",null);m8=w([U({is:"ytd-voice-search-dialog-renderer"})],m8);var qqb;var rqb;var n8=function(){var a=O.apply(this,arguments)||this;a.duration=4E3;a.numDownloadingVideos=0;a.isFullScreen=!1;a.actionMap={"yt-fullscreen-change-action":"handleFullscreenChange"};return a}; p(n8,O);n8.prototype.open=function(){this.notificationActionRenderer.open()}; n8.prototype.close=function(){this.notificationActionRenderer.close()}; n8.prototype.updatePopup=function(){if(this.data&&!this.isFullScreen)if(0===this.numDownloadingVideos)this.close();else{var a=zL(nL("VIDEOS_DOWNLOADING",this.numDownloadingVideos));this.set("data.responseText",a);this.open()}}; n8.prototype.handleFullscreenChange=function(a){(this.isFullScreen=a)||this.updatePopup()}; h.Object.defineProperties(n8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rqb){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(lP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(kP().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qqb){var d=document.createElement("template");d.innerHTML=""; qqb=d}d=qqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rqb=a}a=rqb;return a}}}); var o8=n8;o8.prototype.updatePopup=o8.prototype.updatePopup;w([P(W.YtRendererBehavior),x("design:type",Object)],o8.prototype,"ytRendererBehavior",void 0);w([P(IQ),x("design:type",Object)],o8.prototype,"ytdReduxBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],o8.prototype,"ytEventForwardingBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],o8.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],o8.prototype,"data",void 0); w([R(),x("design:type",Number)],o8.prototype,"duration",void 0);w([R({selector:U0a}),x("design:type",Number)],o8.prototype,"numDownloadingVideos",void 0);w([AE("yt-notification-action-renderer"),x("design:type",Object)],o8.prototype,"notificationActionRenderer",void 0);w([yE("numDownloadingVideos"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o8.prototype,"updatePopup",null);o8=w([U({is:"ytd-video-download-toast-renderer"})],o8);var sqb;var tqb;var p8=function(){return O.apply(this,arguments)||this}; p(p8,O);p8.prototype.computeThumbnailUrl=function(a){return a&&a.thumbnails?LO(a.thumbnails,122):null}; p8.prototype.computeUrlForEndpoint=function(a){return wL(a)}; h.Object.defineProperties(p8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tqb){var a=document.createElement("template");a.innerHTML="\"[[data.logoTitleText]]\"\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===sqb){var d=document.createElement("template");d.innerHTML="";sqb=d}d=sqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); tqb=a}a=tqb;return a}}}); var q8=p8;w([P(W.YtRendererBehavior),x("design:type",Object)],q8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],q8.prototype,"data",void 0);q8=w([U({is:"ytd-yoodle-renderer"})],q8);var uqb;var vqb;var r8=function(){return O.apply(this,arguments)||this}; p(r8,O);r8.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; h.Object.defineProperties(r8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vqb){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===uqb){var d=document.createElement("template");d.innerHTML=""; uqb=d}d=uqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vqb=a}a=vqb;return a}}}); var s8=r8;w([P(W.YtRendererBehavior),x("design:type",Object)],s8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],s8.prototype,"data",void 0);s8=w([U({is:"ytd-ypc-transaction-error-message-renderer"})],s8);var wqb;var xqb;var yqb;var zqb;var t8=function(){var a=O.apply(this,arguments)||this;a.hasFocus=!1;a.sboxJsUrl_="";return a}; p(t8,O);e=t8.prototype;e.created=function(){this.searchButton_=this.querySelector("#search-icon-legacy")}; e.attached=function(){var a=this;this.hasAttribute("role")||this.setAttribute("role","search");this.listen(document,"yt-navigate-finish","onYtNavigateFinish_");Polymer.dom(this.$.container).observeNodes(function(b){db(b.addedNodes,function(c){1==c.nodeType&&"search-input"==c.id&&(this.searchInput_=c.firstElementChild,this.loadSearchbox_(),this.searchInput_.hidden=!1,this.listen(this.searchInput_,"focus","onInputFocus_"),this.listen(this.searchInput_,"blur","onInputBlur_"))},a)})}; e.focus=function(){this.searchInput_.focus()}; e.computePlaceholder_=function(a,b){a=a?CL(a):mL("SBOX_PLACEHOLDER",void 0,"Search");b&&(b.placeholder=a,b.setAttribute("aria-label",a));return a}; e.hideKeyboard=function(){var a=document.getElementById("kbd"),b=document.querySelector(".gsst_a");a&&b&&"none"!=a.style.display&&b.click()}; e.search_=function(a){var b,c,d=this.searchInput_.value,f=!0;if(d){qd("REFINEMENTS_TUPLE",["ClearBySearchbox",[]]);this.data&&(a.itct=this.data.trackingParams);var g=this.data&&this.data.searchEndpoint;if(g){var l=y.unsafeClone(g);l.searchEndpoint&&(l.searchEndpoint.query=d);(null===(c=null===(b=l.commandMetadata)||void 0===b?void 0:b.webCommandMetadata)||void 0===c?0:c.url)?(f=Nd(l.commandMetadata.webCommandMetadata.url,"search_query",d),f=f.replace(/%20/g,"+"),l.commandMetadata.webCommandMetadata.url= f,g.clickTrackingParams&&(a.itct=g.clickTrackingParams),this.fire("yt-navigate",{endpoint:l,tempData:a}),f=!1):td(Error("SearchEndpoint missing url. Endpoint: "+JSON.stringify(g)))}this.previousQuery_=d}return f}; e.onYtNavigateFinish_=function(){var a=this,b=location.href;if(0<=b.indexOf("/results")){var c=Ld(b,"q")||Ld(b,"search_query");c&&(this.searchInput_?this.searchInput_.value=c:Polymer.RenderStatus.afterNextRender(this,function(){a.searchInput_.value=c}))}}; e.initializeSearchbox_=function(){var a=A("SBOX_SETTINGS");a.SBOX_STRINGS={SBOX_REPORT_SUGGESTIONS:mL("SBOX_INAPPROPRIATE_PROMPT",void 0,"Report search predictions")};a.SEARCHBOX_REPORTING=N("searchbox_reporting");a.SEARCHBOX_COMPONENT=this;return(a=Ja("yt.www.masthead.searchbox.initPolymer"))?(a(this.$["search-form"],this.searchInput_,this.$["search-icon-legacy"],this.search_.bind(this)),this.searchInput_.classList.add("ytd-searchbox"),!0):!1}; e.loadSearchbox_=function(){var a=A("SBOX_JS_URL",this.sboxJsUrl_);a&&(this.sboxJsUrl_=a,this.initializeSearchbox_()||this.setupSearchboxLoad_(a,this.initializeSearchbox_.bind(this)))}; e.setupSearchboxLoad_=function(a,b){var c=this,d=function(){c.cancelSearchboxLoad_();c.sboxJsCallback_=b;try{kJ(a,b)}catch(n){ud(n)}pk([f,g,l,m])}; var f=qk(this.searchInput_,"mouseover",d);var g=qk(this.searchInput_,"keypress",d);var l=qk(this.searchButton_,"mouseover",d);var m=qk(this.searchButton_,"keypress",d)}; e.cancelSearchboxLoad_=function(){if(!Ja("yt.www.masthead.searchbox.initPolymer")){try{vKa(this.sboxJsUrl_,this.sboxJsCallback_)}catch(a){}this.sboxJsCallback_=null}}; e.onInputFocus_=function(){this.hasFocus=!0;this.fire("yt-autonav-pause-focus")}; e.onInputBlur_=function(){this.hasFocus=!1;this.fire("yt-autonav-pause-blur")}; e.logSearchboxVisibility_=function(){var a,b=null===(a=this.data)||void 0===a?void 0:a.trackingParams,c=On();c&&b&&OJ(c,In(b))}; e.openReportForm=function(a){a={openPopupAction:{popup:{searchSuggestionReportDialog:{searchQuery:this.searchInput_.value,title:mL("SBOX_INAPPROPRIATE_TITLE"),suggestions:a,catagoryLabel:mL("SBOX_INAPPROPRIATE_CATEGORY"),catagories:[{id:1,label:mL("SBOX_INAPPROPRIATE_HATEFUL")},{id:2,label:mL("SBOX_INAPPROPRIATE_EXPLICIT")},{id:3,label:mL("SBOX_INAPPROPRIATE_VIOLENT")},{id:4,label:mL("SBOX_INAPPROPRIATE_DANGEROUS")},{id:5,label:mL("SBOX_INAPPROPRIATE_OTHER"),reasonLabel:mL("SBOX_INAPPROPRIATE_REASON")}], detailsPlaceholderLabel:mL("SBOX_INAPPROPRIATE_ADDITIONAL"),cancelButtonLabel:mL("SBOX_INAPPROPRIATE_CANCEL"),submitButtonLabel:mL("SBOX_INAPPROPRIATE_REPORT")}},popupType:"DIALOG"}};this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[a,this])}; e.getPreviousQuery=function(){return this.previousQuery_?this.previousQuery_:null}; e.getRefinementsTuple=function(){if("REFINEMENTS_TUPLE"in pd){var a=A("REFINEMENTS_TUPLE",void 0);qd("REFINEMENTS_TUPLE",void 0);return a}return null}; e.getForm=function(){return this.$["search-form"]}; h.Object.defineProperties(t8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zqb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yqb){var d=document.createElement("template");d.innerHTML=""; yqb=d}d=yqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zqb=a}a=zqb;return a}}}); var u8=t8;u8.prototype.getRefinementsTuple=u8.prototype.getRefinementsTuple;u8.prototype.getPreviousQuery=u8.prototype.getPreviousQuery;u8.prototype.openReportForm=u8.prototype.openReportForm;u8.prototype.logSearchboxVisibility_=u8.prototype.logSearchboxVisibility_;w([P(W.YtRendererBehavior),x("design:type",Object)],u8.prototype,"ytRendererBehavior",void 0);w([P(V.YtActionSenderBehavior),x("design:type",Object)],u8.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],u8.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],u8.prototype,"hasFocus",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],u8.prototype,"icon_",void 0);w([R({computed:"computePlaceholder_(data.placeholderText, searchInput_)"}),x("design:type",String)],u8.prototype,"placeholder_",void 0);w([R(),x("design:type",Object)],u8.prototype,"searchInput_",void 0); w([yE("data.trackingParams"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u8.prototype,"logSearchboxVisibility_",null);u8=w([U({is:"ytd-searchbox"})],u8);var Aqb;var Bqb;var v8=function(){var a=O.apply(this,arguments)||this;a.isTimeForYoodle=!1;a.actionMap={"yt-navigate-home-action":"onNavigateHomeAction"};return a}; p(v8,O);e=v8.prototype;e.created=function(){var a=this;this.yoodleManager=new udb(function(b){a.isTimeForYoodle=b})}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.computeIsRedLogo=function(a){return"YOUTUBE_RED_LOGO"===a||"YOUTUBE_PREMIUM_LOGO"===a}; e.computeTooltipText=function(a){return CL(a)}; e.computeShowYoodle=function(a,b,c){return a&&N("enable_yoodle_web")&&b&&!!c}; e.computeYoodleData=function(a,b,c,d){if(N("enable_yoodle_web")&&d){if(fk("yoodle_base_url")){d=fk("yoodle_base_url");var f=fk("yoodle_webp_base_url");a={thumbnail:{thumbnails:[{url:""+(f?f:d)+(b?"_light":"_dark")+(a?"_premium":"")+"."+(f?"webp":"png"),width:110,height:30}]},logoTitleText:fk("yoodle_alt_text")||c}}else a=void 0;return a}}; e.onNavigateHomeAction=function(){this.$$(".yt-simple-endpoint").click()}; e.computeLogoHref=function(a){a=this.componentBehavior.computeHref_(a);return!a&&N("kevlar_topbar_logo_fallback_home")?"/":a}; e.getEndpointForm=function(){return{disableCache:!0}}; h.Object.defineProperties(v8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Bqb){var a=document.createElement("template");a.innerHTML="\n \n \n\n[[countryCode]]\n"; a.content.insertBefore(lXa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Aqb){var d=document.createElement("template");d.innerHTML=""; Aqb=d}d=Aqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bqb=a}a=Bqb;return a}}}); var w8=v8;w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],w8.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],w8.prototype,"ytRendererBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],w8.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],w8.prototype,"data",void 0);w([R(),x("design:type",String)],w8.prototype,"countryCode",void 0);w([R(),x("design:type",Boolean)],w8.prototype,"isTimeForYoodle",void 0); w([R({value:!1,computed:"computeIsRedLogo(data.iconImage.iconType)"}),x("design:type",Boolean)],w8.prototype,"isRedLogo",void 0);w([R({computed:"computeTooltipText(data.tooltipText)"}),x("design:type",String)],w8.prototype,"tooltipText",void 0);w([R({computed:"computeYoodleData(isRedLogo, isWhite, tooltipText, isTimeForYoodle)"}),x("design:type",Object)],w8.prototype,"yoodleData",void 0);w([R({value:!1}),x("design:type",Boolean)],w8.prototype,"isWhite",void 0); w([R({value:!1}),x("design:type",Boolean)],w8.prototype,"useYoodle",void 0);w([R({computed:"computeShowYoodle(useYoodle,isTimeForYoodle,yoodleData)"}),x("design:type",Boolean)],w8.prototype,"showYoodle",void 0);w8=w([U({is:"ytd-topbar-logo-renderer"})],w8);var Cqb=document.createElement("template");Cqb.innerHTML="";document.head.appendChild(Cqb.content);var Dqb={}; Dqb.YtSwatchBehavior={_noAccessors:!0,properties:{swatch:{type:Object,observer:"updateStylesOnSwatchChanged_"}},created:function(){var a=this;this.LIGHT_TEXT_COLOR_=[255,255,255];this.DARK_TEXT_COLOR_=[17,17,17,.6];this.LIGHTENED_DARK_TEXT_COLOR_=[17,17,17,.4];this.RGB_MASK_=16777215;this.RED_MASK_=16711680;this.GREEN_MASK_=65280;this.BLUE_MASK_=255;this.baseColor_="#fff";this.isHighContrastBlack_=!1;Polymer.RenderStatus.afterNextRender(this,function(){if(null==KUa){var b=ag(),c=b.getDocument(),d= b.createElement("div");d.style.backgroundColor="rgb(1, 2, 3)";b.appendChild(c.body,d);c=ph(d,"backgroundColor");c=c.replace(/ /g,"");KUa="rgb(0,0,0)"===c?"black":"rgb(255,255,255)"===c?"white":null;b.removeNode(d)}a.isHighContrastBlack_="black"==KUa;a.isHighContrastBlack_&&a.setSwatch("#000")}); this.DEFAULT_MODE_BASE_COLOR="#fff";this.THEATER_MODE_BASE_COLOR="#232323";this.DEFAULT_DOCUMENT_BACKGROUND_COLOR="#fff";this.DARKMODE_DOCUMENT_BACKGROUND_COLOR="#131313";this.DARKMODE_META_THEME_COLOR=[33,33,33,.98];this.LIGHTMODE_META_THEME_COLOR=[255,255,255,.98]}, rgbStyle_:function(a){return 3==a.length?"rgb("+a.join(",")+")":"rgba("+a.join(",")+")"}, resetSwatch:function(){this.setSwatch("#fff")}, isAppDarkTheme_:function(){return document.documentElement.hasAttribute("dark")}, metaThemeColor_:function(a){return a?this.rgbStyle_(this.DARKMODE_META_THEME_COLOR):this.rgbStyle_(this.LIGHTMODE_META_THEME_COLOR)}, setSwatchWithArgb:function(a){a&=this.RGB_MASK_;var b=[(a&this.RED_MASK_)>>16,(a&this.GREEN_MASK_)>>8,a&this.BLUE_MASK_];a&&this.setSwatch(EE(b))}, getCurrentSwatch:function(){return this.baseColor_}, setSwatch:function(a){this.isHighContrastBlack_&&(a="#000");if(this.baseColor_!=a){var b=a;if(!wCa.test(b))throw Error("'"+b+"' is not a valid hex color");4==b.length&&(b=b.replace(vCa,"#$1$1$2$2$3$3"));b=b.toLowerCase();b=parseInt(b.substr(1),16);b=[b>>16,b>>8&255,b&255];var c=[0,0,0];var d=Uf(.1,0,1);d=[Math.round(b[0]+d*(c[0]-b[0])),Math.round(b[1]+d*(c[1]-b[1])),Math.round(b[2]+d*(c[2]-b[2]))];var f=this.isTextLightColor_(b),g="#ffffff"===EE(b);c=this.DARK_TEXT_COLOR_;g?c=this.LIGHTENED_DARK_TEXT_COLOR_: f&&(c=this.LIGHT_TEXT_COLOR_);f=g?"":this.rgbStyle_(c);g=g?"":this.rgbStyle_(this.LIGHT_TEXT_COLOR_);var l=FE(136,136,136);this.set("swatch",{baseColor:a,iconColor:l,inputText:this.pickInputTextColor_(b),logoOverrideColor:g,primary:this.rgbStyle_(b),primaryDarker:this.rgbStyle_(d),textColor:this.rgbStyle_(c),textImportantColor:f,textboxBg:this.pickTextboxBgColor_(b)});this.fire("yt-swatch-changed",this.swatch)}}, isTextLightColor_:function(a){return .5>(.299*a[0]+.587*a[1]+.114*a[2])/255}, pickInputTextColor_:function(a){return"#ffffff"==EE(a)?FE(17,17,17):"#232323"==EE(a)?FE(255,255,255):FE(17,17,17)}, pickTextboxBgColor_:function(a){return"#ffffff"==EE(a)?FE(255,255,255):"#232323"==EE(a)?FE(19,19,19):FE(255,255,255)}, applySwatchToElement:function(a,b){a&&b&&b.baseColor!=a.baseColor_&&(a.baseColor_=b.baseColor,a.updateStyles({"--yt-swatch-primary":this.swatch.primary,"--yt-swatch-primary-darker":this.swatch.primaryDarker,"--yt-swatch-text":this.swatch.textColor,"--yt-swatch-important-text":this.swatch.textImportantColor,"--yt-swatch-input-text":this.swatch.inputText,"--yt-swatch-textbox-bg":this.swatch.textboxBg,"--yt-swatch-logo-override":this.swatch.logoOverrideColor,"--yt-swatch-icon-color":this.swatch.iconColor}))}, updateStylesOnSwatchChanged_:function(a){this.applySwatchToElement(this,a)}};Polymer({is:"ytd-masthead",_template:function(){if(void 0!==xqb)return xqb;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n \n \n \n \n \n [[menuStrings_.BACK_ALT_LABEL]]\n \n \n \n \n \n \n \n
\n
\n
\n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wqb){var d=document.createElement("template");d.innerHTML=""; wqb=d}d=wqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return xqb=a}, behaviors:[Polymer.IronResizableBehavior,L1a.YtdExpandableInputBehavior,DQ.YtdGuideStateAwareBehavior,Y,AO.YtComponentBehavior,W.YtRendererBehavior,Dqb.YtSwatchBehavior],hostAttributes:{role:"banner"},properties:{data:{type:Object,observer:"dataChanged_"},narrow_:{type:Boolean,value:!1,observer:"narrowChanged_"},voiceEnabled_:Boolean,menuStrings_:{type:Object,value:{BACK_ALT_LABEL:mL("BACK_ALT_LABEL",void 0,"Back"),GUIDE_ALT_LABEL:mL("GUIDE_ALT_LABEL",void 0,"Guide"),LOGO_ALT_LABEL:mL("LOGO_ALT_LABEL", void 0,"YouTube Home"),SEARCH_ALT_LABEL:mL("SBOX_PLACEHOLDER",void 0,"Search")}},dark:{type:Boolean,reflectToAttribute:!0},boundOnTapVoiceButton:{type:Function,value:function(){return this.onVoiceTap_.bind(this)}}}, listeners:{"iron-resize":"onIronResize_","yt-consent-bump-display-changed":"onYtConsentBumpDisplayChanged_","yt-rendererstamper-finished":"onRendererStamperFinished_"},stampDom:{"data.ticker":{id:"ticker",mapping:{consentBumpRenderer:"ytd-consent-bump-renderer"}},"data.interstitial":{id:"interstitial",mapping:{consentBumpRenderer:"ytd-consent-bump-renderer"}},"data.voiceSearchButton":{id:"voice-search-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapVoiceButton]]"}}}}, "data.topbarButtons":{id:"buttons",events:!0,mapping:{buttonRenderer:"ytd-button-renderer",notificationTopbarButtonRenderer:"ytd-notification-topbar-button-renderer",topbarMenuButtonRenderer:"ytd-topbar-menu-button-renderer"},initialRenderPriority:1},"data.a11ySkipNavigationButton":{id:"skip-navigation",mapping:{buttonRenderer:"ytd-button-renderer"}}},created:function(){this.guideKeyboardToggle_=this.areGhostCardsHidden_=this.isDarkThemeForced=!1;this.voiceSearchManager_=sdb()}, attached:function(){var a=this,b=Wn(Un.getInstance(),"aa");this.toggleClass("shell",!1);!this.classList.contains("dark")&&!this.classList.contains("theater")||b||(this.isDarkThemeForced=this.dark=!0);this.$.logo.hidden=!0;Polymer.RenderStatus.afterNextRender(this,function(){var c=a.getParentRenderer_();c&&c.registerRenderer_(a)})}, dataChanged_:function(a){a&&(a.voiceSearchButton&&(this.voiceEnabled_=sdb().isSupported()),a.onReceivedActions&&0\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Eqb){var d=document.createElement("template");d.innerHTML=""; Eqb=d}d=Eqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fqb=a}a=Fqb;return a}}}); var y8=x8;w([R(),x("design:type",String)],y8.prototype,"bannerString",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],y8.prototype,"bannerVisible",void 0);y8=w([U({is:"ytd-network-status-banner"})],y8);var Gqb;var Hqb;var z8=function(a){var b=a.openPopupAction,c=a.target,d=a.container,f=a.popupContainerConfig;a=a.getElement;this.popupContent=this.popup=void 0;this.openPopupAction=b;this.target=c;this.container_=d;this.popupContainerConfig_=f;this.naturalHeight_=void 0;this.getElement_=a;this.popupConfig_=this.popupContainerConfig_.popupConfig[this.openPopupAction.popupType];b=(b=Iqb(this))?BL(b,bdb(this.popupContainerConfig_,b)):"";this.rendererName=b;b=this.popupConfig_.component;this.popupContent=Jqb(this,this.rendererName); b?(this.popup=Jqb(this,b),N("kevlar_keyboard_button_focus")&&(this.popup.restoreFocusOnClose=!0),this.popupConfig_.slotName&&this.popupContent.setAttribute("slot",this.popupConfig_.slotName),Polymer.dom(this.popup).appendChild(this.popupContent),document.body.appendChild(this.popup)):this.popup=this.popupContent;Polymer.dom(this.container_.root).appendChild(this.popup)}; z8.prototype.updatePopup=function(a){this.openPopupAction=a;Kqb(this);Lqb(this);N("kevlar_keyboard_button_focus")&&(this.popup.restoreFocusOnClose=!0)}; z8.prototype.refit=function(){this.popup.opened&&this.popup.refit()}; var Nqb=function(a,b){Mqb(a,b&&a.popupConfig_.narrowProperties?a.popupConfig_.narrowProperties:a.popupConfig_.properties);a.isRtl_()&&Mqb(a,a.popupConfig_.rtlProperties);Lqb(a)},Kqb=function(a){a.popupContent.set("data",(0,y.unsafeClone)(a.openPopupAction.popup[Iqb(a)])); a.popupContent.duration=a.getPopupDurationMs_();a.popupContent.positionType=a.openPopupAction.position;var b=a.openPopupAction.properties;b&&Object.keys(b).forEach(function(c){a.popupContent[c]=b[c]})},Mqb=function(a,b){if(b)for(var c in b)a.popup[c]=b[c]},Lqb=function(a){if(a.openPopupAction.position){var b=a.popupConfig_.positionalProperties&&a.popupConfig_.positionalProperties[a.openPopupAction.position],c=a.popupConfig_.rtlPositionalProperties&&a.popupConfig_.rtlPositionalProperties[a.openPopupAction.position]; b=a.isRtl_()&&c?c:b;b.shiftedHorizontalOffset&&(c=a.popup.style.display,a.popup.style.display="block",a.popupContent&&a.popup.positionTarget&&a.popupContent.clientWidth>a.popup.positionTarget.clientWidth&&(b.horizontalOffset=a.popup.positionTarget.clientWidth/2-b.shiftedHorizontalOffset),a.popup.style.display=c);Mqb(a,b)}},Oqb=function(a,b){if(b)for(var c in b)a.popup.style[c]=b[c]},Iqb=function(a){return AL(a.openPopupAction.popup,"renderer")||AL(a.openPopupAction.popup,"dialog")||void 0}; z8.prototype.getPopupDurationMs_=function(){var a=this.openPopupAction.durationHintMs;return 0===a?a:Math.max(4E3,a||4E3)}; z8.prototype.isRtl_=function(){return"rtl"==A("HTML_DIR")}; var Jqb=function(a,b){(a=a.getElement_(b,a.target))?a.is?a.set||vm(new Pl("popup getElement result is not initialized",b)):vm(new Pl("popup getElement result is not a polymer element",b)):vm(new Pl("popup getElement returned null",b));return a};var Pqb=[AO.YtComponentBehavior,NO.YtActionHandlerBehavior,{created:function(){this.popupContainerConfig=null;this.popups_={};this.popupContainerActionMap_={"yt-close-popup-action":"handleClosePopupAction_","yt-close-popups-action":"handleClosePopupsAction_","yt-close-all-popups-action":"handleCloseAllPopupsAction_","yt-get-popup-opened-action":"handleGetPopupOpenedAction_","yt-get-opened-popups-action":"handleGetOpenedPopupsAction_","yt-open-popup-action":"handleOpenPopupAction_","yt-signal-action-close-popup":"handleSignalActionClosePopup_", "yt-window-scrolled":"windowResizedOrScrolled_","yt-window-resized":"windowResizedOrScrolled_","yt-refit-popups-action":"refitPopups_"};this.narrowMediaQuery_=void 0;this.repositionEventsBound_=!1;this.setPopupVisibilityJobId_=this.setPopupPositioningJobId_=0;this.dynamicallyPositionedElements_=new Set}, attached:function(){this.registerActionMap(this.popupContainerActionMap_);qLa(this,!1)}, detached:function(){this.unregisterActionMap(this.popupContainerActionMap_);sLa(this)}, windowResizedOrScrolled_:function(){this.setPopupPositioningJobId_||(this.setPopupPositioningJobId_=yk(Bk,this.setPopupPositioning_.bind(this)));this.setPopupVisibilityJobId_||(this.setPopupVisibilityJobId_=yk(Bk,this.setPopupVisibility_.bind(this)))}, setPopupPositioning_:function(){this.dynamicallyPositionedElements_.forEach(function(a){a.opened&&a.keepBelowPlayer&&this.ensurePopupBelowPlayer(a)},this); this.setPopupPositioningJobId_=0}, setPopupVisibility_:function(){for(var a in this.popups_){var b=this.popups_[a];if("refit"==b.popup.scrollAction){var c=b.popup.positionTarget.getBoundingClientRect(),d=b.popup;c=c.top;var f=b;if(!f.naturalHeight_){f.popup.hidden=!1;f.popup.style.position="fixed";f.popup.style.top="0px";f.popup.style.left="0px";var g=f.popup.getBoundingClientRect();f.naturalHeight_=g.bottom-g.top;f.popup.refit()}d.hidden=!(c>=f.naturalHeight_+60);0==b.popupContent.clientHeight&&b.popup.refit()}}this.setPopupVisibilityJobId_= 0}, ensurePopupBelowPlayer:function(){return!1}, initPopupContainerBehavior:function(a){this.popupContainerConfig=a}, handleOpenPopupAction_:function(a,b){var c=a.openPopupAction,d=this.ensurePopup_(c,b);return new Ki(function(f){d.then(function(g){if(!g)return f();this.maybeCreateNarrowMediaQuery_();var l=this.popups_[this.createCacheKey(g.rendererName,g.openPopupAction.uniqueId)],m=!(!l||!l.openPopupAction.beReused);m=!!c.reusePopup||m;if(g.popup.opened&&!m){this.handleClosePopupAction_(g.rendererName,g.openPopupAction.uniqueId);if(l&&l.target==b&&!g.openPopupAction.replacePopup)return f();Polymer.RenderStatus.afterNextRender(g.popup, function(){this.completeOpenPopupAction_(c,b,g);f()}.bind(this))}else g.popup.opened?g.updatePopup(c):this.completeOpenPopupAction_(c,b,g),f()}.bind(this))}.bind(this))}, completeOpenPopupAction_:function(a,b,c){var d=this.narrowMediaQuery_.queryMatches;c.target=b;b=c.target.popupPositionTarget||c.target;c.popupConfig_.targetContainer&&(b=c.container_);c.popup.positionTarget=b;c.popupContent.positionTarget=b;c.popupConfig_.forceFocus&&(c.popupContent.tabIndex=0,c.popupContent.style.outline="none");N("kevlar_autofocus_menu_on_keyboard_nav")&&(c.popupContent.tabIndex=-1);c.popupConfig_.narrowProperties&&(c.popup.style.position="static");c.popupConfig_.preventAutonav&& c.popup.setAttribute("prevent-autonav",!0);c.popupConfig_.forceCloseOnOutsideClick&&c.popup.setAttribute("force-close-on-outside-click",!0);Nqb(c,d);Oqb(c,c.popupConfig_.styles);c.isRtl_()&&Oqb(c,c.popupConfig_.rtlStyles);c.openPopupAction.shouldStopParentSignal||c.popupContent.startForwardingEvents&&c.target.parentComponent!=c.popupContent&&c.popupContent!=c.target&&c.popupContent.startForwardingEvents(c.popupContainerConfig_.forwardedEvents,c.target);c.updatePopup(a);a=c.popup;this.listen(a,"iron-overlay-opened", "onPopupIronOverlayOpened_");this.listen(a,"iron-overlay-closed","onPopupIronOverlayClosed_");this.listen(a,"iron-overlay-canceled","onPopupIronOverlayCanceled_");this.listen(a,"yt-refit","refitPopup_");this.listen(a,"yt-invalidate-popup-tabbables","handleInvalidatePopupTabbables_");a.open()}, getPopupDurationMs_:function(a){return 0===a.durationHintMs?a.durationHintMs:Math.max(4E3,a.durationHintMs||4E3)}, handleClosePopupAction_:function(a,b){a=a?(a=this.popups_[this.createCacheKey(a,b)])&&a.popup:yI(Polymer.IronOverlayManager);if(a&&a.close){if(b=this.getInterface(eP))a.restoreFocusOnClose=b.isKeyBoardInUse();a.close()}}, handleCloseAllPopupsAction_:function(a){var b={},c;for(c in this.popups_){b.$jscomp$loop$prop$key$2402=c;if(!a||!a.some(function(f){return function(g){return g==f.$jscomp$loop$prop$key$2402}}(b))){var d=this.popups_[b.$jscomp$loop$prop$key$2402].popup; d&&d.close&&d.close()}b={$jscomp$loop$prop$key$2402:b.$jscomp$loop$prop$key$2402}}}, handleClosePopupsAction_:function(a){a.forEach(function(b){(b=this.popups_[b])&&(b=b.popup)&&b.close&&b.close()}.bind(this))}, handleGetPopupOpenedAction_:function(a,b){return(b=this.createCacheKey(a,b))&&this.popups_[b]?this.popups_[a].popup.opened:!1}, handleGetOpenedPopupsAction_:function(){var a=[],b;for(b in this.popups_){var c=this.popups_[b];c.popup.opened&&a.push(c)}return a}, handleSignalActionClosePopup_:function(){this.handleCloseAllPopupsAction_()}, ensurePopup_:function(a,b){this.maybeCreateNarrowMediaQuery_();var c=AL(a.popup,"renderer")||AL(a.popup,"dialog");if(!c)return Mi();c=BL(c,bdb(this.popupContainerConfig,c));return Mi(this.getAndMaybeCreatePopup_(a,c,b))}, getAndMaybeCreatePopup_:function(a,b,c){b=this.createCacheKey(b,a.uniqueId);if(this.popups_[b])return this.popups_[b];a=new z8({openPopupAction:a,target:c,container:this,popupContainerConfig:this.popupContainerConfig,getElement:this.getElement.bind(this)});return this.popups_[b]=a}, getElement:function(){return null}, maybeCreateNarrowMediaQuery_:function(){this.narrowMediaQuery_||(this.narrowMediaQuery_=document.createElement("iron-media-query"),this.narrowMediaQuery_.query="(max-width: 656px)",this.listen(this.narrowMediaQuery_,"query-matches-changed","openPopupQueryMatchesChanged_"),Polymer.dom(this).appendChild(this.narrowMediaQuery_))}, openPopupQueryMatchesChanged_:function(a){a=a.detail.value;for(var b in this.popups_)Nqb(this.popups_[b],a)}, onPopupIronOverlayClosed_:function(a){var b=a.currentTarget,c=b.getContentChildren();c=0c+this.getPopupHeight_(a,b)?(a.style.top="auto",a.style.bottom="0px"):(a.style.top=c+"px",a.style.bottom="auto");return!0}; A8.prototype.getPopupHeight_=function(a,b){b&&(a.cachedPopupHeight=0);if(!a.cachedPopupHeight){b=0;var c=a.clientHeight,d=window.getComputedStyle(a);b+=parseInt(d.marginTop,10);b+=parseInt(d.marginBottom,10);a.cachedPopupHeight=c+b}return a.cachedPopupHeight}; A8.prototype.getElement=function(a){return document.createElement(a)}; h.Object.defineProperties(A8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hqb){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c= b.insertBefore;if(void 0===Gqb){var d=document.createElement("template");d.innerHTML="";Gqb=d}d=Gqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hqb=a}a=Hqb;return a}}}); var B8=A8;w([P(Pqb),x("design:type",Object)],B8.prototype,"ytPopupContainerBehavior",void 0);w([P(AO.YtComponentBehavior),x("design:type",Object)],B8.prototype,"ytComponentBehavior",void 0);B8=w([U({is:"ytd-popup-container"})],B8);var Qqb;var Rqb;var Sqb={productId:"5047190",bucket:"suggest",enableAnonymousFeedback:!0,flow:"submit",allowNonLoggedInFeedback:!0};function Tqb(a,b,c,d,f,g){var l=y.clone(Sqb);l.locale=A("SBOX_SETTINGS",{}).REQUEST_LANGUAGE;l.report={description:f||""};f=A("SBOX_SETTINGS",{});b=b.join(",");var m=Wa();a={choice_cc:d,choice_id_cc:c,choices_sc:b,gl:f.REQUEST_DOMAIN,hl:f.REQUEST_LANGUAGE,query:a,time:m};g&&(a.choice_additional_comment_cc=g);cJ(l,a)} ;var C8=function(){return O.apply(this,arguments)||this}; p(C8,O);e=C8.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(a){if(void 0!==a){Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).forEach(function(c){c.checked=!1}); this.catagorySelected=this.suggestionSelected=!1;a=this;window.ShadyDOM&&window.ShadyDOM.noPatch||(a=Polymer.dom(this.root));a.querySelector("paper-radio-group").selected=null;var b=a.querySelector("#reason-text");b&&(b.value=null);a.querySelector("#description-text").value=null}}; e.canSubmit=function(a,b){this.fire("yt-invalidate-popup-tabbables");return!(a&&b)}; e.onCancel=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-search-suggestion-report-dialog"])}; e.onSubmit=function(){var a=Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).filter(function(g){return g.active}).map(function(g){return g.innerText.trim()}),b=this.querySelector("paper-radio-group"),c=b.selectedItem.name,d=b.selectedItem.innerText.trim(),f=b.querySelector("#reason-text"); b=void 0;f&&(b=f.value);(f=this.descriptionText.value)&&(f=f.trim());Tqb(this.data.searchQuery,a,c,d,f,b);this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-search-suggestion-report-dialog"]);this.sendFormSubmitToast()}; e.sendFormSubmitToast=function(){var a={openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:zL(mL("SBOX_INAPPROPRIATE_TOAST"))}}}};this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[a,this])}; e.onIronChange=function(){this.suggestionSelected=Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).some(function(a){return a.active})}; e.onIronSelect=function(){this.catagorySelected=!!this.querySelector("paper-radio-group").selected}; h.Object.defineProperties(C8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rqb){var a=document.createElement("template");a.innerHTML="\n
\n

[[data.title]]

\n
\n \n
\n \n

[[data.catagoryLabel]]

\n \n \n \n
\n \n \n \n \n \n
\n
\n
\n [[data.cancelButtonLabel]]\n \n [[data.submitButtonLabel]]\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qqb){var d=document.createElement("template");d.innerHTML=""; Qqb=d}d=Qqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rqb=a}a=Rqb;return a}}}); var D8=C8;D8.prototype.onIronSelect=D8.prototype.onIronSelect;D8.prototype.onIronChange=D8.prototype.onIronChange;w([P(V.YtActionSenderBehavior),x("design:type",Object)],D8.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],D8.prototype,"data",void 0);w([R({value:!0,computed:"canSubmit(suggestionSelected,catagorySelected)"}),x("design:type",Boolean)],D8.prototype,"submitDisabled",void 0); w([R(),x("design:type",Boolean)],D8.prototype,"suggestionSelected",void 0);w([R(),x("design:type",Boolean)],D8.prototype,"catagorySelected",void 0);w([AE("#description-text"),x("design:type",Object)],D8.prototype,"descriptionText",void 0);w([S("iron-change"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],D8.prototype,"onIronChange",null); w([S("iron-select"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],D8.prototype,"onIronSelect",null);D8=w([U({is:"ytd-search-suggestion-report-dialog"})],D8);var Uqb;var Vqb;var E8=function(){return O.apply(this,arguments)||this}; p(E8,O);E8.prototype.dataChanged=function(){if(this.data){var a=kh(Hb(Ib(this.data.url.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue||""))),b=this.iframe;if(a instanceof ih){var c;a=jea(a);a=(null===(c=ah())||void 0===c?0:c.isScriptURL(a))?TrustedScriptURL.prototype.toString.apply(a):a}else a=Hb(a);b.src=a}}; E8.prototype.ready=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; h.Object.defineProperties(E8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vqb){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Uqb){var d=document.createElement("template");d.innerHTML=""; Uqb=d}d=Uqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vqb=a}a=Vqb;return a}}}); var F8=E8;F8.prototype.dataChanged=F8.prototype.dataChanged;w([AE("#iframe"),x("design:type",HTMLIFrameElement)],F8.prototype,"iframe",void 0);w([R(),x("design:type",Object)],F8.prototype,"data",void 0);w([yE("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],F8.prototype,"dataChanged",null);F8=w([uO({is:"yt-about-this-ad-renderer"})],F8);var Wqb;var Xqb;var G8=function(){return O.apply(this,arguments)||this}; p(G8,O);e=G8.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.configureRendererStamper=function(){return{"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.backButton":{id:"back-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.submitButton":{id:"submit-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; e.ready=function(){this.$["submit-button"].addEventListener("yt-action",this.onSubmitYtAction.bind(this))}; e.onSubmitYtAction=function(a){var b=a.detail;"yt-service-request"===b.actionName&&(b=b.args[1],b.flagEndpoint&&(a.stopPropagation(),a={text:this.description,minutes:Number(this.minutes),seconds:Number(this.seconds)},this.vssId&&(a.vss_id=this.vssId),this.ytActionSenderBehavior.sendServiceRequestAction([b,a]),this.submitDisabled=!0))}; e.dataChanged=function(){var a=this;this.vssId=this.description=this.seconds=this.minutes="";this.submitDisabled=!1;var b=ZM(this);b&&b.getPlayerPromise().then(function(c){var d=c.getOption("cc","track")||c.getOption("captions","track");d&&(a.vssId=d.vss_id);c=c.getCurrentTime();a.minutes=Math.floor(c/60).toString();a.seconds=(Math.floor(c)%60).toString()})}; e.updateSubmitButtonState=function(a,b,c){this.set("data.submitButton.buttonRenderer.isDisabled",c||""===a||""===b)}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; e.onYtServiceRequestError=function(){this.submitDisabled=!1}; h.Object.defineProperties(G8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xqb){var a=document.createElement("template");a.innerHTML="
\n
\n

[[getSimpleString(data.title)]]

\n
\n
\n \n
\n \n \n \n \n \n
\n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wqb){var d=document.createElement("template");d.innerHTML=""; Wqb=d}d=Wqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xqb=a}a=Xqb;return a}}}); var H8=G8;H8.prototype.onYtServiceRequestError=H8.prototype.onYtServiceRequestError;H8.prototype.onYtServiceRequestCompleted=H8.prototype.onYtServiceRequestCompleted;H8.prototype.updateSubmitButtonState=H8.prototype.updateSubmitButtonState;w([P(Y),x("design:type",Object)],H8.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],H8.prototype,"ytRendererBehavior",void 0); w([P(V.YtActionSenderBehavior),x("design:type",Object)],H8.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],H8.prototype,"data",void 0);w([R(),x("design:type",Boolean)],H8.prototype,"submitDisabled",void 0);w([R(),x("design:type",String)],H8.prototype,"minutes",void 0);w([R(),x("design:type",String)],H8.prototype,"seconds",void 0);w([R(),x("design:type",String)],H8.prototype,"description",void 0); w([R(),x("design:type",String)],H8.prototype,"vssId",void 0);w([yE("minutes","seconds","submitDisabled"),x("design:type",Function),x("design:paramtypes",[String,String,Boolean]),x("design:returntype",void 0)],H8.prototype,"updateSubmitButtonState",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H8.prototype,"onYtServiceRequestCompleted",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H8.prototype,"onYtServiceRequestError",null);H8=w([uO({is:"yt-report-details-form-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],H8);var Yqb;var Zqb;var I8=function(){var a=O.apply(this,arguments)||this;a.submitting=!1;a.submitButtonDisabled=!0;a.command=null;a.canShowCheckbox=!1;a.canShowAdditionalDetailCheckbox=!1;a.canShowNextButton=!1;a.additionalDetailCheckboxChecked=!1;a.refitJob=0;a.keepDropdownFocusedAfterSelection=!0;a.actionMap={"yt-report-form-update":"handleReportFormEndpointUpdateAction","yt-report-form-endpoint-update":"handleReportFormEndpointUpdateAction","yt-confirm-dialog-close-action":"handleConfirmDialogCloseAction","yt-modify-report-form-command":"handleModifyReportFormCommand", "yt-additional-detail-checkbox-update":"handleAdditionalDetailCheckboxUpdateAction"};return a}; p(I8,O);e=I8.prototype;e.configureRendererStamper=function(){return{"data.legalReportCheckbox":{id:"checkbox-container",mapping:{booleanFormFieldV2Renderer:{component:"yt-boolean-form-field-v2-renderer",noInjection:!0}}},"data.additionalDetailCheckbox":{id:"additional-detail-checkbox-container",mapping:{booleanFormFieldV2Renderer:{component:"yt-boolean-form-field-v2-renderer",noInjection:!0}}}}}; e.created=function(){this.refitJob=0}; e.attached=function(){this.scroller&&(this.scroller.dialogElement=this.parentNode,this.scroller.attached&&"function"===typeof this.scroller.attached&&this.scroller.attached());this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(a){a&&(this.toggleSubmitButton(!!this.get("data.submitButton.buttonRenderer.isDisabled")),this.set("data.submitButton.buttonRenderer.isDisabled",void 0),this.set("data.nextButton.buttonRenderer.isDisabled",void 0),this.command=null,this.additionalDetailCheckboxChecked=this.canShowNextButton=this.canShowAdditionalDetailCheckbox=this.canShowCheckbox=this.hideReportForm=this.submitting=!1,a.legalReportCheckbox&&this.set("data.legalReportCheckbox.booleanFormFieldV2Renderer.value", !1),a.additionalDetailCheckbox&&this.set("data.additionalDetailCheckbox.booleanFormFieldV2Renderer.value",!1))}; e.onYtPopupOpened=function(){var a=ZM(this);a&&a.getPlayerPromise().then(function(b){b.pauseVideo()})}; e.onYtNavigate=function(a){var b=a.detail.endpoint;b&&b.confirmDialogEndpoint&&(a.stopPropagation(),this.hideReportForm=!0)}; e.onYtServiceRequestSent=function(){this.toggleSubmitButton(!0)}; e.onYtServiceRequestCompleted=function(a,b){var c=b.actions;if(c)for(var d=0,f=c.length;d\n\n\n \n\n
\n \n \n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Yqb){var d=document.createElement("template");d.innerHTML=""; Yqb=d}d=Yqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zqb=a}a=Zqb;return a}}}); var J8=I8;J8.prototype.onYtServiceRequestError=J8.prototype.onYtServiceRequestError;J8.prototype.onYtServiceRequestCompleted=J8.prototype.onYtServiceRequestCompleted;J8.prototype.onYtServiceRequestSent=J8.prototype.onYtServiceRequestSent;J8.prototype.onYtNavigate=J8.prototype.onYtNavigate;J8.prototype.onYtPopupOpened=J8.prototype.onYtPopupOpened;w([P(aP.YtOpenPopupBehavior),x("design:type",Object)],J8.prototype,"openPopupBehavior",void 0); w([P(Y),x("design:type",Object)],J8.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtRendererBehavior),x("design:type",Object)],J8.prototype,"ytRendererBehavior",void 0);w([P(NO.YtActionHandlerBehavior),x("design:type",Object)],J8.prototype,"ytActionHandlerBehavior",void 0);w([P(YP.YtEventForwardingBehavior),x("design:type",Object)],J8.prototype,"eventForwardingBehavior",void 0);w([P(Polymer.IronResizableBehavior),x("design:type",Object)],J8.prototype,"ironResizableBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],J8.prototype,"data",void 0);w([R(),x("design:type",Object)],J8.prototype,"submitting",void 0);w([R({observer:"submitButtonDisabledChanged"}),x("design:type",Object)],J8.prototype,"submitButtonDisabled",void 0);w([R(),x("design:type",Object)],J8.prototype,"command",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],J8.prototype,"hideReportForm",void 0);w([R(),x("design:type",Object)],J8.prototype,"canShowCheckbox",void 0); w([R(),x("design:type",Object)],J8.prototype,"canShowAdditionalDetailCheckbox",void 0);w([R(),x("design:type",Object)],J8.prototype,"canShowNextButton",void 0);w([R(),x("design:type",Object)],J8.prototype,"additionalDetailCheckboxChecked",void 0);w([R(),x("design:type",Object)],J8.prototype,"refitJob",void 0);w([R(),x("design:type",Object)],J8.prototype,"keepDropdownFocusedAfterSelection",void 0);w([AE("#scroller"),x("design:type",Object)],J8.prototype,"scroller",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],J8.prototype,"onYtPopupOpened",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],J8.prototype,"onYtNavigate",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,ZO]),x("design:returntype",void 0)],J8.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,$O]),x("design:returntype",void 0)],J8.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],J8.prototype,"onYtServiceRequestError",null);J8=w([uO({is:"yt-report-form-modal-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],J8);var $qb;var arb;Polymer({is:"yt-boolean-form-field-v2-renderer",_template:function(){if(void 0!==arb)return arb;var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$qb){var d=document.createElement("template");d.innerHTML=""; $qb=d}d=$qb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return arb=a}, behaviors:[W.YtRendererBehavior,NO.YtActionHandlerBehavior],properties:{data:Object},onCheckedChanged_:function(){if(this.data){var a=this.$.checkbox.checked;"yt-external-links-checkbox"===this.data.identifier?this.sendAction("yt-additional-detail-checkbox-update",[a]):a&&this.data.enableCommand?this.sendAction("yt-modify-report-form-command",[this.data.enableCommand.modifyReportFormCommand]):!a&&this.data.disableCommand&&this.sendAction("yt-modify-report-form-command",[this.data.disableCommand.modifyReportFormCommand])}}, onLabelTap_:function(a){"A"!=a.target.tagName&&(this.$.checkbox.checked=!this.$.checkbox.checked)}});var brb;var crb;var drb={},erb=(drb.WEB_REMIX="music.youtube.com",drb); Polymer({is:"yt-sharing-embed-renderer",_template:function(){if(void 0!==crb)return crb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n \n
\n \n
\n \n
\n \n
\n
\n \n
\n
\n \n \n \n
\n \n
\n
\n
\n
\n";a.content.insertBefore(X().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===brb){var d=document.createElement("template");d.innerHTML=""; brb=d}d=brb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return crb=a}, hostAttributes:{dialog:!0},behaviors:[Y,W.YtRendererBehavior,NO.YtActionHandlerBehavior],properties:{data:Object,embedCode_:{type:String,computed:"computeEmbedCode_(data, startAtTimeStamp_, startAtChecked_, isPlayerControlsOptionChecked_, isPrivacyModeOptionChecked_)"},isPlayerControlsOptionChecked_:{type:Boolean,value:!0},isPrivacyModeOptionChecked_:{type:Boolean,value:!1},startAtChecked_:{type:Boolean,value:!1,notify:!0},startAtTimeStamp_:{type:String,value:0},isSquareAspectRatio_:{type:Boolean, computed:"computeIsSquareAspectRatio_(data)",reflectToAttribute:!0}},listeners:{"yt-popup-closed":"onYtPopupClosed_"},actionMap:{"yt-signal-action-copy-share-embed-url":"handleSignalActionCopyShareEmbedUrl_","yt-share-panel-set-timestamp-action":"handleSetTimestamp_"},stampDom:{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.startAt":{id:"start-at",mapping:{startAtRenderer:"yt-start-at-renderer"}}},created:function(){this.embedHost_=erb[A("INNERTUBE_CLIENT_NAME")]|| "www.youtube.com"}, ready:function(){this.$["embed-code"].addEventListener("tap",this.onEmbedCode_.bind(this))}, computeEmbedCode_:function(a,b,c,d,f){if(!a)return"";var g=a.videoId,l=a.fullListId,m=[];d||m.push("controls=0");c&&0"}, handleSignalActionCopyShareEmbedUrl_:function(){this.$["embed-code"].inputElement.textarea.select();document.execCommand("copy");this.trackEmbedCopyUrl_()}, handleSetTimestamp_:function(a){this.startAtTimeStamp_=(this.startAtChecked_=a.isSet)?a.timestamp:0}, closePanel_:function(){this.sendAction("yt-close-popup-action",["yt-sharing-embed-renderer"])}, onEmbedCode_:function(){this.$["embed-code"].inputElement.textarea.select();this.trackEmbedCopyUrl_()}, onYtPopupClosed_:function(){qg(this.$["video-preview"])}, trackEmbedCopyUrl_:function(){this&&this.data&&this.data.actionButtons&&0
[[menuStrings_.SHARE_LABEL]]
\n
\n \n \n \n \n \n
\n\n\n
\n \n \n \n \n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===frb){var d=document.createElement("template");d.innerHTML=""; frb=d}d=frb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return grb=a}, behaviors:[cQ,YP.YtEventForwardingBehavior,Y,NO.YtActionHandlerBehavior,W.YtRendererBehavior],properties:{data:Object,player_:{type:Object,value:null},startAtChecked_:{type:Boolean,value:!1,notify:!0},currentTime_:Number,startAtTimeStamp_:{type:String,computed:"computeHumanReadableTimeStamp_(currentTime_)",notify:!0},timeStampParam_:{type:String,computed:"computeTimeStampParam_(startAtTimeStamp_)"},shareUrl_:{type:String,computed:"computeShareURL_(data.sharingRenderer.shortUrl, timeStampParam_, startAtChecked_)"}, url_:{type:String,computed:"computeURL_(data)"},menuStrings_:{type:Object,value:{SHARE_LABEL:mL("SHARE_LABEL",void 0,"Share")}},emailTarget_:{type:String,computed:"computeEmailShareLink_(shareUrl_)"}},listeners:{"yt-popup-opened":"onPopupOpened_","yt-popup-closed":"onPopupClosed_"},actionMap:{"yt-signal-action-copy-share-url":"handleSignalActionCopyShareUrl_"},stampDom:{"data.sharingRenderer.actionButtons":{id:"action-buttons",mapping:jP("sharingRendererButtons")}},ready:function(){this.$["share-url"].addEventListener("tap", this.onShareUrlTap_.bind(this));this.$.email.addEventListener("tap",this.onEmailTap_.bind(this))}, attached:function(){this.currentTime_=0}, getInputElement_:function(a){return"INPUT"===this.$[a].inputElement.tagName?this.$[a].inputElement:this.$[a].inputElement.querySelector("input")}, onPopupOpened_:function(){var a=this;this.getInputElement_("share-url").select();var b=ZM(this);b&&(this.disposePlayerEvents_(),b.getPlayerPromise().then(function(c){a.listenToPlayerEvent(c,"onVideoProgress",a.updateTime_);a.updateTime_(c.getCurrentTime());a.player_=c}))}, onPopupClosed_:function(){this.disposePlayerEvents_();this.$["start-at-option"].checked=!1}, updateTime_:function(a){this.currentTime_=a}, computeHumanReadableTimeStamp_:function(a){a+="";var b=Math.floor(a/3600),c=Math.floor(a%3600%60);return(0\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===irb){var d=document.createElement("template");d.innerHTML=""; irb=d}d=irb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return jrb=a}, hostAttributes:{dialog:!0},behaviors:[YP.YtEventForwardingBehavior,Y,hrb,W.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},loading:{reflectToAttribute:!0,type:Boolean,value:!1}},listeners:{"yt-navigate":"onYtNavigate_","yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-sent":"onYtServiceRequestSent_","yt-popup-opened":"openPopupHandler_","yt-popup-closed":"closePopupHandler_"},stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer", attributes:{"footer-button":!0}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0,"footer-button":!0}}}}},attached:function(){this.sendAction("yt-register-create-family-dialog");this.$.thumbnail.onShow()}, fireOnCloseCommand_:function(){this.data.onCloseCommand&&this.sendInnerTubeActions([this.data.onCloseCommand],this)}, onYtNavigate_:function(a){var b=a.detail.endpoint;b.unlimitedCreateFamilyEndpoint?(this.loading=!0,this.sendAction("yt-open-create-family-dialog",[b.unlimitedCreateFamilyEndpoint,this.unicornReadyCallback_.bind(this)]),a.stopPropagation()):this.maybeCloseDialogOnFooterButtonTap(a)}, onYtServiceRequestSent_:function(a,b){b&&b.endpoint&&b.endpoint.signalServiceEndpoint||(this.loading=!0)}, onYtServiceRequestCompleted_:function(){this.parentElement.close&&this.parentElement.close();this.loading=!1}, openPopupHandler_:function(a){a.detail==this&&this.data.onOpenCommands&&this.sendInnerTubeActions(this.data.onOpenCommands,this)}, closePopupHandler_:function(a,b){this.fireOnCloseCommand_();(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.data.onDismissCommands&&this.sendInnerTubeActions(this.data.onDismissCommands,this)}, dataChanged_:function(){this.loading=!1}, unicornReadyCallback_:function(){this.parentElement.close&&this.parentElement.close();this.loading=!1}});var krb;var lrb;Polymer({is:"yt-unlimited-family-profile-interstitial-renderer",_template:function(){if(void 0!==lrb)return lrb;var a=document.createElement("template");a.innerHTML="

[[getSimpleString(data.additionalInfoHeader)]]

[[getSimpleString(data.memberInfo)]][[getSimpleString(data.memberTitle)]]
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===krb){var d=document.createElement("template");d.innerHTML=""; krb=d}d=krb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return lrb=a}, hostAttributes:{dialog:!0},properties:{data:Object,mainThumbnailWidth_:{type:Number,computed:"computeMainThumbnailWidth_(data.secondaryThumbnails)"},boundButtonTap_:{type:Function,value:function(){return this.onButtonTap_.bind(this)}}}, behaviors:[Y,W.YtRendererBehavior,hrb],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"footer-button":!0},properties:{"on-tap":"[[boundButtonTap_]]"}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0,"footer-button":!0}}}},"data.manageButton":{id:"manage-button",mapping:{buttonRenderer:"yt-button-renderer"}}},attached:function(){Polymer.dom(this.root).querySelectorAll(".secondary-thumbnail").forEach(function(a){a.onShow()}); this.$["main-thumbnail"].onShow()}, onButtonTap_:function(a){this.maybeCloseDialogOnFooterButtonTap(a)}, computeMainThumbnailWidth_:function(a){return a&&0!==a.length?72:96}});var mrb;var nrb;Polymer({is:"yt-unplugged-pause-membership-dialog-renderer",_template:function(){if(void 0!==nrb)return nrb;var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n [[getSimpleString(selectedData_.pausePeriodMessage)]]\n
\n [[getSimpleString(selectedData_.pauseEndMessage)]]\n
"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mrb){var d=document.createElement("template");d.innerHTML=""; mrb=d}d=mrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return nrb=a}, hostAttributes:{dialog:!0},behaviors:[NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,W.YtRendererBehavior,Y],listeners:{"yt-popup-closed":"closePopupHandler_","yt-popup-opened":"onPopupOpened_","yt-service-request-completed":"onYtServiceRequestCompleted","yt-service-request-sent":"onYtServiceRequestSent"},properties:{data:{type:Object,observer:"dataChanged_"},loading:{reflectToAttribute:!0,type:Boolean,value:!1},selectIndexMax_:Number,selectedData_:Object,sliderAriaLabel_:{type:String,value:null}, onButtonTap_:{type:Function,value:function(){return this.onSubmitTap_.bind(this)}}, onSecondaryTap_:{type:Function,value:function(){return this.onExitButtonTap_.bind(this)}}}, stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[onButtonTap_]]"}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0},properties:{"on-tap":"[[onSecondaryTap_]]"}}}}},onPopupOpened_:function(a){a.detail==this&&N("enable_premium_voluntary_pause")&&(this.sendAction("yt-close-popup-action",["yt-confirm-dialog-renderer"]),this.handleOnOpenCommands_())}, created:function(){this.selectedIndex_=0}, setDialogData:function(a){this.data=a;this.resetSlider_()}, dataChanged_:function(){this.data&&this.resetSlider_()}, onSubmitTap_:function(){if(this.data.confirmCommand){var a=this.data.confirmCommand;a.ypcPauseSubscriptionCommand&&this.sendServiceRequestAction([a,{resume_time_ms:parseInt(this.selectedData_.resumeTimeMs,10)}])}}, onExitButtonTap_:function(){this.sendAction("yt-close-popup-action",["yt-unplugged-pause-membership-dialog-renderer"])}, closePopupHandler_:function(a,b){(b&&!0===b.canceled||!1===b.canceled&&!1===b.confirmed)&&this.handleOnDismissCommands_()}, onSliderChange_:function(){this.selectedIndex_=this.$["id-pause-slider"].immediateValue;this.updateUiState_()}, updateUiState_:function(){this.data&&(this.selectedData_=this.data.endOptions[this.selectedIndex_],this.setSliderAriaLabel_())}, setSliderAriaLabel_:function(){this.selectedData_&&(this.sliderAriaLabel_=this.selectedData_.accessibilityData.label)}, resetSlider_:function(){if(this.data){var a=this.data.defaultEndOptionIndex||0,b=this.$["id-pause-slider"];if(b.immediateValue
\n\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===orb){var d=document.createElement("template");d.innerHTML=""; orb=d}d=orb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);prb=a}a=prb;return a}}}); var L8=K8;w([P(W.YtRendererBehavior),x("design:type",Object)],L8.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],L8.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],L8.prototype,"data",void 0);L8=w([uO({is:"yt-vc-offer-layout-header-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],L8);var qrb;var rrb;var M8=function(){return O.apply(this,arguments)||this}; p(M8,O);M8.prototype.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{vcOfferLayoutHeaderRenderer:{component:"yt-vc-offer-layout-header-renderer"}}},"data.offers":{id:"offers",mapping:{vcOfferRenderer:{component:"yt-vc-offer-renderer",attributes:{"dialog-dismiss":!0}}}}}}; h.Object.defineProperties(M8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rrb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qrb){var d=document.createElement("template");d.innerHTML=""; qrb=d}d=qrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rrb=a}a=rrb;return a}}}); var N8=M8;w([P(W.YtRendererBehavior),x("design:type",Object)],N8.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],N8.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],N8.prototype,"data",void 0);N8=w([uO({is:"yt-vc-offer-layout-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],N8);var srb;var trb;var O8=function(){return O.apply(this,arguments)||this}; p(O8,O);O8.prototype.configureRendererStamper=function(){return{"data.vcIcon":{id:"vc-icon",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}}}}; h.Object.defineProperties(O8.prototype,{ariaLabel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.accessibilityText?this.data.accessibilityText:""}}, vcOfferStyle:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?this.data.style:"VC_OFFER_STYLE_STANDARD"}}, showTitleText:{configurable:!0,enumerable:!0,get:function(){return!(!this.data||"VC_OFFER_STYLE_HERO"!==this.data.style||!this.data.titleText)}}}); h.Object.defineProperties(O8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===trb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===srb){var d=document.createElement("template");d.innerHTML=""; srb=d}d=srb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);trb=a}a=trb;return a}}}); var P8=O8;w([P(W.YtRendererBehavior),x("design:type",Object)],P8.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],P8.prototype,"ytRendererstamperBehavior",void 0);w([P(WV.YtTappableItemBehavior),x("design:type",Object)],P8.prototype,"ytTappableItemBehavior",void 0);w([R(),x("design:type",Object)],P8.prototype,"data",void 0);w([R({reflectToAttribute:!0}),zE("data.accessibilityText"),x("design:type",String),x("design:paramtypes",[])],P8.prototype,"ariaLabel",null); w([R({reflectToAttribute:!0}),zE("data.style"),x("design:type",String),x("design:paramtypes",[])],P8.prototype,"vcOfferStyle",null);w([zE("data.style","data.titleText"),x("design:type",Boolean),x("design:paramtypes",[])],P8.prototype,"showTitleText",null);P8=w([uO({is:"yt-vc-offer-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],P8);var urb;var vrb;var Q8=function(){return O.apply(this,arguments)||this}; p(Q8,O);Q8.prototype.configureRendererStamper=function(){return{"data.topBar":{id:"top-bar",mapping:{ypcOffersModalTopBarRenderer:{component:"yt-ypc-offers-modal-top-bar-renderer"}}},"data.content":{id:"content",mapping:{vcOfferLayoutRenderer:{component:"yt-vc-offer-layout-renderer"}}}}}; Q8.prototype.ready=function(){this.setAttribute("dialog","")}; Q8.prototype.attached=function(){this.scrollable.dialogElement=this.parentNode;var a=this.scrollable;a.attached&&"function"===typeof a.attached&&a.attached()}; h.Object.defineProperties(Q8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vrb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===urb){var d=document.createElement("template");d.innerHTML=""; urb=d}d=urb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vrb=a}a=vrb;return a}}}); var R8=Q8;w([P(W.YtRendererBehavior),x("design:type",Object)],R8.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],R8.prototype,"ytRendererstamperBehavior",void 0);w([AE("#scrollable"),x("design:type",Object)],R8.prototype,"scrollable",void 0);w([R(),x("design:type",Object)],R8.prototype,"data",void 0);R8=w([uO({is:"yt-ypc-offers-modal-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],R8);var wrb;var xrb;var S8=function(){return O.apply(this,arguments)||this}; p(S8,O);S8.prototype.configureRendererStamper=function(){return{"data.dismiss":{id:"dismiss",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0},params:{noink:!0}}}},"data.helpLink":{id:"help-link",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{noink:!0}}}}}}; h.Object.defineProperties(S8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xrb){var a=document.createElement("template");a.innerHTML="
\n\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wrb){var d=document.createElement("template");d.innerHTML=""; wrb=d}d=wrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xrb=a}a=xrb;return a}}}); var T8=S8;w([P(W.YtRendererBehavior),x("design:type",Object)],T8.prototype,"ytRendererBehavior",void 0);w([P(Y),x("design:type",Object)],T8.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],T8.prototype,"data",void 0);T8=w([uO({is:"yt-ypc-offers-modal-top-bar-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],T8);var yrb;var zrb;Polymer({is:"yt-ypc-upgrade-dialog-renderer",_template:function(){if(void 0!==zrb)return zrb;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n
\n \n
\n\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yrb){var d=document.createElement("template");d.innerHTML=""; yrb=d}d=yrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return zrb=a}, hostAttributes:{dialog:!0},behaviors:[W.YtRendererBehavior,Y,cW],properties:{data:{type:Object},showSpinner:{type:Boolean,value:!1},continueButtonTapped:{type:Boolean,value:!1},bindOnContinueTapped_:{type:Function,value:function(){return this.onContinueTapped_.bind(this)}}}, listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_","yt-popup-closed":"onYtPopupClosed_","yt-popup-opened":"onYtPopupOpened_"},stampDom:{"data.continueButton":{id:"continue-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[bindOnContinueTapped_]]"}}}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}}},attached:function(){this.$.scrollable.dialogElement= this.parentNode}, onYtServiceRequestCompleted_:function(){this.set("showSpinner",!1);this.sendAction("yt-close-popup-action",["yt-ypc-upgrade-dialog-renderer"])}, onYtPopupOpened_:function(a,b){b==this&&this.data.onOpenCommands&&this.sendInnerTubeActions(this.data.onOpenCommands,this)}, onYtPopupClosed_:function(a,b){this.continueButtonTapped||b&&(!0===b.canceled||!1===b.canceled&&!1===b.confirmed)&&this.data.onDismissCommands&&this.sendInnerTubeActions(this.data.onDismissCommands,this)}, onYtServiceRequestError_:function(a){this.set("showSpinner",!1);this.openToast(a.detail.error.message)}, onContinueTapped_:function(){this.set("continueButtonTapped",!0);N("enable_ypc_spinners")?this.sendAction("yt-close-popup-action",["yt-ypc-upgrade-dialog-renderer"]):this.set("showSpinner",!0)}});var Arb;var Brb;Polymer({is:"yt-bubble-hint-renderer",_template:function(){if(void 0!==Brb)return Brb;var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n \n
\n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Arb){var d=document.createElement("template");d.innerHTML=""; Arb=d}d=Arb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Brb=a}, behaviors:[W.YtRendererBehavior,YP.YtEventForwardingBehavior,Y],properties:{data:Object,positionType:{type:String,reflectToAttribute:!0},hasButtons_:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeHasButtons_(data)"},style_:{type:Boolean,computed:"computeStyle_(data.style)",reflectToAttribute:!0}},stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.confirmButton":{id:"accept-button",mapping:{buttonRenderer:"yt-button-renderer"}}}, computeHasButtons_:function(a){return!(!a.dismissButton&&!a.confirmButton)}, computeStyle_:function(a){return a||"BUBBLE_HINT_STYLE_UNKNOWN"}});var Crb;var Drb;Polymer({is:"yt-fancy-dismissible-dialog-renderer",_template:function(){if(void 0!==Drb)return Drb;var a=document.createElement("template");a.innerHTML="\n\n \n \n\n
\n \n \n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Crb){var d=document.createElement("template");d.innerHTML=""; Crb=d}d=Crb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Drb=a}, hostAttributes:{dialog:!0},behaviors:[W.YtRendererBehavior],properties:{data:Object,showTitle:{type:Boolean,computed:"computeShowTitle_(data)"}},attached:function(){this.$.scroller.dialogElement=this.parentNode}, computeConfirmButton_:function(a){var b={text:a.confirmLabel,size:"SIZE_DEFAULT",style:"STYLE_BLUE_TEXT"};a.confirmNavigationEndpoint?b.navigationEndpoint=a.confirmNavigationEndpoint:a.confirmServiceEndpoint&&(b.serviceEndpoint=a.confirmServiceEndpoint);return b}, computeShowTitle_:function(a){return!(!a||!a.title)}});var Erb;var Frb;Polymer({is:"yt-loading-renderer",_template:function(){if(void 0!==Frb)return Frb;var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===Erb){var d=document.createElement("template");d.innerHTML="";Erb=d}d=Erb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Frb=a}, behaviors:[W.YtRendererBehavior,Polymer.IronOverlayBehavior],properties:{data:Object},listeners:{"iron-overlay-opened":"onIronOverlayOpened_","iron-overlay-closed":"onIronOverlayClosed_"},created:function(){UHa(2201)}, onIronOverlayOpened_:function(){this.$.spinner&&(this.$.spinner.active=!0)}, onIronOverlayClosed_:function(){this.$.spinner&&(this.$.spinner.active=!1)}});var Grb;var Hrb;Polymer({is:"yt-upsell-dialog-renderer",_template:function(){if(void 0!==Hrb)return Hrb;var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(lXa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Grb){var d=document.createElement("template");d.innerHTML=""; Grb=d}d=Grb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Hrb=a}, hostAttributes:{dialog:!0},properties:{data:{type:Object,observer:"dataChanged_"},hasHeader:{type:Boolean,computed:"computeHasHeader_(data)"},layoutStyle:{type:String,computed:"computeLayoutStyle_(data.layout)",reflectToAttribute:!0},popupSize:{type:String,computed:"computePopupSize_(data.popupSize)",reflectToAttribute:!0},hasLogo:{type:Boolean,computed:"computeIsLogo_(data)",reflectToAttribute:!0}},behaviors:[Y,W.YtRendererBehavior],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}}, "data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}}},created:function(){this.closeOnDismissButton_=new Set;this.closeOnDismissButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN");this.closeOnDismissButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_ONLY_DISMISS_BUTTON_TAP");this.closeOnAcceptButton_=new Set;this.closeOnAcceptButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN");this.closeOnAcceptButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_ONLY_ACTION_BUTTON_TAP");this.defaultDismissStrategy_= "UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN"}, dataChanged_:function(a){this.hidden=!a.isVisible;a.isVisible||this.impressionLog()}, onDismissButtonTap_:function(){this.closeOnDismissButton_.has(this.data.dismissStrategy||this.defaultDismissStrategy_)&&(this.set("data.isVisible",!1),this.sendAction("yt-close-popup-action",["yt-upsell-dialog-renderer"]))}, onAcceptButtonTap_:function(){this.closeOnAcceptButton_.has(this.data.dismissStrategy||this.defaultDismissStrategy_)&&(this.set("data.isVisible",!1),this.sendAction("yt-close-popup-action",["yt-upsell-dialog-renderer"]))}, computeHasHeader_:function(a){return!!a.headerBackgroundImage}, computeLayoutStyle_:function(a){return a}, computePopupSize_:function(a){return a}, computeIconType_:function(a){return a.dialogIcon&&a.dialogIcon.iconType?"YOUTUBE_LOGO"===a.dialogIcon.iconType?"yt-logos-ext:yt-logo":a.dialogIcon.iconType:""}, computeIsLogo_:function(a){return!!a.dialogIcon&&!!a.dialogIcon.iconType&&"YOUTUBE_LOGO"===a.dialogIcon.iconType}, computeImageHeight_:function(a){return a&&a.thumbnails?a.thumbnails[0].height||0:0}, computeImageWidth_:function(a){return a&&a.thumbnails?a.thumbnails[0].width||0:0}});var Irb;var Jrb;var Krb=[NO.YtActionHandlerBehavior,{created:function(){this.logFlowCommandsMap_={"yt-log-ypc-flow-start-command":"handleLogYpcFlowStart_","yt-log-ypc-flow-dismiss-command":"handleLogYpcFlowDismiss_"}}, attached:function(){this.registerActionMap(this.logFlowCommandsMap_)}, detached:function(){this.unregisterActionMap(this.logFlowCommandsMap_)}, handleLogYpcFlowStart_:function(a){a.logYpcFlowStartCommand&&a.logYpcFlowStartCommand&&(a=a.logYpcFlowStartCommand,a.serializedTransactionFlowLoggingParams?NVa(a.serializedTransactionFlowLoggingParams):a.serializedYpcCancelFlowLoggingParams?(a=a.serializedYpcCancelFlowLoggingParams)&&lO("ypcCancelFlowStarted","serializedYpcCancelFlowLoggingParams",a):a.serializedYpcResumeFlowLoggingParams?(a=a.serializedYpcResumeFlowLoggingParams)&&lO("ypcResumeFlowStarted","serializedYpcResumeFlowLoggingParams", a):a.serializedYpcPauseFlowLoggingParams&&(a=a.serializedYpcPauseFlowLoggingParams)&&lO("ypcPauseFlowStarted","serializedYpcPauseFlowLoggingParams",a))}, handleLogYpcFlowDismiss_:function(a){a.logYpcFlowDismissCommand&&(a=a.logYpcFlowDismissCommand,a.serializedTransactionFlowLoggingParams?OVa(a.serializedTransactionFlowLoggingParams):a.serializedYpcCancelFlowLoggingParams?(a=a.serializedYpcCancelFlowLoggingParams)&&lO("ypcCancelFlowCancelled","serializedYpcCancelFlowLoggingParams",a):a.serializedYpcResumeFlowLoggingParams?(a=a.serializedYpcResumeFlowLoggingParams)&&lO("ypcResumeFlowCancelled","serializedYpcResumeFlowLoggingParams",a):a.serializedYpcPauseFlowLoggingParams&&( a=a.serializedYpcPauseFlowLoggingParams)&&lO("ypcPauseFlowCancelled","serializedYpcPauseFlowLoggingParams",a))}}];var Lrb={};Lrb.YtCancelRecurrenceBehavior=[AO.YtComponentBehavior,YO.YtEndpointHandlerBehavior,V.YtActionSenderBehavior,{attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c){return a.ypcCancelRecurrenceHandler(b,c)})}, ypcCancelRecurrenceHandler:function(a,b){var c=this;if(!b||!b.ypcCancelRecurrenceEndpoint)return!1;if(!b.ypcCancelRecurrenceEndpoint.params)return td(Error("params not provided for ypcCancelRecurrenceEndpoint")),!0;var d=mM(),f=this.getInterface(UM);d&&yM(d,b)?Ti(nM(d,b).then(function(g){c.ypcCancelRecurrenceSuccess_(a,b,{data:g})},function(g){c.ypcCancelRecurrenceFailure_(a,b,g)}),function(){td(Error("Error occurred in ypc cancel recurrence response handling."))}):f?Ti(f.requestDataForServiceEndpoint(b).then(function(g){c.ypcCancelRecurrenceSuccess_(a, b,g)},function(g){c.ypcCancelRecurrenceFailure_(a,b,g)}),function(){td(Error("Error occurred in ypc cancel recurrence response handling."))}):td(Error("Network Manager not initialized")); return!0}, ypcCancelRecurrenceSuccess_:function(a,b,c){c.data||(c={data:c});c.data&&c.data.actions&&this.sendInnerTubeActions(c.data.actions,this);c.data.messageRenderer?RVa(b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams):(b=b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams)&&lO("ypcCancelFlowSucceeded","serializedYpcCancelFlowLoggingParams",b);a.fire("yt-service-request-completed",c)}, ypcCancelRecurrenceFailure_:function(a,b,c){RVa(b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams);a.fire("yt-service-request-error",{error:c,params:[a,b]})}}];var Mrb=function(a,b){$a.call(this,b);this.errorSupportedRenderers=a}; p(Mrb,cab);function Nrb(a){N("enable_ypc_spinners")&&GL(a,"yt-open-popup-action",[{openPopupAction:{popupType:"FULLSCREEN_OVERLAY",popup:{loadingRenderer:{hack:!0}}}},a])} function U8(a){N("enable_ypc_spinners")&&GL(a,"yt-close-popup-action",["yt-loading-renderer"])} ;var Orb={};Orb.YtCompleteTransactionBehavior=[AO.YtComponentBehavior,YO.YtEndpointHandlerBehavior,V.YtActionSenderBehavior,{attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c){return a.ypcCompleteTransactionHandler(b,c)})}, completeTransaction:function(a,b){var c=this;b={payments_payload:window.btoa(b.integratorData),buybucket_params:a.data.buybucketParams,offer_params:a.data.offerParams};var d=this.getInterface(UM),f=a.data.completeTransactionEndpoint,g=this.get("ypcCompleteTransactionEndpoint.actions",f);g&&this.sendInnerTubeActions(g,this);return(g=mM())&&yM(g,f)?nM(g,f,b).then(function(l){return{data:l}}).then(this.handleCompleteTransactionSuccess_,function(){return c.handleCompleteTransactionFailure_(a)}):d.requestDataForServiceEndpoint(f, b).then(this.handleCompleteTransactionSuccess_,function(){return c.handleCompleteTransactionFailure_(a)})}, handleCompleteTransactionSuccess_:function(a){a.data||(a={data:a});if(a.data.messageRenderer)return Ni(new Mrb(a.data.messageRenderer));if(a.data.trackingParams){var b=On(),c=Nn();b&&c&&NJ(b,c,In(a.data.trackingParams))}return Mi(a)}, handleCompleteTransactionFailure_:function(a){a=this.get("data.serializedTransactionFlowLoggingParams",a);nO("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",a);return Ni(new rO("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",a))}, ypcCompleteTransactionHandler:function(a,b){var c=this;if(!b.ypcCompleteTransactionEndpoint)return!1;if(!b.ypcCompleteTransactionEndpoint.transactionParams)return td(Error("transactionParams not provided for ypcCompleteTransactionEndpoint")),!0;b.ypcCompleteTransactionEndpoint&&b.ypcCompleteTransactionEndpoint.gtmData&&qO(b.ypcCompleteTransactionEndpoint.gtmData);var d=this.getInterface(UM);if(d){Nrb(this);var f=mM();f&&yM(f,b)?nM(f,b).then(function(g){return{data:g}}).then(function(g){a.fire("yt-service-request-completed"); c.ypcCompleteTransactionSuccess_(b,g)},function(){return c.ypcCompleteTransactionFailure_(b)}):d.requestDataForServiceEndpoint(b).then(function(g){a.fire("yt-service-request-completed"); c.ypcCompleteTransactionSuccess_(b,g)},function(){return c.ypcCompleteTransactionFailure_(b)})}return!0}, ypcCompleteTransactionSuccess_:function(a,b){U8(this);b.data||(b={data:b});this.sendAction("yt-close-popup-action",["yt-loading-renderer"]);b.data.messageRenderer||"YPC_RESPONSE_CODE_ERROR"===b.data.ypcResponseCode?this.ypcCompleteTransactionFailure_(a):(qO("{\"event\": \"purchased\", \"purchaseStatus\": \"success\"}"),this.logTransactionEvent_("transactionFlowSucceeded",a));b.data.actions&&(a=ZVa(b.data.actions),b=$Va(b.data.actions),a.length&&this.sendServiceRequestAction(a),b.length&&this.sendInnerTubeActions(b, this))}, ypcCompleteTransactionFailure_:function(a){U8(this);this.sendAction("yt-close-popup-action",["yt-loading-renderer"]);this.logTransactionEvent_("transactionFlowFailed",a,"TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE")}, logTransactionEvent_:function(a,b,c){if(b=this.get("ypcCompleteTransactionEndpoint.serializedTransactionFlowLoggingParams",b))b={serializedTransactionFlowLoggingParams:b},c&&(b.errorType=c),wm(a,b),cl()}}];var Prb={};Prb.YtUpdateFopBehavior=[{listeners:{"yt-service-request-completed":"onUpdateFopServiceRequestCompleted_"},onUpdateFopServiceRequestCompleted_:function(a,b){a=this.get("data.nativeFlowEndpoint",b);b=this.get("data.fallbackEndpoint",b);a?this.sendServiceRequestAction([a]):b&&this.fire("yt-navigate",{endpoint:b})}}, V.YtActionSenderBehavior];var Qrb={};Qrb.YtWalletPaymentBehavior=[{openWalletDialog:function(a,b,c,d,f,g){var l=this,m=Qi();b=b.replace(/-/g,"+").replace(/_/g,"/");var n=tJ.getInstance().get("hl");TVa(pO.getInstance(),b,m.resolve,f,m.reject,n,function(r){return l.onServerBackendAnalyticEvent_(a,c,r)},this.onDialogClose_.bind(this),d,g); return m.promise}, openFixFlowDialog:function(a,b,c,d){a=a.replace(/-/g,"+").replace(/_/g,"/");pO.getInstance().openFixFlowDialog(a,b,c,d)}, onDialogClose_:function(){this.sendAction("yt-wallet-dialog-closed")}, onServerBackendAnalyticEvent_:function(a,b,c){a.fire("yt-commerce-action-init-done");b&&this.sendServiceRequestAction([b,{backend_analytics:c}])}}, V.YtActionSenderBehavior];function Rrb(a,b,c){var d=[b];c&&d.push(c);return JL(a,d).then(function(f){var g=b.ypcHandleTransactionEndpoint.serializedTransactionFlowLoggingParams;"YPC_RESPONSE_CODE_ERROR"===f.data.ypcResponseCode&&(nO("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",g),f=Ni(new rO("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",g)));return f},function(){var f=b.ypcHandleTransactionEndpoint.serializedTransactionFlowLoggingParams; nO("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",f);return Ni(new rO("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",f))})} ;function V8(a,b,c){var d;d||(d={bubbles:!0,cancelable:!1,composed:!0});c&&(d.detail=c);b=new CustomEvent(b,d);a.dispatchEvent(b)} ;function Srb(a,b,c){var d=mM(),f=YVa(),g=new cWa().init(),l=eWa(),m=c.getPaymentInstrumentsParamsCommand.languageCode;void 0===m?Um(Error("language code not exist"),"ERROR"):Pi([g,f]).then(function(){var n={ctk:payments.business.integration.ClientTokenFactory.createClientToken(m,l)};d&&yM(d,c)?nM(d,c,n).then(function(r){return{data:r}}).then(function(r){V8(b,"yt-service-request-completed",r); "ERROR"!==r.code&&(r=r.data.command)&&IL(a,[r],b)}):Um(Error("InnertubeTransportService not initialized"),"ERROR")})} ;function Trb(a,b,c,d){var f=mM();f&&yM(f,c)?nM(f,c,d).then(function(g){return{data:g}}).then(function(g){return Urb(a,b,c,g)},function(){return Vrb(c)}):(f=tL(UM))&&f.requestDataForServiceEndpoint(c,d).then(function(g){return Urb(a,b,c,g)},function(){return Vrb(c)})} function Urb(a,b,c,d){V8(b,"yt-service-request-completed",d);d.code&&"ERROR"==d.code?Vrb(c):((d=d.data.commands)&&IL(a,d,b),(a=c.ypcPauseSubscriptionCommand.serializedYpcPauseFlowLoggingParams)&&a&&lO("ypcPauseFlowSucceeded","serializedYpcPauseFlowLoggingParams",a))} function Vrb(a){(a=a.ypcPauseSubscriptionCommand.serializedYpcPauseFlowLoggingParams)&&a&&lO("ypcPauseFlowFailed","serializedYpcPauseFlowLoggingParams",a,void 0,"YPC_ERROR_REASON_INNERTUBE_RESPONSE_FAILURE")} ;function Wrb(a,b,c){var d=mM();d&&yM(d,c)?nM(d,c).then(function(f){return{data:f}}).then(function(f){return Xrb(a,b,c,f)},function(){return Yrb(c)}):(d=tL(UM))&&d.requestDataForServiceEndpoint(c).then(function(f){return Xrb(a,b,c,f)},function(){return Yrb(c)})} function Xrb(a,b,c,d){V8(b,"yt-service-request-completed",d);d.code&&"ERROR"==d.code?Yrb(c):((d=d.data.commands)&&IL(a,d,b),(a=c.ypcResumeSubscriptionCommand.serializedYpcResumeFlowLoggingParams)&&a&&lO("ypcResumeFlowSucceeded","serializedYpcResumeFlowLoggingParams",a))} function Yrb(a){(a=a.ypcResumeSubscriptionCommand.serializedYpcResumeFlowLoggingParams)&&a&&lO("ypcResumeFlowFailed","serializedYpcResumeFlowLoggingParams",a,void 0,"YPC_ERROR_REASON_INNERTUBE_RESPONSE_FAILURE")} ;var Zrb={}; Zrb.YtEndpointHandlerWithYpcBehavior=[YO.YtEndpointHandlerBehavior,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,Qrb.YtWalletPaymentBehavior,aP.YtOpenPopupBehavior,Prb.YtUpdateFopBehavior,Lrb.YtCancelRecurrenceBehavior,Orb.YtCompleteTransactionBehavior,{listeners:{"yt-service-request-sent":"onServiceRequestSent_","yt-service-request-completed":"onGetCartServiceRequestCompleted_","yt-service-request-error":"onServiceRequestError_"},created:function(){this.buyFlowActionMap_={};this.ypcRegisterActionMapJobId_=0}, attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c,d){return a.handleYPCEndpoint(b,c,d)}); this.ypcRegisterActionMapJobId_=xk(Bk,function(){a.registerActionMap(a.buyFlowActionMap_)})}, detached:function(){var a=this;Bk.cancelJob(this.ypcRegisterActionMapJobId_);xk(Bk,function(){a.unregisterActionMap(a.buyFlowActionMap_)})}, handleYPCEndpoint:function(a,b,c){var d=b.ypcGetCartEndpoint;if(d){var f=d.gtmId;f&&aWa(f);(d=d.gtmData)&&qO(d)}return null!=this.get("ypcGetCartEndpoint.prefetchConfig.ypcGetCartPrefetchResponseDataConfig.encryptedPurchaseParams",b)?(this.handleYPCGetCartEndpointWithPrefetch_(a,b),!0):null!=this.get("ypcFixInstrumentEndpoint.encryptedFixInstrumentParameters",b)?(this.handleYPCFixInstrumentEndpoint_(a,b),!0):N("enable_premium_voluntary_pause")&&b.ypcPauseSubscriptionCommand?(Trb(this,a,b,c),!0):N("enable_premium_voluntary_pause")&& b.ypcResumeSubscriptionCommand?(Wrb(this,a,b),!0):b.getPaymentInstrumentsParamsCommand?(Srb(this,a,b),!0):!1}, handleYPCGetCartEndpointWithPrefetch_:function(a,b){var c=this,d=b.ypcGetCartEndpoint;b=d.prefetchConfig.ypcGetCartPrefetchResponseDataConfig;var f=b.encryptedPurchaseParams,g=d.offerParams;d=b.serializedTransactionFlowLoggingParams;var l=b.serializedPaymentsClientParams,m=this.createGetCartResponseFromParams_(b,g,d);g={offerParams:g};this.changeButtonState(a,!0);wm("buyFlowStarted",g);Si(this.openWalletDialog(a,f,b.ypcLogWalletAnalyticDataEndpoint,d,function(){c.changeButtonState(a,!1)},l).then(function(n){return c.handleBuyFlowCompleteCallback_(a, m,n)},function(){return c.handleOnLoadError(m)}).then(function(n){return void c.handlePostPurchaseSuccess_(a,m,n)},function(n){return void c.handlePostPurchaseError_(n)}),function(){c.changeButtonState(a,!1); a.fire("yt-commerce-action-done")})}, createGetCartResponseFromParams_:function(a,b,c){var d=a.completeTransactionEndpoint;a=a.handleTransactionEndpoint;b={data:{offerParams:window.btoa(b),serializedTransactionFlowLoggingParams:c}};a?b.data.handleTransactionEndpoint=a:b.data.completeTransactionEndpoint=d;return b}, onGetCartServiceRequestCompleted_:function(a,b){var c=this,d=a.target;if(b&&b.data&&b.data.messageRenderer)U8(this),this.handleMessageRenderer_(b.data.messageRenderer),this.changeButtonState(d,!1);else{var f=this.get("data.offerParams",b),g=this.get("data.encryptedPurchaseParams",b),l=this.get("data.upgradeDialogRenderer.ypcUpgradeDialogRenderer",b),m=this.get("data.ypcLogWalletAnalyticDataEndpoint",b),n=this.get("data.serializedPaymentsClientParams",b);if(g||l)a.stopPropagation(),U8(this),this.changeButtonState(d, !1),l?this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:A("openPopupConfig").popupTypeMap.ypcUpgradeDialogRenderer,popup:{ypcUpgradeDialogRenderer:l}}},this]):(f&&wm("buyFlowStarted",{offerParams:f}),a=this.getLoggingParams_(b),this.changeButtonState(d,!0),Si(this.openWalletDialog(d,g,m,a,function(){c.changeButtonState(d,!1)},n).then(function(r){return c.handleBuyFlowCompleteCallback_(d,b,r)},function(){return c.handleOnLoadError(b)}).then(function(r){return c.handlePostPurchaseSuccess_(d, b,r)},function(r){return c.handlePostPurchaseError_(r)}),function(){c.changeButtonState(d,!1); d.fire("yt-commerce-action-done")}))}}, onServiceRequestSent_:function(a,b){b&&b.endpoint&&b.endpoint.ypcGetCartEndpoint&&!b.endpoint.ypcGetCartEndpoint.prefetchConfig&&(Nrb(this),this.changeButtonState(a.target,!0))}, onServiceRequestError_:function(a,b){if(b&&b.params&&b.params.length){b=k(b.params);for(var c=b.next();!c.done;c=b.next())if((c=c.value)&&c.ypcGetCartEndpoint){U8(this);this.changeButtonState(a.target,!1);break}}}, handleBuyFlowCompleteCallback_:function(a,b,c){a=c.integratorData;return null==a||""===a||null!=c.error?(b=this.getLoggingParams_(b),"-1"===String(c.error)?Ni(new rO("TRANSACTION_ERROR_TYPE_YPC_BUYFLOW_COMPLETE_FAILURE",b,!0)):Ni(new rO("TRANSACTION_ERROR_TYPE_YPC_BUYFLOW_COMPLETE_FAILURE",b))):b.data.handleTransactionEndpoint?Rrb(this,b.data.handleTransactionEndpoint,{payments_payload:a}):this.completeTransaction(b,c)}, handlePostPurchaseSuccess_:function(a,b,c){b=this.getLoggingParams_(b);PVa(b);(b=c.data)&&b.gtmDatas&&b.gtmDatas.length?qO(b.gtmDatas[0]):qO("{\"event\": \"purchased\", \"purchaseStatus\": \"success\"}");c.data&&c.data.actions&&this.sendInnerTubeActions(c.data.actions,a)}, handlePostPurchaseError_:function(a){a&&a.payload.isUserDismiss||Um(Error("Error occurred during buyflow."))}, handleOnLoadError:function(a){a=this.getLoggingParams_(a);return Ni(new rO("TRANSACTION_ERROR_TYPE_LOAD_FAILURE",a))}, getLoggingParams_:function(a){return this.get("data.serializedTransactionFlowLoggingParams",a)}, handleMessageRenderer_:function(a){var b=AL(a,"renderer"),c=A("openPopupConfig");"confirmDialogRenderer"===b&&c&&this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:c.popupTypeMap[b],popup:a}},this])}, handleYPCFixInstrumentEndpoint_:function(a,b){var c=this,d=b.ypcFixInstrumentEndpoint;b=d.encryptedFixInstrumentParameters;this.logFixFopEvent_(d,"FIX_FOP_EVENT_TYPE_START");this.changeButtonState(a,!0);this.openFixFlowDialog(b,function(f,g){c.onFixFlowCompleteCallback_(d,f,g)},function(){return c.changeButtonState(a,!1)},function(){c.changeButtonState(a,!1); c.logFixFopEvent_(d,"FIX_FOP_EVENT_TYPE_FAILURE","FIX_FOP_ERROR_TYPE_LOAD_FAILURE")})}, onFixFlowCompleteCallback_:function(a,b,c){var d=Ja("payments.business.integration.scenario.FixInstrument");if(b==d.IntegratorCallbackType.ON_COMPLETE){b="FIX_FOP_EVENT_TYPE_CANCEL";var f=null;null!=c.error?c.error!=d.OnCompleteCallbackError.USER_CANCELLED&&(this.sendInnerTubeActions([a.errorAction],this),b="FIX_FOP_EVENT_TYPE_FAILURE",f="FIX_FOP_ERROR_TYPE_UNSPECIFIED"):(this.sendInnerTubeActions([a.successAction],this),b="FIX_FOP_EVENT_TYPE_SUCCESS");this.logFixFopEvent_(a,b,f)}}, logFixFopEvent_:function(a,b,c){(a=a.serializedFixFopLoggingParams)?(b={eventType:b,serializedFixFopLoggingParams:a},null!=c&&(b.errorType=c),wm("fixFopFlow",b),cl()):Um(Error("Fix Fop Logging params not provided."))}, changeButtonState:function(a,b){N("enable_ypc_spinners")&&a&&("yt-button-renderer"===a.is||"ytd-button-renderer"===a.is)&&(a.disabled=b)}}];var $rb=function(a,b){this.rootData=a;this.scrollTop=b};var asb=function(a,b,c,d,f){this.endpoint=a;this.forward=b;this.historyEntry=c;this.savedComponentState=d;this.legacyBorder=void 0===f?!1:f};var W8=function(){}; e=W8.prototype;e.getCurrentEndpoint=function(){}; e.navigate=function(){}; e.navigateApp=function(){}; e.reload=function(){}; e.pageRequestFinished=function(){}; e.hasPendingNavigation=function(){}; e.cancelPendingNavigation=function(){}; e.resetChunkState=function(){};var X8=function(){}; X8.prototype.start=function(){}; X8.prototype.finish=function(){};qd("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS",{});qd("INNERTUBE_SUGGEST_CONFIG",{});function bsb(a){return function(b,c){A(a)[b]=c}} var Y8={},csb=(Y8.CSI=Po,Y8.ECATCHER=bsb("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS"),Y8.SUGGEST=bsb("INNERTUBE_SUGGEST_CONFIG"),Y8);function dsb(a){var b={};a=k(a);for(var c=a.next();!c.done;b={$jscomp$loop$prop$setter$2404:b.$jscomp$loop$prop$setter$2404},c=a.next()){var d=c.value;c=d.params;d=d.service;c&&d&&(b.$jscomp$loop$prop$setter$2404=csb[d],b.$jscomp$loop$prop$setter$2404&&c.forEach(function(f){return function(g){var l=g.key;g=g.value;l&&g&&f.$jscomp$loop$prop$setter$2404(l,g)}}(b)))}} ;var esb={}; esb.YtAppBehavior=[AO.YtComponentBehavior,NO.YtActionHandlerBehavior,V.YtActionSenderBehavior,{_noAccessors:!0,properties:{data:Object,hasError:{type:Boolean,value:!1},errorMessage:String,pauseVisibilityMonitor:Boolean},listeners:{"yt-history-load":"onYtHistoryLoad_","yt-history-pop":"onYtHistoryPop_","yt-navigate":"onYtNavigate_","yt-navigate-set-page-offset":"onYtNavigateSetPageOffset_","yt-update-title":"onYtUpdateTitle_","yt-update-unseen-notification-count":"onYtUpdateUnseenNotificationCount_"},actionRouterIsRoot:!0, created:function(){this.actionMap_={"yt-update-notifications-unseen-count-action":"handleUpdateNotificationsUnseenCountAction_","yt-clear-cookie-action":"handleClearCookieAction_","yt-store-grafted-ve-action":"onStoreGraftedVeAction_"};this.pageTitle_="";this.titleSuffix_="YouTube";this.unseenNotificationCount_=0;"complete"==document.readyState?this.handleDocumentLoaded_():window.addEventListener("load",this.handleDocumentLoaded_.bind(this));if(N("web_lifecycles")){N("web_lifecycles")&&window.addEventListener("beforeunload", s8a);var a=this.onDisposeApp_.bind(this);MV[0].push(a);MV[1].push(yja)}else window.addEventListener("beforeunload",this.onUnload_.bind(this));this.initCsi_();this.initScraperAttributes_();this.hasSetScrollTopForNavigation_=this.hasNavigated_=!1;this.pagePreparer_=null;this.zwiebackInitJobId_=0;this.dataUpdatePromise_=null;N("enable_navigation_requests_streamz")&&(this.navigationRequestSentCounter_=new Yt(new Ym()));N("kevlar_enable_slis")&&(this.sessionPartition_=new edb,this.sessionPartition_.start()); this.loadDepsPromise=Mi();this.hasPendingNavigation_=!1;this.viewportLoadCalculationJobId_=0;uUa();FNa||(Ik(),ZJ("FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND"),tk(Ua(ZJ,"FOREGROUND_HEARTBEAT_TRIGGER_ON_INTERVAL"),ek("web_foreground_heartbeat_interval_ms",3E4)),GNa.push(ok(document,"visibilitychange",KNa)),FNa=!0);(a=On())&&"UNDEFINED_CSN"!==a&&ska(a);N("enable_3p_cookie_tracking_streamz")&&xk(Bk,this.report3pApisidCookieStatus_);N("enable_cookie_reissue_iframe")&&xk(Bk,this.reset3pApisidCookieIfBroken_); N("enable_browser_cookie_status_monitoring")&&xk(Bk,this.reportBrowserCookieSetting_)}, report3pApisidCookieStatus_:function(){if(A("ID_TOKEN",void 0)){var a=new Wt,b=!!vl("__Secure-3PAPISID");a.increment(b)}}, reset3pApisidCookieIfBroken_:function(){if(A("ID_TOKEN",void 0)&&!vl("__Secure-3PAPISID")){var a=void 0===a?"WEB":a;new Vt().increment(a);a=og("IFRAME");a.src="/signin?go=true";a.style.display="none";document.body.appendChild(a)}}, reportBrowserCookieSetting_:function(){new Xt().increment(Sha())}, handleDocumentLoaded_:function(){Ro("dl");Un.getInstance().processSignal("pcl")}, attached:function(){this.registerNavigationManagerListenersWhenAvailable_();this.listen(document,"yt-navigate-cache","onYtNavigateCache_");this.registerActionMap(this.actionMap_)}, registerNavigationManagerListenersWhenAvailable_:function(a){var b=this;a=void 0===a?0:a;var c=this.getInterface(W8);if(c)this.registerNavigationManagerListeners_(c);else{if(5<=a)throw Error("Unable to find the Navigation manager");setTimeout(function(){b.registerNavigationManagerListenersWhenAvailable_(a+1)},0)}}, registerNavigationManagerListeners_:function(a){this.listen(a,"yt-navigate-start","onYtNavigateStart_");this.listen(a,"yt-navigate-finish","onYtNavigateFinish_");this.listen(a,"yt-navigate-error","onYtNavigateError_");this.listen(a,"yt-page-data-fetched","onYtPageDataFetched_");this.listen(a,"yt-navigate-redirect","onYtNavigateRedirect_")}, detached:function(){var a=this.getInterface(W8);this.unlisten(a,"yt-navigate-start","onYtNavigateStart_");this.unlisten(a,"yt-navigate-finish","onYtNavigateFinish_");this.unlisten(a,"yt-navigate-error","onYtNavigateError_");this.unlisten(document,"yt-navigate-cache","onYtNavigateCache_");this.unlisten(a,"yt-page-data-fetched","onYtPageDataFetched_");this.unlisten(a,"yt-navigate-redirect","onYtNavigateRedirect_");this.unregisterActionMap(this.actionMap_)}, setPageOffset:function(a,b){a?this.sendAction("yt-set-page-offset",[a,b]):Um(Error("setPageOffset missing page"))}, setPageOffsetForNavigation_:function(a,b){this.hasSetScrollTopForNavigation_||(this.hasSetScrollTopForNavigation_=!0,this.setPageOffset(a,b))}, onYtNavigateSetPageOffset_:function(a,b){this.setPageOffsetForNavigation_(b.page,b.offset)}, getPageOffset:function(){var a=this.$["page-manager"].getCurrentPage(),b=0;a&&(b=this.sendAction("yt-get-page-offset",[a])[0]);return b}, initCsi_:function(){this.CSI_SERVICE_NAME&&(qd("CSI_SERVICE_NAME",this.CSI_SERVICE_NAME),Po("yt_lt","cold"))}, initScraperAttributes_:function(){var a=Ld(document.location.href,"enable");a&&-1c&&(c=f);Ro("vptl",c);a.reportViewportLoad_(c)})},(N("kevlar_tuner_should_test_visibility_time_between_jobs")?ek("kevlar_tuner_visibility_time_between_jobs_ms",100):A("VISIBILITY_TIME_BETWEEN_JOBS_MS",500))+50)}, onYtNavigateFinish_:function(a,b){var c=this;this.dataUpdatePromise_.then(function(){c.finishNavigation_(b.navigationDoneMs);var d=c.getInterface(XM);!b.fromHistory&&c.hasNavigated_&&((d=d.getCurrentPage())?c.setPageOffsetForNavigation_(d,0):vm(Error("no pageManager.getCurrentPage()")));c.onYtNavigateFinishHandler();c.async(function(){c.async(function(){Ro("pda");c.collectViewportLoadTime_()})})})}, onYtNavigateRedirect_:function(a){a.detail.url&&this.$.historyManager.replaceUrl(a.detail.url)}, onYtNavigate_:function(a){a.detail.endpoint||Um(new Pl("Error: Missing yt-navigate endpoint from target:",a.target,a.target.nodeName));var b=this.$.historyManager;N("cold_missing_history")&&!b.init(!1)&&(qd("DISABLE_WARM_LOADS",!0),b=new Pl("Failed to initialize history manager",b.getDebugString()),navigator.userAgent&&navigator.userAgent.contains("Version/11.1.2 Safari")?vm(b):Um(b));if(N("kevlar_command_handler"))this.handleNavigate({type:2,command:a.detail.endpoint,form:{params:a.detail.params, tempData:a.detail.tempData||{},requestType:a.detail.type,createScreenConfig:a.detail.createScreenConfig}});else{this.hasSetScrollTopForNavigation_=!1;b=this.getInterface(W8);var c=a.detail.tempData||{};b.navigate(a.detail.endpoint,!1,a.detail.params,c,a.detail.type,a.detail.createScreenConfig)&&this.tryOnYtEndpointChangeHandler_(a.detail.endpoint,c)}}, handleNavigate:function(a){this.hasSetScrollTopForNavigation_=!1;var b=this.getInterface(W8),c=a.form||{};b.navigate(a.command,!1,c.params,c.tempData,c.requestType,c.createScreenConfig)&&this.tryOnYtEndpointChangeHandler_(a.command,c.tempData)}, waitForViewportLoad_:function(){Wo("vpl")}, onYtPageDataFetched_:function(a,b){try{cO.getInstance().reset();Wo("cpt");this.waitForViewportLoad_();this.data=b.pageData;this.dataUpdatePromise_&&(this.dataUpdatePromise_.cancel("canceled dataUpdatePromise_"),this.dataUpdatePromise_=null);var c=this.get("response.frameworkUpdates.entityBatchUpdate",this.data);if(c)this.onEntitiesUpdated(c);this.dataUpdatePromise_=this.getInterface(XM).updatePageData(this.data);var d=this.get("playerResponse.responseContext.serviceTrackingParams",this.data);d&&dsb(d); var f=this.get("response.responseContext.serviceTrackingParams",this.data);f&&dsb(f);var g=this.get("playerResponse.onResponseReceivedActions",this.data);g&&this.sendInnerTubeActions(g,this);var l=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData",this.data);l&&this.handleYtConfigData_(l)}catch(m){Um(m)}}, reportViewportLoad_:function(a){cO.getInstance();Ro("vpl",a);BUa()}, handleYtConfigData_:function(a){void 0!=a.delegatedSessionId&&qd("DELEGATED_SESSION_ID",a.delegatedSessionId);void 0!=a.sessionIndex&&qd("SESSION_INDEX",a.sessionIndex);var b;(b=a.visitorData)&&!(b=!N("clear_visitor_id_in_ytconfig_before_consent"))&&(b=vl("CONSENT"),b=!b||b.startsWith("YES+"));b&&qd("VISITOR_DATA",a.visitorData)}, tryOnYtEndpointChangeHandler_:function(a,b){try{this.onYtEndpointChangeHandler(a,b)}catch(c){Um(c)}}, onYtEndpointChangeHandler:function(){}, onYtNavigateFinishHandler:function(){}, setPageTitle:function(a){a=(this.pageTitle_=a)?a+" - "+this.titleSuffix_:this.titleSuffix_;document.title=this.getNotificationTitlePrefix_()+a}, onYtUpdateTitle_:function(a,b){this.setPageTitle(b)}, getNotificationTitlePrefix_:function(){return this.unseenNotificationCount_?"("+this.unseenNotificationCount_+") ":""}, setUnseenNotificationCount:function(a){this.unseenNotificationCount_=a;this.setPageTitle(this.pageTitle_)}, handleUpdateNotificationsUnseenCountAction_:function(a){a.updateNotificationsUnseenCountAction&&(a.updateNotificationsUnseenCountAction.unseenCount?this.setUnseenNotificationCount(a.updateNotificationsUnseenCountAction.unseenCount):this.setUnseenNotificationCount(0))}, handleClearCookieAction_:function(a){a.clearCookieAction&&a.clearCookieAction.cookieName&&wl(a.clearCookieAction.cookieName)}, onYtUpdateUnseenNotificationCount_:function(a,b){this.setUnseenNotificationCount(b)}, loadData:function(a,b){var c=this;this.loadDepsPromise.then(function(){var d=c.getInterface(W8);d||Um(Error("Load data called with no navigation manager."));if(b&&b.response){if(!a){var f=Cd(window.document.location.href)||"/",g="";if("/"==f||f.startsWith("/?"))g="WEB_PAGE_TYPE_BROWSE";a={commandMetadata:{webCommandMetadata:{url:f,webPageType:g,rootVe:3854}}}}d=d.pageRequestFinished(a,b,5,{});b.filler||c.createClientSideScreen_(b);d.then(function(){N("enable_navigation_requests_streamz")&&c.navigationRequestSentCounter_&& c.navigationRequestSentCounter_.increment(b.page||"null","COLD")})}else a?d.navigate(a):d.navigate(dM); Bk.cancelJob(c.zwiebackInitJobId_);c.zwiebackInitJobId_=yk(Bk,FUa)})}, isDataExpired_:function(a){return!a||isNaN(a.expirationTime)?!1:Vk()>a.expirationTime}, logHistoryNav_:function(a,b){var c=this.get("response.trackingParams",b),d=Nn(),f=On();if(c&&d&&f&&(c=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData.rootVisualElementType",b),!c&&b.rootVe&&(c=b.rootVe),d=this.getHistoryButtonVe_(a),a=OL(),f=[Mi(b)],PL(a,c,d,{dataPromises:f,csnToClone:b.csn}),b.graftedVes))for(b=k(b.graftedVes),c=b.next();!c.done;c=b.next())QL(a,c.value)}, getHistoryButtonVe_:function(a){var b=a?"forwardButton":"backButton";a=this.get("playerResponse.topbar.desktopTopbarRenderer."+b+".buttonRenderer.command.clickTrackingParams",this.data);b=this.get("response.topbar.desktopTopbarRenderer."+b+".buttonRenderer.command.clickTrackingParams",this.data);if(a=a||b)return In(a)}, onStoreGraftedVeAction_:function(a){this.data?(this.data.graftedVes||(this.data.graftedVes=[]),this.data.graftedVes.push(a)):vm(Error("this.data missing"))}, createClientSideScreen_:function(a){var b;N("kevlar_better_cold_ve")&&a.endpoint&&!a.endpoint.urlEndpoint&&(b=this.get("endpoint.commandMetadata.webCommandMetadata.rootVe"));b||(b=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData.rootVisualElementType",a));if(b){var c=OL();a.endpoint&&a.previousCsn?GQa(c,a.endpoint,{parentCsn:a.previousCsn}):PL(c,b);a.response&&a.response.trackingParams&&RL(c,a.response.trackingParams);a.playerResponse&&a.playerResponse.trackingParams&& RL(c,a.playerResponse.trackingParams)}}, onEntitiesUpdated:function(){}}];var fsb={};fsb.YtFeedbackCollectorBehavior=[NO.YtActionHandlerBehavior,{_noAccessors:!0,created:function(){this.feedbackCollectorActionMap_={"yt-help-dialog-requested":"handleHelpDialogRequested_","yt-feedback-dialog-requested":"handleFeedbackDialogRequested_","yt-signal-action-help":"handleSignalActionHelp_","yt-signal-action-send-feedback":"handleSignalActionSendFeedback_","yt-send-feedback-action":"handleSendFeedbackAction_","yt-user-feedback-endpoint":"handleUserFeedbackEndpoint_"}}, attached:function(){this.registerActionMap(this.feedbackCollectorActionMap_)}, detached:function(){this.unregisterActionMap(this.feedbackCollectorActionMap_)}, handleFeedbackDialogRequested_:function(a){a=void 0===a?{}:a;this.getInterface(k4).showFeedbackDialog(a.customProductData,a.feedbackContent,a.onFeedbackSubmitted,a.bucket)}, handleHelpDialogRequested_:function(a){a=void 0===a?{}:a;this.getInterface(k4).showHelpDialog(a.helpContext,a.articleId,a.productData)}, handleSignalActionHelp_:function(){this.handleHelpDialogRequested_()}, handleSignalActionSendFeedback_:function(){this.handleFeedbackDialogRequested_()}, handleSendFeedbackAction_:function(a,b,c){a.sendFeedbackAction&&a.sendFeedbackAction.productId?cJ({productId:a.sendFeedbackAction.productId,bucket:a.sendFeedbackAction.bucket,enableAnonymousFeedback:!0,allowNonLoggedInFeedback:!0},{feedbackChoice:c.feedbackChoice}):this.handleFeedbackDialogRequested_({bucket:a.sendFeedbackAction.bucket})}, handleUserFeedbackEndpoint_:function(a){if(a.userFeedbackEndpoint){a=a.userFeedbackEndpoint;var b={bucket:a.bucketIdentifier};a.additionalDatas&&(b.customProductData={},a.additionalDatas.forEach(function(c){if(c=c.userFeedbackEndpointProductSpecificValueData)b.customProductData[c.key]=c.value})); this.handleFeedbackDialogRequested_(b)}}}];var Z8=function(){this.registrationCompletedPromise_=null;this.isFirstWarmTransitionRequested_=!1},gsb=function(a){if(a.registrationCompletedPromise_)return a.registrationCompletedPromise_; a.registrationCompletedPromise_=Mi();return a.registrationCompletedPromise_},hsb=function(){var a=Z8.getInstance(); a=gsb(a);a.then(function(){qd("IS_HOMEPAGE_COLD",!1);qd("IS_RESULTS_PAGE_COLD",!1);qd("IS_WATCH_PAGE_COLD",!1)}); return a}; La(Z8);Fa("yt.logging.errors.log",Um,void 0);db(A("ERRORS")||[],function(a){Um.apply(null,a)}); qd("ERRORS",[]); var $8={messageWeights:[{messageRegExp:/.*(window.customElements|HTMLTemplateElement).* is undefined/,weight:500},{messageRegExp:/.*property '(configurable|polyfillWrapFlushCallback)'.*/,weight:500},{messageRegExp:/.*__shady_(native_addEventListener|getRootNode).*/,weight:500},{messageRegExp:/ytsignals missing/,weight:500},{messageRegExp:/.*(MutationObserver|ShadowRoot|ErrorEvent) is not defined/,weight:500},{messageRegExp:/Cannot call 'patch'/,weight:500},{messageRegExp:/ShadyDOM.patch is not a function/,weight:500}, {messageRegExp:/Illegal invocation/,weight:500},{messageRegExp:/no such interface supported/,weight:500},{messageRegExp:/play.*request was interrupted/,weight:500},{messageRegExp:/Failed to .* ServiceWorker.*/,weight:500},{messageRegExp:/(DOMPurify|vid_mate_check) is not defined/,weight:0},{messageRegExp:/A network error occurred/,weight:500},{messageRegExp:/Ticking CPT when CPT already ticked/,weight:100},{messageRegExp:/Unexpected end of .*(input|data)/,weight:500},{messageRegExp:/JSON .* unexpected/, weight:500},{messageRegExp:/Unexpected token ")|| b.startsWith("load@")||b.startsWith("global code@")||b.startsWith("@https://")))return!1;return!0}, weight:500},{callback:function(a){return"Cannot read property 'experiments'"===a.message&&a.stack.includes("/s/player/")}, weight:500},{callback:function(a){return a.stack.includes("/embed.js")?(a.params&&a.params&&(a.params.name="56"),!0):!1}, weight:1}]},a9=Om();$8.messageWeights&&(a9.messageWeights=a9.messageWeights.concat($8.messageWeights));$8.callbackWeights&&(a9.callbackWeights=a9.callbackWeights.concat($8.callbackWeights)); window.onerror=function(a,b,c,d,f,g){b=void 0===b?"Unknown file":b;c=void 0===c?0:c;var l=!1,m;if((m=(m=pd.EXPERIMENT_FLAGS)?m.log_window_onerror_fraction:void 0)&&Math.random()=this.MAX_SIZE_){var c=this.timeToDataCache_.keys().next();this.timeToDataCache_.delete(c.value)}this.timeToDataCache_.set(a,b)}; b9.prototype.clear=function(){this.timeToDataCache_.clear()};var isb=function(a,b,c){this.entryTime=a;this.endpoint=b;this.savedComponentState=void 0===c?null:c};var jsb={pushState:window.history.pushState,replaceState:window.history.replaceState}; Polymer({is:"yt-history-manager",behaviors:[AO.YtComponentBehavior,V.YtActionSenderBehavior],properties:{noIframe:Boolean},created:function(){this.historyEntryTime_=0;this.historyEntryTimeToDataMap_={};this.historySnapshotCache_=(this.USE_HISTORY_SNAPSHOT_CACHE_=N("web_enable_history_cache_map"))?new b9:null;this.global=window;this.iframe_=null;this.initialized_=!1;this.boundHistoryPushState_=this.boundHistoryReplaceState_=void 0;this.entryIndex_=0;this.debugInfo_={}}, hasBoundFunctions_:function(){return!!this.boundHistoryReplaceState_&&!!this.boundHistoryPushState_}, init:function(a){if(this.initialized_)return this.hasBoundFunctions_();this.initialized_=!0;if(!this.noIframe){var b=og("IFRAME");b.src="about:blank";b.style.display="none";this.iframe_=b;document.body.appendChild(b)}this.bindHistoryStateFunctions_();a||this.replaceState(null,null,0);return this.hasBoundFunctions_()}, bindHistoryStateFunctions_:function(){var a=[];if(this.iframe_&&this.iframe_.contentWindow.history){var b=this.iframe_.contentWindow.history;b&&(a.push(b),b.__proto__&&a.push(b.__proto__))}this.global.history&&a.push(this.global.history);this.global.history.__proto__&&a.push(this.global.history.__proto__);a.push(jsb);b=function(d){for(var f=null,g=0;gthis.historyEntryTime_,this.historyEntryTime_=a.entryTime,b=a.endpoint,f=a.savedComponentState);c?this.entryIndex_++:this.entryIndex_--;this.fire("yt-history-load",new asb(b,c,d,f,g))}}, saveSnapshot_:function(a,b,c){b=new $rb(b,c);this.USE_HISTORY_SNAPSHOT_CACHE_?this.historySnapshotCache_.set(a,b):this.historyEntryTimeToDataMap_[a]=b}, clearSavedStates:function(){this.USE_HISTORY_SNAPSHOT_CACHE_?this.historySnapshotCache_.clear():this.historyEntryTimeToDataMap_={}}, safeReplaceState_:function(a,b,c){this.boundHistoryReplaceState_||this.bindHistoryStateFunctions_();this.boundHistoryReplaceState_?this.boundHistoryReplaceState_(a,b,c):Um(new Pl("history.replaceState is not a function",this.getDebugString_()))}, safePushState_:function(a,b,c){this.entryIndex_++;this.boundHistoryPushState_||this.bindHistoryStateFunctions_();this.boundHistoryPushState_?this.boundHistoryPushState_(a,b,c):Um(new Pl("history.pushState is not a function",this.getDebugString_()))}, replaceState:function(a,b,c,d){this.init(!0);var f=this.global.history.state&&this.global.history.state.entryTime?this.global.history.state.entryTime:window.performance.now();a=new isb(f,a,d);this.saveSnapshot_(f,b,c);this.historyEntryTime_=f;this.safeReplaceState_(a,"",this.global.location.href)}, replaceUrl:function(a){this.init(!0);this.safeReplaceState_(this.global.history.state,"",lN(a))}, replaceSavedComponentState:function(a){this.init(!0);var b=this.global.history.state;b.savedComponentState=a;this.safeReplaceState_(b,"",Cd(this.global.location.href))}, saveAndPush:function(a,b,c,d,f){this.init();this.maybeCacheTime_(c);c.csn=On();this.saveSnapshot_(this.historyEntryTime_,c,d);b=new isb(window.performance.now(),b,f);this.historyEntryTime_=b.entryTime;this.safePushState_(b,"",lN(a))}, maybeCacheTime_:function(a){var b=ZM(this);if(a&&"watch"==a.page&&this.get("player.args",a)&&!this.get("player.args.live_playback",a)&&b&&(b=b.getPlayer())){var c=b.getDuration()-b.getCurrentTime()>ek("kevlar_time_caching_end_threshold")&&b.getCurrentTime()>ek("kevlar_time_caching_start_threshold");a.player.args.start=c?b.getCurrentTime():0}}});var c9=function(){}; p(c9,XO);e=c9.prototype;e.getApiPaths=function(){return pMa}; e.getExtension=function(a){return a.watchEndpoint}; e.isNavigationCommand=function(){return!0}; e.getStoreKey=function(a){if(N("kevlar_cache_on_ttl_player")&&(a=this.getExtension(a))&&a.videoId){var b={videoId:a.videoId};a.playlistId&&(b.playlistId=a.playlistId);a.playerParams&&(b.params=a.playerParams);return $Ra("player",b)}}; e.getClientScreen=function(a){var b;return 2===(null===(b=a.contentPlaybackContext)||void 0===b?void 0:b.vis)?"WATCH_FULL_SCREEN":"WATCH"}; e.buildRequest=function(a,b,c){b.videoId&&(a.videoId=b.videoId);b.playlistId&&(a.playlistId=b.playlistId);void 0!==b.index&&(a.playlistIndex=b.index+1);b.playerParams&&(a.params=b.playerParams);b.startTimeSeconds&&(a.startTimeSecs=b.startTimeSeconds);c.contentPlaybackContext&&(a.playbackContext={contentPlaybackContext:c.contentPlaybackContext});c.prefetchPlaybackContext&&(a.playbackContext=Object.assign(Object.assign({},a.playbackContext),{prefetchPlaybackContext:c.prefetchPlaybackContext}),a.context.request||( a.context.request={}),a.context.request.isPrefetch=!0)}; e.getRequestConfig=function(a){a=this.getStoreKey(a);var b;a&&(b={storeStrategy:{storeKey:a}});return b};var d9=function(){}; p(d9,XO);e=d9.prototype;e.getApiPaths=function(){return OMa}; e.getExtension=function(a){return a.watchEndpoint}; e.isNavigationCommand=function(){return!0}; e.getClientScreen=function(a){var b;return 2===(null===(b=a.contentPlaybackContext)||void 0===b?void 0:b.vis)?"WATCH_FULL_SCREEN":"WATCH"}; e.buildRequest=function(a,b,c){b.videoId&&(a.videoId=b.videoId);b.playlistId&&(a.playlistId=b.playlistId);b.params&&(a.params=b.params);void 0!==b.index&&(a.playlistIndex=b.index);c.consentBumpParams&&(a.consentBumpParams=c.consentBumpParams);a.racyCheckOk=!1;a.contentCheckOk=!1;c.contentPlaybackContext&&(a.autonavState=c.contentPlaybackContext.autonavState,a.playbackContext={vis:c.contentPlaybackContext.vis,lactMilliseconds:c.contentPlaybackContext.lactMilliseconds})}; var e9=function(){}; p(e9,XO);e9.prototype.getApiPaths=function(){return OMa}; e9.prototype.getExtension=function(a){return a.continuationCommand}; e9.prototype.buildRequest=function(a,b){b.token&&(a.continuation=b.token)};function ksb(a,b){var c=window.location.href,d,f,g,l;if(a.watchEndpoint&&(null===(f=null===(d=a.commandMetadata)||void 0===d?void 0:d.webCommandMetadata)||void 0===f?0:f.url)){var m=new jJ;b={contentPlaybackContext:aTa(b,null===(l=null===(g=a.commandMetadata)||void 0===g?void 0:g.webCommandMetadata)||void 0===l?void 0:l.url,c),consentBumpParams:mN()};(c=new d9().getRequest(a,b))&&lsb(m,c.innerTubeRequest,"WatchUIService.GetWatchNext");(a=new c9().getRequest(a,b))&&lsb(m,a.innerTubeRequest,"WatchService.GetPlayer"); return Me(m.serializeBinary())}} function lsb(a,b,c){var d=new iJ;b=JSON.stringify(b);tf(d,2,b);d.setName(c);Mf(a,2,d,iJ,void 0)} ;function msb(a){if(!a.urlEndpoint)return!1;var b=a.urlEndpoint.url;if(!b)return Um(Error("UrlEndpoint with no url specified.")),!1;if("TARGET_NEW_WINDOW"===a.urlEndpoint.target)return N("resolve_url_parent_tracking_params")&&(!zd(b)||Ed(window.location.href,b))&&rJ(b,{endpoint:a,itct:a.clickTrackingParams}),hga(b,{target:"_blank",noopener:!0}),!0;var c=Ad(b);c=c&&c.includes("/parent_tools");var d=!(!zd(b)||Ed(window.location.href,b)),f=0<=b.indexOf("disable_polymer=1");if(d||f||c)Uo("n"),gO(b,void 0, void 0,window.top);else return vm(new Pl("UrlEndpoint should not be used for same origin navigations. Use a better typed command instead",a)),!1;return!0} function nsb(a){if(!(a.signOutEndpoint||a.signInEndpoint||a.urlEndpoint&&a.urlEndpoint.url)||!a.clickTrackingParams)return!1;var b=a.clickTrackingParams,c=On();if(c&&b){var d;a=(null===(d=a.urlEndpoint)||void 0===d?0:d.url)?{externalLinkData:{url:a.urlEndpoint.url}}:null;QJ(c,In(b),a);return!0}return!1} ;var osb="/account /account_advanced /account_billing /account_notifications /account_playback /account_privacy /account_sharing /channel/ /feed/ /gaming /gaming/ /learning /manage_red /musicpremium /new /originals /paid_memberships /playlist /post/ /premium /results /search /show/ /user/ /watch /youtuberedoriginals".split(" "),psb=[];Polymer({is:"yt-navigation-manager",provides:W8,behaviors:[AO.YtComponentBehavior,{_noAccessors:!0,created:function(){this.pendingNavigationPromise_=null}, hasPendingNavigation:function(){return!!this.pendingNavigationPromise_}, cancelPendingNavigation:function(){this.pendingNavigationPromise_&&(this.pendingNavigationPromise_=null)}}, NO.YtActionHandlerBehavior,V.YtActionSenderBehavior],actionMap:{"yt-signal-action-history-back":"handleSignalActionHistoryBack_","yt-signal-action-reload-page":"handleSignalActionReloadPage_","yt-signal-action-soft-reload-page":"handleSignalActionSoftReloadPage_","yt-signal-action-reset-warm-loads":"handleSignalActionResetWarmLoads_","yt-signal-action-close-window":"handleSignalActionCloseWindow_"},created:function(){this.logger_=null;this.numNavigations_=-1;this.chunksReceived_=0;this.lastNavigationUrl_= this.pendingNavigationPromise_=null;this.initClientStreamzObjects_();this.autoplayCount=1;this.hasSeenSwfConfigChunk_=this.resetWarmLoads_=!1}, initClientStreamzObjects_:function(){N("enable_servlet_streamz")&&(this.requestCounter_=new Jt,this.responsesCounter_=new Kt);N("debug_servlet_streamz")&&(this.navigatePageTypeCounter_=new Mt,this.awayFromAppEndpointCounter_=new Nt,this.cannotGenerateURLCounter_=new Ot,this.forcedColdLoadCounter_=new Pt,this.pageRequestFailCounter_=new Qt,this.loadPageRequestCounter_=new Rt,this.pageChunkReceivedCounter_=new St,this.pageRequestFinishedCounter_=new Tt,this.pageUpdateFinishCounter_=new Ut);N("enable_navigation_requests_streamz")&&( this.navigationRequestSentCounter_=new Yt(Ym()));N("enable_servlet_errors_streamz")&&(this.servletResponseErrorsCounter_=new Lt)}, factoryImpl:function(){}, currentEndpoint_:null,getPageTypeForEndpoint_:function(a){var b="";if(!a)return null;a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.webPageType?b=ZSa(a.commandMetadata.webCommandMetadata.webPageType.toLowerCase()):a.browseEndpoint||a.watchPlaylistEndpoint?b="browse":a.searchEndpoint?b="search":a.watchEndpoint&&(b="watch");return b}, getCurrentEndpoint:function(){return this.currentEndpoint_}, reload:function(){window.location.reload()}, reloadData:function(){this.currentEndpoint_&&this.navigate(this.currentEndpoint_,!0)}, navigate:function(a,b,c,d,f,g){var l=this;b=void 0===b?!1:b;c=void 0===c?{}:c;d=void 0===d?{}:d;var m=this.getPageTypeForEndpoint_(a);this.navigatePageTypeCounter_&&this.navigatePageTypeCounter_.increment(m||"null",f||"null");var n="1"==d.autonav,r=On(),u;if("watch"===m&&(N("kevlar_prefetch")&&!N("block_all_player_prefetch_requests")&&(u=ATa(DN.getInstance(),a,n)),N("persistent_miniplayer")&&this.shouldLoadEndpointInMiniplayer_()))return this.endpointInMiniplayer_(a)?this.sendAction("yt-expand-watch-page-action"): this.sendAction("yt-miniplayer-load-endpoint",[a]),!1;u&&(c.frags=u.missingFragments_.join(","));var z=null;this.get("commandMetadata.webCommandMetadata.ignoreNavigation",a)||(z=N("kevlar_command_url")?this.get("commandMetadata.webCommandMetadata.url",a):wL(a,c));var C=!1;if(z&&this.pendingNavigationPromise_){if(this.lastNavigationUrl_&&z==this.lastNavigationUrl_)return Ila("nrsu")||Po("nrsu",1),!1;this.pendingNavigationPromise_.cancel("canceled pendingNavigationPromise_");C=!0;this.recordNavigationCancelled_()}var J= window.location.href;C?this.lastNavigationReferer_&&(J=this.lastNavigationReferer_):this.lastNavigationReferer_=J;z&&(this.lastNavigationUrl_=z);var E=hsb();a.loggingUrls&&a.loggingUrls.forEach(function(qa){qa.baseUrl&&Sn(qa.baseUrl)}); nsb(a)&&N("kevlar_flush_logs_on_away_navigation")&&cl();if(msb(a))return this.awayFromAppEndpointCounter_&&this.awayFromAppEndpointCounter_.increment(m||"null"),!1;this.recordNavigationStart_(m,f);if(!z)return this.cannotGenerateURLCounter_&&this.cannotGenerateURLCounter_.increment(m||"null"),this.recordNavigationFailure_(),!1;zNa();var T=a&&a.hasOwnProperty("browseEndpoint")&&a.browseEndpoint.browseId.startsWith("UC");T=this.shouldRedirect_(z)&&!T;N("kevlar_next_cold_on_auth_change_detected")&&!hia().verifyUser()&&( T=!0);if(T||A("DISABLE_WARM_LOADS")||this.resetWarmLoads_)return gO(z,void 0,void 0,window.top),this.forcedColdLoadCounter_&&this.forcedColdLoadCounter_.increment(m||"null",this.shouldRedirect_(z),A("DISABLE_WARM_LOADS")),this.recordNavigationAborted_(),!1;this.resetChunkState();Fla("n");Wo("nd");Hla("nr");n&&Po("nr","an");C&&Po("pnc",1);if(N("kevlar_mousedown_prefetch")&&!N("block_all_player_prefetch_requests")&&u&&u.completionPromise){var la=u.completionPromise;u.addPartCallback(function(qa){l.handleNavigatePart_(la, a,d,qa)})}else a.clickTrackingParams&&(d.itct=a.clickTrackingParams,d.csn=r),d.endpoint=JSON.stringify(a),y.isEmpty(d)||rJ(z,d),n={headers:{"X-YouTube-STS":N("web_player_enable_ipp")?A("STS",void 0):18648, "x-youtube-csoc":1}},f&&(n.type=f),N("web_forward_command_on_pbj")?(n.method="POST",n.postParams={command:JSON.stringify(a)}):N("web_post_search")&&this.get("commandMetadata.webCommandMetadata.sendPost",a)&&(n.method="POST"),this.requestCounter_&&this.requestCounter_.increment(m||"null"),N("kevlar_op_warm_diffing")&&n.postParams&&(r=ksb(a,d))&&(n.postParams.cdiffdata=r),r=oN(nN.instance,a),C=window.location.href,N("kevlar_use_pre_cancel_referer")&&(C=J),la=r?pN(nN.instance,a,d,C,this.getPageTypeForEndpoint_(a), function(qa,Ia){l.loadPageChunk_(qa,Ia,d,g)},function(qa){return l.isNetworkPromiseStale_(qa)}):this.getInterface(UM).requestDataForEndpoint(a,c,function(qa){this.handleNavigatePart_(la,a,d,qa,g)}.bind(this),n,!!N("cancel_pending_navs")); this.pendingNavigationPromise_=la;c=E.then(function(){return la}).then(this.handleNavigateSuccess_.bind(this,la,a,u,d),this.handleNavigateFail_.bind(this,la,a)); YL.getInstance().navigationFinishPromise=c;b={endpoint:a,pageType:m,url:lN(z),reload:!!b};f&&(b.type=f);E.then(this.fire.bind(this,"yt-navigate-start",b));u&&E.then(this.loadPrefetchedData_.bind(this,a,u,d));return!0}, loadPrefetchedData_:function(a,b,c){if(b=pTa(b))N("kevlar_prefetched_data_set_csn_early")&&b.csn&&b.rootVe&&Qn(b.csn,b.rootVe),this.loadPageChunk_(a,b,c)}, navigateApp:function(){throw Error("Not implemented for this navigation manager.")}, isNetworkPromiseStale_:function(a){return a!=this.pendingNavigationPromise_}, pageRequestFail_:function(a,b,c,d){var f=this.getPageTypeForEndpoint_(a);this.pageRequestFailCounter_&&this.pageRequestFailCounter_.increment(f||"null");a={endpoint:a,pageType:f};d&&(a.errorMessage=d);vm(b);a.navigationDoneMs=Ro("nd");a.navigationErrorReason=c;this.responsesCounter_&&(c=this.get("params.error.0.code",b)||"null_error",this.responsesCounter_.increment("failure",f||"null",c));this.servletResponseErrorsCounter_&&(f=this.get("params.error.0.code",b)||"null_error_code",b=this.get("params.error.0.location", b)||"null_error_location",this.servletResponseErrorsCounter_.increment(f,b));this.fire("yt-navigate-error",a)}, handleNavigateFail_:function(a,b,c){var d=void 0;c instanceof Ui&&(d=c,c.sampleWeight=0);if(this.isNetworkPromiseStale_(a))return N("kevlar_track_mousedown_prefetch")&&wN.getInstance().resolve(!0),Ni(d);this.recordNavigationFailure_();this.pageRequestFail_(b,c,"101");return Ni(c)}, handleNavigatePart_:function(a,b,c,d,f){this.isNetworkPromiseStale_(a)||(d.reload?window.location.reload(!0):(Ro("nc"+this.chunksReceived_),this.chunksReceived_++,gsb(Z8.getInstance()).then(this.pageChunkReceived_.bind(this,b,c,d,f))))}, handleNavigateSuccess_:function(a,b,c,d,f){if(this.isNetworkPromiseStale_(a))return N("kevlar_track_mousedown_prefetch")&&wN.getInstance().resolve(!0),Mi();N("kevlar_track_mousedown_prefetch")&&wN.getInstance().resolve();this.pendingNavigationPromise_=null;if(!f)return b=new Pl("Missing data in response for navigation endpoint",b),Ni(b);if(f.reload)return window.location.reload(!0),Mi();c&&(a={},y.extend(a,pTa(c),f),f=a);c=this.get("timing.responseStart",f);null!=c&&Ro("srt",c);Ro("pdc");c=this.get("timing.info", f);if(null!=c)for(var g in c)Po(g,c[g]);d.playnext?jN().count++:jN().count=1;N("enable_navigation_requests_streamz")&&this.incrementNavigationRequestsStreamz_(b);this.recordNavigationSuccess_();this.pageRequestFinished(b,f,1,d);return Mi()}, shouldRedirect_:function(a){if("/"==a||"/red"==a)return!1;var b=!0;osb.forEach(function(c){0==a.indexOf(c)&&(b=!1)}); psb.forEach(function(c){var d=c.url;N(c.expFlag)&&0==a.indexOf(d)&&(b=!1)}); return b}, publishPageData_:function(a){this.fire("yt-page-data-fetched",{pageData:a})}, updatePlayer_:function(a,b,c,d,f){var g=ZM(this),l=this.get("args.el",a);if(!g)return l&&(a=new Pl("Player missing when attempting update from updatePlayer_","el="+l),Um(a)),Mi();try{return g.update(a,g,b,c,d,f)}catch(m){Um(m)}return Mi()}, loadPageChunk_:function(a,b,c,d){this.performChunkLoad_(a,b,!1,!0,c,d)}, resetChunkState:function(){this.chunksReceived_=0;this.chunkHandler_=void 0;this.hasSeenSwfConfigChunk_=!1}, makeChunkPayload_:function(a,b){return{endpoint:a,data:b}}, performChunkLoad_:function(a,b,c,d,f,g){if(!this.chunkHandler_){var l=this.getInterface(XM);"watch"==b.page?d||c?(c={clientParams:{miniplayer:!1,autoSaveToQueue:!0,fromHistory:c},tempData:f},this.chunkHandler_=new JM(this.playerProvider_.bind(this),l,c,g)):this.chunkHandler_=new nSa(this.playerProvider_.bind(this),l):this.chunkHandler_=new oSa(g)}b.player?this.hasSeenSwfConfigChunk_=!0:N("kevlar_player_response_swf_config_wrapper_killswitch_2")||this.hasSeenSwfConfigChunk_||!b.playerResponse||y.isEmpty(A("WEB_PLAYER_CONTEXT_CONFIGS"))||( b.player=bN(b.playerResponse));this.chunkHandler_.processChunk(this.makeChunkPayload_(a,b));return this.chunkHandler_.playerPromiseResolver.promise}, loadPageRequest_:function(a,b,c,d,f){var g=null;this.loadPageRequestCounter_&&this.loadPageRequestCounter_.increment(null!==a.player,a.page||"null",b,c);if("watch"!=a.page||c){if(a.player){if(this.get("response.contents.twoColumnWatchNextResults",a)){var l=this.get("response.playerOverlays.playerOverlayRenderer.endScreen.watchNextEndScreenRenderer",a);var m=this.get("response.contents.twoColumnWatchNextResults.autoplay.autoplay",a);var n=this.get("response.webWatchNextResponseExtensionData.relatedVideoArgs", a);var r=this.get("response.contents.twoColumnWatchNextResults.playlist.playlist",a)}else this.get("response.contents.singleColumnWatchNextResults",a)&&(n=this.get("response.webWatchNextResponseExtensionData.relatedVideoArgs",a));b&&NUa(a.player.args);b=this.updatePlayer_.bind(this,a.player,l,m,n,r);a.filler||(Xo("cfg"),this.sendAction("player-update-pre",[a.page,a.player,a.playerResponse]));"browse"==a.page?this.asyncFrame(b,0):g=c?Mi():this.isMiniplayerActive_()&&this.isPlayerPlayingData_(a)?Mi(): b()}a.filler||this.sendAction("yt-stop-old-player",[a])}else g=this.performChunkLoad_(d,a,b,!1,f);if(g)return g.then(this.publishPageData_.bind(this,a));this.publishPageData_(a);return Mi()}, checkNetworkResponseErrors_:function(a,b){var c=null;if(!b)return c=new Pl("Empty data",this.is,a);var d=b.response;d||(c=new Pl("Response field missing from data",this.is,a));if((N("kevlar_op_search_sampling")||0=this.timeBetweenJobsMs_?this.doAfterRenderRequest_():this.doIdleRequest_(this.timeBetweenJobsMs_-a)}}, refreshVisibility_:function(){if(this.dirty_&&!this.pauseScan)if(this.dirty_=!1,this.isAttached){var a=this.visibilityRoot;if(a){var b=window.innerHeight,c=window.innerWidth;this.nodeCountNoPreload_=this.nodeCount_=0;this.screenRect_=new Wg(0,0,c,b);this.prescanRect_=new Wg(this.screenRect_.left,this.screenRect_.top+this.screenRect_.height,this.screenRect_.width,this.heightPrescan);b=new Set;this.traverseNodes_(a,this.screenRect_,b,0);a=nP.getInstance();c=k(b);for(var d=c.next();!d.done;d=c.next())d= d.value,this.lastVisibleSet_.has(d)||a.shown(d),this.lastVisibleSet_.delete(d);this.lastVisibleSet_.forEach(a.hidden.bind(a));this.lastVisibleSet_=b;this.fire("yt-visibility-monitor-refreshed")}else ud(Error("Cannot find root node for visibility monitor"))}else ud(Error("Visibility monitor is not attached"))}, isNodeVisible:function(a){return this.lastVisibleSet_.has(a)}, traverseNodes_:function(a,b,c,d){if(3!=a.visibilityLogging){var f=RJ.getInstance();d=a.screenLayer||d;var g=window.getComputedStyle(a);if(!g||"none"!=g.display&&"hidden"!=g.visibility){var l=a.getBoundingClientRect();if(l.top||l.right||l.bottom||l.left||l.width||l.height){l=new Wg(l.left,l.top,l.width,l.height);b=N("viewport_non_overlapping_intersect")?l.left=this.playlistComponent.data.totalVideos;if("NORMAL"!=a||"autoplayVideo"!=b||!d||!c)if(a=this.getVideoEndpoint_(a,b))c=this.getTempData_(a,c),this.fire("yt-navigate",{endpoint:a,tempData:c})}, getVideoEndpoint_:function(a,b){if(this.autoplayData&&this.autoplayData.sets)for(var c=0,d=this.autoplayData.sets.length;c\n
\n
\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xsb){var d=document.createElement("template");d.innerHTML="";xsb=d}d=xsb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ysb=a}, APP_IDS:{ytr:3,ytm:5},behaviors:[NO.YtActionHandlerBehavior],properties:{isMobile:{type:Boolean,reflectToAttribute:!0},onReadyCallback_:Function,observer_:Object},actionMap:{"yt-open-create-family-dialog":"open"},created:function(){this.timeoutId_=0;UHa(2200)}, detached:function(){this.observer_&&this.observer_.disconnect()}, open:function(a,b){var c=a.serializedYpcFamilyCreateLoggingParams;this.timeoutId_=setTimeout(this.abort_.bind(this,a.postFlowErrorEndpoint,c),3E4);b&&(this.onReadyCallback_=b);var d=this.$["unicorn-iframe"];c&&c&&MVa("ypcFamilyCreateFlowStarted",c);vLa("family_creation",function(){var f=Ja("gapi.config.update"),g=Ja("gapi.family_creation.render");f("iframes/family_creation/url",this.getFamilyCreationUrlWithUnicornParams_());f=3;a.appId&&a.appId in this.APP_IDS&&(f=this.APP_IDS[a.appId]);f={authUser:A("SESSION_INDEX")|| 0,clientId:f,darkmode:document.documentElement.hasAttribute("dark")?1:0,hl:A("HL",void 0),initialflow:[4,5,6,7],m:this.isMobile?1:0,onFlowComplete:this.onUnicornFlowComplete_.bind(this,a.postFlowSuccessEndpoint,c),onError:this.onUnicornFlowError_.bind(this,a.postFlowErrorEndpoint,c),onReady:this.onUnicornFlowReady_.bind(this,a.referencePcidParams)};g(d,f)}.bind(this))}, close:function(){this.$.dialog.close();this.observer_&&this.observer_.disconnect()}, onUnicornFlowComplete_:function(a,b){this.close();b&&b&&MVa("ypcFamilyCreateFlowSucceeded",b,void 0,void 0,void 0);this.fire("yt-navigate",{endpoint:a})}, onUnicornFlowError_:function(a,b){this.close();b&&MVa("ypcFamilyCreateFlowCancelled",b);this.fire("yt-navigate",{endpoint:a})}, onUnicornFlowReady_:function(a){this.clearTimeout_();if(this.onReadyCallback_)this.onReadyCallback_();a&&Ja("gapi.family_creation.setConfig")(0,a);this.observer_=new MutationObserver(function(){this.$.dialog.fit()}.bind(this)); this.observer_.observe(this.$["unicorn-iframe"].querySelector("iframe"),{atttributes:!0,attributeFilter:["style"]});this.$.dialog.open()}, getFamilyCreationUrlWithUnicornParams_:function(){return A("YTR_FAMILY_CREATION_URL",void 0)}, getCurrentUrl_:function(){return document.location.href}, abort_:function(a,b){this.clearTimeout_();this.onUnicornFlowError_(a,b)}, clearTimeout_:function(){clearTimeout(this.timeoutId_)}});var zsb;var Asb;Polymer({is:"yt-page-navigation-progress",_template:function(){if(void 0!==Asb)return Asb;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===zsb){var d=document.createElement("template");d.innerHTML=""; zsb=d}d=zsb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Asb=a}, provides:X8,behaviors:[AO.YtComponentBehavior],factoryImpl:function(){}, STEP:1,BLOCK_ON:80,MIN_PROGESS:0,MAX_PROGESS:100,created:function(){this.boundNextProgress_=this.nextProgress_.bind(this)}, ready:function(){this.progress_=this.MIN_PROGESS;this.hidden=!0;this.setAttribute("aria-valuemin",this.MIN_PROGESS);this.setAttribute("aria-valuemax",this.MAX_PROGESS)}, set progress(a){this.progress_=a;var b="scaleX("+a/this.MAX_PROGESS+")",c=this.$.progress.style;c.transform=b;c.webkitTransform=b;this.setAttribute("aria-valuenow",a)},get progress(){return this.progress_},start:function(){this.progress=this.MIN_PROGESS;this.hidden=!1;window.requestAnimationFrame(this.boundNextProgress_)}, finish:function(){this.progress=this.MAX_PROGESS;this.asyncFrame(function(){this.progress==this.MAX_PROGESS&&(this.hidden=!0)}.bind(this),80)}, nextProgress_:function(){this.progress>=this.BLOCK_ON||(this.progress+=this.STEP,window.requestAnimationFrame(this.boundNextProgress_))}});var Bsb=function(){this.innertubeTransportService=mM()},Dsb=function(a){var b=Bsb.instance; return a.runAttestationCommand?Ti(nM(b.innertubeTransportService,a).then(function(c){if(!c)throw new Pl("Fetching RunAttestationCommand returned falsy",a);Csb(b,c)}),function(c){Um(c)}):Ni(Error("Bad Command: no runAttestationCommand"))},Csb=function(a,b){if(!b.botguardData)throw Error("Bad AttestationChallengeResponse: no BG data"); if(!b.botguardData.program)throw Error("Bad AttestationChallengeResponse: no BG program");if(!b.botguardData.interpreterScript&&!b.botguardData.interpreterUrl)throw Error("Bad AttestationChallengeResponse: no BG script or url");if(!b.challenge)throw Error("Bad AttestationChallengeResponse: no attestation challenge string");var c=new lJ;c.initialize(b.botguardData.interpreterScript,b.botguardData.interpreterUrl,b.botguardData.program,function(){xKa(c,{atr_challenge:b.challenge}).then(function(d){if(!d)throw Error("BG invocation returned null"); return Esb(a,b.challenge,d)}).catch(function(d){vm(d); return Esb(a,b.challenge,void 0)})},void 0,!0)},Esb=function(a,b,c){b={challenge:b}; c&&(b.webResponse=c);return oM(a.innertubeTransportService,b,lM(iMa))};var Fsb={padding:"10px 16px","font-size":"32px","font-weight":"bold",background:"linear-gradient(135deg, rgba(131, 58, 180, 1) 0%, rgba(253, 29, 29, 1) 50%, rgba(252, 176, 69, 1) 100%)",color:"#fff","text-shadow":"1px 1px 3px rgba(255, 255, 255, 0.3)","border-radius":"15px"},Gsb={"font-size":"12px","font-style":"italic"},Hsb={padding:"8px 0","font-size":"14px","font-weight":"bold",color:"#f00"};function Isb(a){return Object.entries(a).map(function(b){return b.join(":")}).join(";")} ;var j9=function(){this.serviceMap=E1a}; j9.prototype.shouldPreferLocalResponse=function(a,b){var c=k9(this,a);return c?c.shouldPreferLocalResponse(a,b):!1}; j9.prototype.localInnertubeResponse=function(a,b){return Ya(this,function d(){var f=this,g;return ya(d,function(l){return(g=k9(f,a))?l.return(g.localInnertubeResponse(a,b)):l.return(Promise.reject(Error("No local service avaiable.")))})})}; j9.prototype.canProvideFallbackResponse=function(a,b){var c=k9(this,a);return c?c.canProvideFallbackResponse(a,b):!1}; j9.prototype.localFallbackInnertubeResponse=function(a,b){return Ya(this,function d(){var f=this,g;return ya(d,function(l){return(g=k9(f,a))?l.return(g.localFallbackInnertubeResponse(a,b)):l.return(Promise.reject(Error("No local service available.")))})})}; var k9=function(a,b){if(!N("kevlar_local_innertube_response"))return null;b=Ad("string"===typeof b?b:b.url);return b?(a=a.serviceMap[b])?a:null:null};var Jsb=function(){oQ.apply(this,arguments);this.responseStore=new Map}; p(Jsb,oQ);e=Jsb.prototype;e.get=function(a){return Ya(this,function c(){var d=this,f;return ya(c,function(g){return(f=d.responseStore.get(a))?g.return(new pQ(f.entryData)):g.return(void 0)})})}; e.putInternal=function(a,b){return Ya(this,function d(){var f=this,g,l,m;return ya(d,function(n){g=f;l=f.defaultExpirationDelayMs;b.expireTimestampMs&&(l=Number(b.expireTimestampMs)-Math.round(Vk()));m=setTimeout(function(){g.remove(a)},l); f.responseStore.set(a,{entryData:b,timer:m});oa(n)})})}; e.remove=function(a){return Ya(this,function c(){var d=this,f;return ya(c,function(g){if(f=d.responseStore.get(a))clearTimeout(f.timer),d.responseStore.delete(a);oa(g)})})}; e.removeAll=function(){return Ya(this,function b(){var c=this;return ya(b,function(d){c.responseStore.forEach(function(f){clearTimeout(f.timer)}); c.responseStore.clear();oa(d)})})}; e.has=function(a){return!!this.responseStore.get(a)};var Ksb=function(a){this.responseStore=a}; Ksb.prototype.handleResponse=function(a,b){var c,d,f;b=null===(d=null===(c=b.config)||void 0===c?void 0:c.storeStrategy)||void 0===d?void 0:d.storeKey;var g=null===(f=a.responseContext)||void 0===f?void 0:f.maxAgeSeconds;if(b&&g&&0\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n\n"; a.content.insertBefore(X().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Irb){var d=document.createElement("template");d.innerHTML=""; Irb=d}d=Irb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Jrb=a}, behaviors:[Q0a.YtdAutonavPauseBehavior,JQ.YtdReduxBehavior,O1a.YtdPlaylistHandlerBehavior,I1a.YtdDownloadManagerBehavior,YP.YtEventForwardingBehavior,aP.YtOpenPopupBehavior,NO.YtActionHandlerBehavior,{_noAccessors:!0,actionRouterIsRoot:!1,created:function(){this.actionRouter_=DL.getInstance();this.actionRouterNode=this.actionRouterIsRoot?document:this;this.onYtActionBoundListener_=this.onYtAction_.bind(this);this.actionRouterListenersRegistered_=!1;N("action_router_attached_only_killswitch")&&this.registerActionRouterEventListeners_()}, attached:function(){this.registerActionRouterEventListeners_()}, detached:function(){this.unregisterActionRouterEventListeners_()}, registerActionRouterEventListeners_:function(){this.actionRouterListenersRegistered_||(this.actionRouterListenersRegistered_=!0,this.actionRouterNode.addEventListener("yt-action",this.onYtActionBoundListener_))}, unregisterActionRouterEventListeners_:function(){this.actionRouterListenersRegistered_=!1;this.actionRouterNode.removeEventListener("yt-action",this.onYtActionBoundListener_)}, onYtAction_:function(a){this.actionRouter_.handleAction(a.detail)}}, esb.YtAppBehavior,dP.YtEndpointBehavior,Zrb.YtEndpointHandlerWithYpcBehavior,Krb,fsb.YtFeedbackCollectorBehavior,W.YtRendererBehavior,Dqb.YtSwatchBehavior],CSI_SERVICE_NAME:"youtube",properties:{renderGuide:Boolean,guidePersistentAndVisible:{type:Boolean,reflectToAttribute:!0},standalone:{type:Boolean,value:!1,reflectToAttribute:!0},miniGuideVisible_:{type:Boolean,reflectToAttribute:!0},miniplayerActive_:{type:Boolean,reflectToAttribute:!0},mastheadHidden_:{type:Boolean,reflectToAttribute:!0,value:function(){return rd("START_IN_FULL_WINDOW_MODE")}}, playerFullscreen_:{type:Boolean,reflectToAttribute:!0},hideHeaderShadow:{type:Boolean,value:!1,reflectToAttribute:!0},menuStrings_:{type:Object,value:{GUIDE_ALT_LABEL:mL("GUIDE_ALT_LABEL",void 0,"Guide")}},topbarData_:{type:Object,computed:"computeTopbarData_(data)"},isWatchPage:{type:Boolean,value:!1,reflectToAttribute:!0},useVimio_:{type:Boolean,value:N("kevlar_use_vimio_behavior")},scrollbarRework:{type:Boolean,reflectToAttribute:!0,value:N("kevlar_scrollbar_rework")},scrolling_:{type:Boolean, reflectToAttribute:!0},guideScrolledByTouch:{type:Boolean,reflectToAttribute:!0,value:!1},scrollbarColor:{type:Boolean,value:function(){return N("kevlar_standard_scrollbar_color")}, reflectToAttribute:!0}},listeners:{"app-drawer-transitioned":"onDrawerIronSelect_",attached:"onYtdPageManagerAttached_","yt-add-element-to-app":"onAddElementToApp_","yt-guide-hover":"onGuideOpenButtonHover_","yt-masthead-height-changed":"onYtMastheadHeightChanged_","yt-page-type-changed":"onPageChanged_","yt-request-panel-mode-change":"onRequestPanelModeChange_","yt-set-theater-mode-enabled":"onSetTheaterModeEnabled_","yt-set-fullerscreen-styles":"setFullscreen_","yt-focus-searchbox":"onFocusSearchBox_", "yt-open-hotkey-dialog":"onOpenHotkeyDialog_",touchstart:"onTouchStart_"},observers:["updateMastheadData_(data)","observeGuideVisibility_(guidePersistentAndVisible, miniGuideVisible_)"],actionMap:{"yt-command-executor-command":"onYtCommandExecutorCommand_","yt-dark-mode-toggled-action":"onDarkModeToggledAction_","yt-dark-theme-action":"onDarkThemeAction_","yt-edu-dismiss-action":"handleEduDismissAction_","yt-edu-impression-action":"handleEduImpressionAction_","yt-light-theme-action":"onLightThemeAction_", "yt-navigate-action":"onYtNavigateAction","yt-player-fullscreen":"onPlayerFullscreen_","yt-register-create-family-dialog":"onYtRegisterCreateFamilyDialog_","yt-select-country-command":"handleSelectCountryCommand_","yt-select-language-command":"handleSelectLanguageCommand_","yt-clear-url-param-command":"handleClearUrlParamCommand_","yt-set-cookie-command":"onSetCookieCommand_","yt-set-local-storage-command":"onSetLocalStorageCommand_","yt-set-push-notifications-enabled-command":"onSetPushNotificationsEnabledCommand_", "yt-signal-action-enable-chrome-notifications":"onYtSignalActionEnableChromeNotifications_","yt-signal-action-toggle-restricted-mode-on":"onYtSignalActionToggleRestrictedModeOnAction_","yt-signal-action-toggle-restricted-mode-off":"onYtSignalActionToggleRestrictedModeOffAction_","yt-signal-action-copy-link-address":"handleSignalActionCopyLinkAddress_","yt-signal-action-confirm-mentions-edu":"onYtSignalActionConfirmMentionsEdu_","yt-signal-action-record-mentions-edu-impression":"onYtSignalActionRecordMentionsEduImpression_", "yt-signal-action-show-keyboard-shortcut-dialog":"onYtSignalActionShowKeyboardShortcutDialog_","yt-signal-action-skip-navigation":"onYtSignalActionSkipNavigation_","yt-window-resized":"onWindowResized_","yt-miniplayer-active-changed-action":"handleMiniplayerActiveChangedAction_","yt-persist-subscriptions-display-preferences-command":"handlePersistSubscriptionsDisplayPreferencesCommand_","yt-invoke-instrument-manager-action":"onInvokeInstrumentManagerAction_"},dynamicActionMap:{"yt-run-attestation-command":function(a){return Dsb(a)}}, created:function(){var a=this;this.SVG_NAMESPACE_="http://www.w3.org/2000/svg";this.pageManagerAttachedPromise_=Qi();this.loadDepsPromise=Pi([this.loadDepsPromise,this.pageManagerAttachedPromise_.promise]);this.optOutButtonPromise_=Qi();this.scrollAtTop_=!0;this.scrollThrottle_=new Jq(this.onThrottledScroll_,200,this);this.isTheaterModeSession_=rd("START_IN_THEATER_MODE");this.isFullWindowSession_=rd("START_IN_FULL_WINDOW_MODE");this.hasCreateFamilyDialog_=!1;this.forcedTheme_=null;this.autoShellPurgeRateLimitKey_= "yt-shell-auto-purge-triggered";N("external_fullscreen")&&(this.fullscreen_=!1);this.mastheadHeight_=56;iia();(0,tm.registerLogger)();UKa=!!Ja("ytappsettings.initialized");vJ=Ja("ytappsettings.previousValue");wJ=Ja("ytappsettings.previousSnapshotTime");UKa||(UKa=!0,VKa());MUa();VUa();qd("DEFERRED_DETACH",N("kevlar_tuner_should_defer_detach"));qd("REUSE_COMPONENTS",!0);qd("STAMPER_STABLE_LIST",!0);qd("SCHEDULED_LAZY_LIST",!0);qd("openPopupConfig",cdb);N("kevlar_command_handler")&&this.initCommandHandler_(); var b=bia(),c;N("kevlar_enable_slis")&&!N("kevlar_network_sli_killswitch")&&(c=Jka());N("kevlar_fetch_networkless_support")?(j9.instance=new j9,l9.instance=new l9(j9.instance,c)):l9.instance=new l9(void 0,c);N("kevlar_persistent_response_store")&&(rQ.instance=new rQ("WEB",5184E6),G1a());l9.instance||(l9.instance=new l9);c=l9.instance;var d=N("web_enable_client_location_service")?VRa():void 0,f=[TRa()];d&&f.push(d);N("kevlar_cache_on_ttl")?(d=new Jsb(A("INNERTUBE_CONTEXT_CLIENT_NAME","WEB"),3E5),f.push(new Ksb(d)), wM.instance=new wM(c,b,f,d)):wM.instance=new wM(c,b,f,void 0);nN.instance=new nN(aSa.watchEndpointMap||{},mM());N("nwl_init_killswitch")||qja();Lsb();Bsb.instance=new Bsb;N("kevlar_shell_cleanup")&&yk(Bk,ljb.bind(this,t.caches));rd("IS_SHELL_LOAD")&&(N("web_appshell_purge_trigger")&&mjb().then(function(g){g&&(g=new zj(new Dj()),g.get(a.autoShellPurgeRateLimitKey_)?Um(Error("Auto shell purge too frequent")):(g.set(a.autoShellPurgeRateLimitKey_,!0,Vk()+3E4),a.hardReloadWithShellPurge_()))}),Po("ssdm", Math.round(Vk()-vo()))); N("ytidb_clear_data_for_other_users")&&(0,tm.clearDataForOtherUsers)();N("cache_utc_offset_minutes_in_pref_cookie")&&(DNa()||ANa());N("kevlar_is_hiring")&&(console.log("%cYouTube.com is hiring!",Isb(Fsb)),console.log("%cYouTube.com is the second largest website in the world, with hundreds of\nmillions of users and watch-hours per day. It makes you laugh, learn, and leaves\nyou amazed. Are there things that you love about YouTube? Things that you don't?\nHelp us make it better!",Isb(Gsb)),console.log("%cVisit http://go/join-youtube-web to apply today.", Isb(Hsb)))}, ready:function(){this.$.guide.addEventListener("transitionend",this.processDrawerIronSelect_.bind(this));this.$["guide-inner-content"].addEventListener("scroll",this.markDirty.bind(this));var a=pLa();a&&N("external_fullscreen")&&document.addEventListener(a,this.setFullscreen_.bind(this));(a=window.matchMedia("(prefers-color-scheme: dark)"))&&a.addEventListener&&a.addEventListener("change",this.onDeviceThemeChanged_.bind(this));this.onDeviceThemeChanged_()}, attached:function(){var a=this;this.initialLoad_();N("kevlar_enable_slis")&&Qja().recordEnd("SUCCESS");Polymer.RenderStatus.afterNextRender(this,this.updateIconSet_.bind(this));qLa(this.$["guide-inner-content"],!1);this.useVimio_||(this.$["visibility-monitor"].visibilityRoot=this);var b=this.getInterface(IN);b&&ITa(b);this.$["guide-service"].guideElement=this.$.guide;b=document.createElement("ytd-miniplayer");Polymer.dom(this.root).appendChild(b);N("kevlar_network_banner")&&(b=document.createElement("ytd-network-status-banner"), Polymer.dom(this.root).appendChild(b));N("kevlar_right_click_on_lockups")&&Polymer.IronOverlayManager._onCaptureClick&&document.addEventListener("contextmenu",Polymer.IronOverlayManager._onCaptureClick.bind(Polymer.IronOverlayManager),!0);var c=function(){var d=ho("yt-page-navigation-progress");Polymer.dom(a.root).appendChild(d)}; N("enable_signals")?setTimeout(function(){Un.getInstance().parkOrScheduleJob(c,0,"eocs",16)},0):xk(Bk,c,200); N("service_worker_push_enabled")&&xk(Bk,uVa);CQa(DL.getInstance(),this.dynamicActionMap,this);this.fire("ytd-app-attached");Un.getInstance().processSignal("aa");QSa(this);Fa("gapi.load",vLa,void 0);N("kevlar_offline_aware_ui")&&(b=Em(),b.isMonitoring=!0,b.listen("ytnetworkstatus-online",this.onlineHandler_.bind(this)),b.listen("ytnetworkstatus-offline",this.offlineHandler_.bind(this)),b.isNetworkAvailable()||this.offlineHandler_());this.reset_()}, detached:function(){sLa(this.$["guide-inner-content"]);Bk.cancelJob(fN);fN=0;Bk.cancelJob(gN);gN=0;pk(eN);eN.length=0;PSa=dN=null;JN.getInstance().dispose()}, onlineHandler_:function(){document.documentElement.removeAttribute("offline")}, offlineHandler_:function(){document.documentElement.setAttribute("offline",!0)}, initIconDefs_:function(a,b,c){var d=document.createElement("iron-iconset-svg");d.name=a;a=document.createElementNS(this.SVG_NAMESPACE_,"svg");d.appendChild(a);a.appendChild(b);if(c)for(var f in c)d[f]=c[f];document.body.appendChild(d);return d}, handleSignalActionCopyLinkAddress_:function(a,b){if(b=new fq(this.getLink_(b)).toString()){a=document.createElement("textarea");var c=document.location.href;c instanceof fq||(c=hr(c));b instanceof fq||(b=hr(b));b=c.resolve(b);a.value=b;document.body.appendChild(a);a.select();document.execCommand("copy");document.body.removeChild(a)}}, onWindowResized_:function(){this.sendAction("yt-close-popup-action",["yt-tooltip-renderer"]);PM.getInstance().setWidth(document.body.clientWidth)}, handleMiniplayerActiveChangedAction_:function(a){this.miniplayerActive_=a}, observeGuideVisibility_:function(){var a=PM.getInstance(),b=this.miniGuideVisible_;a.guidePersistentAndVisible_=this.guidePersistentAndVisible;a.miniGuideVisible_=b;tSa(a)}, handleEduDismissAction_:function(a){a&&a.eduDismissAction&&(this.sendAction("yt-close-popup-action",["yt-bubble-hint-renderer"]),MM.getInstance().dismissEdu(a.eduDismissAction.key))}, handleEduImpressionAction_:function(a){a&&a.eduImpressionAction&&MM.getInstance().recordEduImpression(a.eduImpressionAction.key)}, onYtSignalActionConfirmMentionsEdu_:function(){this.sendAction("yt-close-popup-action",["yt-bubble-hint-renderer"]);RM.getInstance().dismissEdu()}, onYtSignalActionRecordMentionsEduImpression_:function(){RM.getInstance().recordEduImpression()}, onYtdPageManagerAttached_:function(a){"page-manager"==Polymer.dom(a).rootTarget.id&&this.pageManagerAttachedPromise_.resolve()}, onInvokeInstrumentManagerAction_:function(a,b){Rsb(b,a)}, updateIconSet_:function(){var a=Polymer.dom(this).querySelector("#masthead"),b=Polymer.dom(a),c=b.querySelector("g#yt-logo");c&&(a=document.createElementNS(this.SVG_NAMESPACE_,"defs"),a.appendChild(c.cloneNode(!0)),(b=b.querySelector("g#yt-logo-red"))&&a.appendChild(b.cloneNode(!0)),this.initIconDefs_("yt-logos-ext",a))}, updateMastheadData_:function(){var a=this,b=Polymer.dom(this).querySelector("#masthead");b&&Polymer.RenderStatus.afterNextRender(this,function(){b.data=a.topbarData_})}, loadDesktopData_:function(a,b){setTimeout(function(){var c="adl";b&&b.filler&&(c="afl");Ro(c)},0); this.loadData(a,b);N("kevlar_enable_slis")&&b&&b.response&&fka().recordEnd("SUCCESS");this.$["page-manager"].lazyPrepareCriticalPages(b&&b.page,a);b&&"watch"==b.page&&(this.isWatchPage=!0)}, prepareDesktopLoad_:function(a,b){var c=this;rd("IS_SHELL_LOAD")&&N("kevlar_eager_shell_boot_via_one_platform")?this.shellDataRequested_||(N("kevlar_lazy_init_watch_in_shell_load_killswitch")||this.$["page-manager"].lazyPrepareCriticalPages(b&&b.page||"browse",a),fTa(function(){return 0},function(){return!1}).then(function(d){c.loadDesktopData_(d.endpoint,d)}),this.shellDataRequested_=!0):(b&&b.url&&N("web_appshell_purge_trigger")&&(b.url=Md(b.url,"purge_shell")),this.loadDesktopData_(a,b))}, initialLoad_:function(){if(window.getPageData){var a=window.getPageData();window.getPageData=null;this.prepareDesktopLoad_(a.endpoint,a.data)}else window.loadDataHook=this.prepareDesktopLoad_.bind(this)}, computeTopbarData_:function(a){return a?a.response?this.get("topbar.desktopTopbarRenderer",a.response):null:null}, reset_:function(){var a=WKa();a?this.forcedTheme_=a:(this.forcedTheme_=null,a=xJ());this.setThemeMarkup_("USER_INTERFACE_THEME_DARK"==a);this.setMastheadTheme_()}, onSetTheaterModeEnabled_:function(a,b){this.isTheaterModeSession_=b.enabled;this.setTheaterModeStyles_(b.enabled)}, setTheaterModeStyles_:function(){this.setMastheadTheme_()}, onDarkModeToggledAction_:function(){var a=Ad(window.location.href);YKa(a)||(N("kevlar_legacy_browsers")&&N("polymer2_not_shady_build")&&!jl(window.location.href).themeRefresh&&(VKa(),gO(kl(window.location.href,{themeRefresh:1}))),N("web_appshell_purge_trigger")&&t.caches&&(ejb(),kjb()),a=Cd(window.location.href),this.$.historyManager.replaceUrl(Md(a,"theme")),a=this.isAppDarkTheme_(),this.setThemeMarkup_(!a),this.setMastheadTheme_(),Polymer.updateStyles(),VKa())}, onThemeAction_:function(a){switch(a){case"USER_INTERFACE_THEME_DARK":this.onDarkThemeAction_();break;case"USER_INTERFACE_THEME_LIGHT":this.onLightThemeAction_();break;default:throw Error("Invalid theme.");}}, onDarkThemeAction_:function(){this.setThemeMarkup_(!0);this.setDocumentBackgroundColor_(this.DARKMODE_DOCUMENT_BACKGROUND_COLOR);this.setSwatch(this.THEATER_MODE_BASE_COLOR);Polymer.updateStyles()}, onLightThemeAction_:function(){this.isTheaterMode_()?(this.setSwatch(this.DEFAULT_MODE_BASE_COLOR),this.querySelector("#masthead").setSwatch(this.THEATER_MODE_BASE_COLOR)):this.setSwatch(this.DEFAULT_MODE_BASE_COLOR);this.setThemeMarkup_(!1);this.setDocumentBackgroundColor_(this.DEFAULT_DOCUMENT_BACKGROUND_COLOR);Polymer.updateStyles()}, onYtSignalActionToggleRestrictedModeOnAction_:function(){this.setRestrictedMode_(!0)}, onYtSignalActionToggleRestrictedModeOffAction_:function(){this.setRestrictedMode_(!1)}, onPlayerFullscreen_:function(a){FJ();this.playerFullscreen_=a}, setRestrictedMode_:function(a){var b=tJ.getInstance();uJ(0,58,a);b.save();this.getInterface(W8).reload()}, onPageChanged_:function(a){this.isWatchPage="ytd-watch-flexy"==a.detail.newPageType||"ytd-watch-fixie"==a.detail.newPageType;a.detail.oldPageType&&this.reset_();this.isFullWindowSession_&&this.setFullscreen_()}, onSetCookieCommand_:function(a){if(a=a.setCookieCommand){var b=tJ.getInstance();a.flagNum&&"boolean"==typeof a.value?(uJ(0,a.flagNum,a.value),b.save()):a.key&&"string"==typeof a.stringValue&&(b.set(a.key,a.stringValue),b.save())}}, onSetLocalStorageCommand_:function(a){(a=a.setLocalStorageCommand)&&window.localStorage&&"string"===typeof a.key&&"string"===typeof a.value&&(window.localStorage[a.key]=a.value)}, onGuideToggleTap_:function(){this.fire("yt-guide-toggle")}, onGuideToggleHover_:function(){this.fire("yt-guide-hover")}, setThemeMarkup_:function(a){a?document.documentElement.setAttribute("dark",!0):document.documentElement.removeAttribute("dark");var b=document.querySelector("meta[name=\"theme-color\"]");b&&(b.content=this.metaThemeColor_(a))}, isTheaterMode_:function(){return this.isWatchPage&&this.isTheaterModeSession_}, isAppDarkTheme_:function(){return document.documentElement.hasAttribute("dark")}, setMastheadTheme_:function(){var a=this.queryEffectiveChildren("#masthead");a&&(a.dark=a.isDarkThemeForced||this.isTheaterMode_()||this.isAppDarkTheme_(),a.isDarkThemeForced=!1)}, onRequestPanelModeChange_:function(a,b){this.hideHeaderShadow="seamed"!=b.mode}, onGuideOpenButtonHover_:function(){var a=this;gsb(Z8.getInstance()).then(function(){a.renderGuide=!0})}, onDrawerIronSelect_:function(a){"guide"==Polymer.dom(a).rootTarget.id&&this.processDrawerIronSelect_()}, processDrawerIronSelect_:function(){this.markDirty();var a="closed",b=this.$.guide;b.opened&&(this.renderGuide=!0,b.persistent||(a="opened"));this.fire("yt-autonav-pause-guide-"+a)}, onAddElementToApp_:function(a){Polymer.dom(this.root).appendChild(a.detail)}, onThrottledScroll_:function(){var a=this.getInterface(XM).getCurrentPage();a&&(this.scrollAtTop_=0>=a.getScrollTop());this.mastheadHidden_=this.canHideMasthead_()}, canHideMasthead_:function(){return this.scrollAtTop_&&this.fullscreen_}, setFullscreen_:function(){var a=N("kevlar_fullerscreen_root_only_killswitch")?!!FJ():!!FJ()&&FJ()==document.documentElement;a=this.isWatchPage&&(a||this.isFullWindowSession_);this.fullscreen_!=a&&((this.fullscreen_=a)&&this.sendOptionalAction("yt-close-all-popups-action"),this.toggleFullscreenStyles_(this.fullscreen_),this.sendAction("yt-fullscreen-change-action",[this.fullscreen_]))}, updateMastheadCssHeight_:function(){var a=this.mastheadHeight_;this.fullscreen_&&(a=0);this.updateStyles({"--ytd-masthead-height":a+"px"})}, toggleFullscreenStyles_:function(a){var b=this.getInterface(XM).getCurrentPage();a?(document.body.classList.add("no-scroll"),b.pageScrollElement=this,this.scrolling_=!0,this.listen(this,"scroll","onScroll_"),b.setScrollTop(0),this.updateStyles({"--ytd-app-fullerscreen-scrollbar-width":EN()+"px"})):(document.body.classList.remove("no-scroll"),b.pageScrollElement=null,this.scrolling_=!1,this.unlisten(this,"scroll","onScroll_"));this.mastheadHidden_=a;this.updateMastheadCssHeight_()}, onScroll_:function(){this.markDirty();this.scrollThrottle_.fire()}, onYtMastheadHeightChanged_:function(a,b){this.mastheadHeight_=b.height;this.updateMastheadCssHeight_()}, onYtNavigateAction:function(a){a=this.get("navigateAction.endpoint",a);this.fire("yt-navigate",{endpoint:a})}, setDocumentBackgroundColor_:function(a){document.documentElement.style.backgroundColor=a}, onYtRegisterCreateFamilyDialog_:function(){if(!this.hasCreateFamilyDialog_){var a=document.createElement("yt-create-family-dialog");Polymer.dom(this.root).appendChild(a);this.hasCreateFamilyDialog_=!0}}, onSetPushNotificationsEnabledCommand_:function(a){var b=this;a.setPushNotificationsEnabledCommand&&"boolean"===typeof a.setPushNotificationsEnabledCommand.enabled&&("granted"!=Notification.permission?iVa().then(function(){"granted"==Notification.permission?(XUa(!a.setPushNotificationsEnabledCommand.enabled).then(iO),a.setPushNotificationsEnabledCommand.successAction&&b.sendServiceRequestAction([a.setPushNotificationsEnabledCommand.successAction])):a.setPushNotificationsEnabledCommand.failureAction&& b.sendServiceRequestAction([a.setPushNotificationsEnabledCommand.failureAction])}):(XUa(!a.setPushNotificationsEnabledCommand.enabled).then(iO),a.setPushNotificationsEnabledCommand.successAction&&this.sendServiceRequestAction([a.setPushNotificationsEnabledCommand.successAction])))}, onYtSignalActionEnableChromeNotifications_:function(){fVa(!0)}, onFocusSearchBox_:function(){var a=this.querySelector("ytd-searchbox");a&&a.focus()}, onOpenHotkeyDialog_:function(){this.topbarData_.hotkeyDialog&&this.openPopup({openPopupAction:{popupType:"DIALOG",popup:{hotkeyDialogRenderer:this.topbarData_.hotkeyDialog.hotkeyDialogRenderer}}})}, onYtSignalActionShowKeyboardShortcutDialog_:function(){this.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]);this.onOpenHotkeyDialog_()}, onYtEndpointChangeHandler:function(a,b){var c=DN.getInstance();c.pendingPrefetchJob_&&(b=!(!b||"1"!=b.autonav),c.pendingPrefetchJob_.resolve(a&&a.watchEndpoint?kN(a,b):""),c.pendingPrefetchJob_=null);this.sendAction("yt-pause-active-page-context");this.sendAction("ytd-log-youthere-nav");this.sendAction("yt-prepare-page-dispose")}, handleClearUrlParamCommand_:function(a){if(a.clearUrlParamCommand&&a.clearUrlParamCommand.paramKeys){var b=a.clearUrlParamCommand.paramKeys;a=hr(window.location.href);b=k(b);for(var c=b.next();!c.done;c=b.next())a.removeParameter(c.value);window.history.replaceState(window.history.state,document.title,a.toString())}}, onYtCommandExecutorCommand_:function(a,b){a.commandExecutorCommand.commands&&this.sendInnerTubeActions(a.commandExecutorCommand.commands,b)}, onYtSignalActionSkipNavigation_:function(){var a=this.getInterface(XM).getCurrentPage();jk(a)}, onEntitiesUpdated:function(a){a.mutations&&0